stackage2nix icon indicating copy to clipboard operation
stackage2nix copied to clipboard

Use configureCabalFlags from cabal2nix

Open jcpetruzza opened this issue 7 years ago • 1 comments

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.

jcpetruzza avatar Jan 11 '19 13:01 jcpetruzza

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

jcpetruzza avatar Jan 14 '19 17:01 jcpetruzza