cabal2nix/test: support Cabal >= 3.14#656
Conversation
wolfgangwalther
left a comment
There was a problem hiding this comment.
Changes LGTM.
Should we add GHC 9.12 for CI at the same time to confirm it builds there as well?
This enables us to do more elaborate overrides (which should be gated behind a flag, though!) which are unlikely to work with _any_ Nixpkgs revision.
The minimal flag is intended to disable “superfluous” stuff, i.e.
anything that isn't necessary to build the included packages and run
their tests. It is used to determine withHls for now, but has a less
specific meaning.
The idea is that you use
nix-shell --arg minimal true --arg pkgs "(import <nixpkgs> {})"
when using a nixpkgs version different from the pin.
This takes a while to compile unfortunately, so it is possible to disable it using --arg minimal false. Maybe it should be excluded by default?
We don't pass a CWD to readGenericPackageDescription since the whole test suite uses the working directory of the process to find the test data anyways (which we could improve in principle…).
6d1a80e to
7aa42ae
Compare
Done, I've made the haskell-ci changes in this PR as well now. |
I wonder whether it's possible to set this to minimal for |
haskell-ci takes a while to compile and is probably not always necessary. We should keep HLS since many editors use direnv to find HLS and direnv will use the default GHC / HLS from the pinned nixpkgs revision which should be cached.
|
Done, kept HLS for now since I think editors will struggle to find it otherwise. |
|
direnv / nix-shell works very well. The only thing that doesn't work, yet, is to do |
We don't pass a CWD to readGenericPackageDescription since the whole test suite uses the working directory of the process to find the test data anyways (which we could improve in principle…).