Workaround for https://github.com/NixOS/nixpkgs/issues/82245
Although this doesn't tackle the root cause of a null package sneaking
in (via executableHaskellDepends), it does effectively treat the symptom
by just ignoring any null packages.
Seeing as that issue has been open for more than a year I think this
band-aid is necessary.
stackage has updated to dhall 1.39, so we can update these as well:
haskellPackages.dhall-openapi: 1.0.0 -> 1.0.1
haskellPackages.dhall-nix: 1.1.20 -> 1.1.21
hnix 0.13.* doesn't support hnix-store-* >= 0.5 yet, pending some
refactors to get GHC 9.0.x support working. Until that happens,
we downgrade hnix-store-* since nothing needs the new version yet.
https://github.com/haskell-nix/hnix/issues/952
Linker failure outputs look like they are related to the GClosure stuff,
so lets try disabling that flag on arm — originally the upstream cabal
file disabled that flag by default if arch != x86_64-linux || != sparc64,
so this seems to be actually correct.
Test suite doesn't build with GHC 9.0.1 and since upstream is
currently not invested in fixing it, we (temporarily) disable it.
Upside: we can build hoogle again.
https://github.com/Soostone/retry/issues/71
GHC 9.0.x seems to require that the `Main` module also defines the
`main` IO action and does not just import it. This is the case with
mono-traversable's test suite which is why we (temporarily) disable it.
Stackage Nighly recently upgraded their version of hackage-db from 2.1.0
to 2.1.1. 2.1.1 had a compatibility fix for Cabal 3.4 [1]. However it
did not increase the version bound on Cabal nor fails to compile with
Cabal 3.2, so Stackage was able to update it.
Unfortunately hackage-db with Cabal 3.2 causes observable issues [2]
in cabal2nix, so we need to downgrade it for all compilers that still
ship a Cabal version < 3.4.
Also ideally we should update the constraints for hackage-db 2.1.0 and
hackage-db 2.1.1 on hackage. See also [3].
[1]: https://github.com/peti/hackage-db/pull/12
[2]: https://github.com/NixOS/cabal2nix/issues/501
[3]: https://github.com/peti/hackage-db/pull/14
These attribute names were converted into aliases in the following
changes:
* 62733b37b4
* https://github.com/NixOS/nixpkgs/pull/104776
cabal2nix-unstable has been updated to be aware of these changes in
7a9080d774, so these aliases should no
longer cause issues when evaluating with `allowAliases = false`.
Every flag the generic builder receives via `testFlags` is passed via
`--test-option` [1] to `Setup.hs` which in turn passes them to the
underlying test suite binary. These wrapped options are added to
`checkFlagsArray` in `checkPhase`. This needs to be done in bash since
without structuredAttrs in nixpkgs so far, Nix arrays aren't properly
translated into bash arrays, so we'd have all sorts of quoting issues
when spaces are involved.
Re-using `checkFlags` and `checkFlagsArray` from standard stdenv
setup.sh also results in an additional feature: Using `overrideAttrs`
`checkFlags` and `checkFlagsArray` can additionally be overridden,
which allows passing extra flags to `Setup.hs` whithout being wrapped
with `--test-option`.
[1]: See also https://cabal.readthedocs.io/en/3.4/setup-commands.html?highlight=test-option#cmdoption-runhaskell-Setup.hs-test-test-option
According to the cabal-install man page this also allows passing
special variables which are substituted for other values
depending on context.