mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-23 23:43:30 +00:00
pkgs/build-support/cabal/default.nix: add support for running test suites via Cabal
Set 'doCheck = true' to enable building and running of the test suite.
This commit is contained in:
parent
c3a7017cb6
commit
074137a19b
@ -89,6 +89,7 @@
|
||||
eval "$preConfigure"
|
||||
|
||||
${lib.optionalString (lib.attrByPath ["jailbreak"] false self) "${jailbreakCabal}/bin/jailbreak-cabal ${self.pname}.cabal && "
|
||||
}${lib.optionalString (lib.attrByPath ["doCheck"] false self) "configureFlags+=\" --enable-test\" && "
|
||||
}for i in Setup.hs Setup.lhs; do
|
||||
test -f $i && ghc --make $i
|
||||
done
|
||||
@ -115,7 +116,8 @@
|
||||
|
||||
./Setup build
|
||||
|
||||
export GHC_PACKAGE_PATH=$(ghc-packages)
|
||||
${lib.optionalString (lib.attrByPath ["doCheck"] false self) "./Setup test && "
|
||||
}export GHC_PACKAGE_PATH=$(ghc-packages)
|
||||
[ -n "$noHaddock" ] || ./Setup haddock
|
||||
|
||||
eval "$postBuild"
|
||||
|
Loading…
Reference in New Issue
Block a user