NixOS / cabal2nix

Generate Nix build instructions from a Cabal file
https://haskell4nix.readthedocs.io
Other
361 stars 156 forks source link

Option to eliminate test dependencies #531

Open chris-martin opened 2 years ago

chris-martin commented 2 years ago

The --no-check flag presently seems to just set doCheck = false; in the output, but all the information related to the test suites is still there. Is there any option that can also eliminate the testHaskellDepends field, and remove from the top-level function arguments any packages that are only required by a test suite?

Motivation: I'm trying to build packages which have test dependencies that aren't in my package set. For example, hslua-marshalling has a test dependency on lua-arbitrary, a package which was uploaded to Hackage for the first time only a month ago. The function fails to evaluate (called without required argument 'lua-arbitrary') -- for no good reason, as far as I can see, because I'm not running the tests anyway!

maralorn commented 2 years ago

This might still be a good idea, but just fyi: You can pass lua-arbitrary = null; to the function to circumvent the problem.