forked from mirrors/nixpkgs
57ec1813ff
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. |
||
---|---|---|
.. | ||
configuration-hackage2nix | ||
patches | ||
cabal2nix-unstable.nix | ||
configuration-arm.nix | ||
configuration-common.nix | ||
configuration-darwin.nix | ||
configuration-ghc-8.6.x.nix | ||
configuration-ghc-8.8.x.nix | ||
configuration-ghc-8.10.x.nix | ||
configuration-ghc-9.0.x.nix | ||
configuration-ghc-head.nix | ||
configuration-nix.nix | ||
configuration-tensorflow.nix | ||
default.nix | ||
generic-builder.nix | ||
generic-stack-builder.nix | ||
hackage-packages.nix | ||
HACKING.md | ||
hoogle-local-wrapper.sh | ||
hoogle.nix | ||
initial-packages.nix | ||
lib.nix | ||
make-package-set.nix | ||
non-hackage-packages.nix | ||
stack-hook.sh | ||
with-packages-wrapper.nix |