mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-29 06:45:54 +03: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,7 +89,8 @@
|
|||||||
eval "$preConfigure"
|
eval "$preConfigure"
|
||||||
|
|
||||||
${lib.optionalString (lib.attrByPath ["jailbreak"] false self) "${jailbreakCabal}/bin/jailbreak-cabal ${self.pname}.cabal && "
|
${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
|
test -f $i && ghc --make $i
|
||||||
done
|
done
|
||||||
|
|
||||||
@ -115,7 +116,8 @@
|
|||||||
|
|
||||||
./Setup build
|
./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
|
[ -n "$noHaddock" ] || ./Setup haddock
|
||||||
|
|
||||||
eval "$postBuild"
|
eval "$postBuild"
|
||||||
|
Loading…
Reference in New Issue
Block a user