Skip to content

Conversation

@jcpetruzza
Copy link

The function configureCabalFlags uses a list of packages that should be called with certain flags when passing them to cabal2nix.

For example, for hslua, it specifies that it is to used the "system" version of lua (the one provided by nix) and not the version of lua that comes embedded in the package. Notice that cabal2nix assumes assumes this flag in newer versions of its postProcess method, and if the flag is not given, it will fail attempting to replace package "lua" by "lua_5_3". In any case, a derivation for hslua that doesn't include lua_5_3 as a dependency would be incomplete.

This PR also contains two minor changes (they could be moved to a different PR if needed):

  • Make stackage2nix work with more recent versions of cabal2nix, which introduced a couple of api-breaking changes.
  • Make it easier to build with stack --nix.

The function `configureCabalFlags` has a list of packages
that should be called with certain flags when passing them
to `cabal2nix`.

For example, for `hslua`, it specifies that it is to used the "system"
version of lua (the one provided by nix) and not the version of lua
that comes embedded in the package. Notice that cabal2nix assumes
assumes this flag in newer versions of its `postProcess` method, and
if the flag is not given, it will fail attempting to replace package
"lua" by "lua_5_3".
Adds a `nix` section in the stack.yaml, as an `opt-in`, so it
shouldn't break previous behaviour.
@jcpetruzza
Copy link
Author

I see the checks failed, but as far I can see, this is unrelated to my changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant