3
0
Fork 0
forked from mirrors/nixpkgs

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:
Peter Simons 2013-02-22 16:53:23 +01:00
parent c3a7017cb6
commit 074137a19b

View file

@ -89,7 +89,8 @@
eval "$preConfigure"
${lib.optionalString (lib.attrByPath ["jailbreak"] false self) "${jailbreakCabal}/bin/jailbreak-cabal ${self.pname}.cabal && "
}for i in Setup.hs Setup.lhs; do
}${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"