Skip to content

Commit

Permalink
haskell-generic-builder: be explicit about doCheck, cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
oxij committed Apr 26, 2018
1 parent 912cfb8 commit 9345fc5
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions pkgs/development/haskell-modules/generic-builder.nix
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ in
, buildTools ? [], libraryToolDepends ? [], executableToolDepends ? [], testToolDepends ? [], benchmarkToolDepends ? []
, configureFlags ? []
, description ? ""
, doCheck ? !isCross && (stdenv.lib.versionOlder "7.4" ghc.version)
, doCheck ? !isCross && stdenv.lib.versionOlder "7.4" ghc.version
, doBenchmark ? false
, doHoogle ? true
, editedCabalFile ? null
Expand Down Expand Up @@ -172,7 +172,7 @@ let
buildTools ++ libraryToolDepends ++ executableToolDepends;
propagatedBuildInputs = buildDepends ++ libraryHaskellDepends ++ executableHaskellDepends;
otherBuildInputs = setupHaskellDepends ++ extraLibraries ++ librarySystemDepends ++ executableSystemDepends ++
optionals (allPkgconfigDepends != []) allPkgconfigDepends ++
allPkgconfigDepends ++
optionals doCheck (testDepends ++ testHaskellDepends ++ testSystemDepends ++ testToolDepends) ++
optionals doBenchmark (benchmarkDepends ++ benchmarkHaskellDepends ++ benchmarkSystemDepends ++ benchmarkToolDepends);
allBuildInputs = propagatedBuildInputs ++ otherBuildInputs;
Expand Down Expand Up @@ -314,6 +314,8 @@ stdenv.mkDerivation ({
runHook postBuild
'';

inherit doCheck;

checkPhase = ''
runHook preCheck
${setupCommand} test ${testTarget}
Expand Down Expand Up @@ -428,7 +430,6 @@ stdenv.mkDerivation ({
// optionalAttrs (postConfigure != "") { inherit postConfigure; }
// optionalAttrs (preBuild != "") { inherit preBuild; }
// optionalAttrs (postBuild != "") { inherit postBuild; }
// optionalAttrs (doCheck) { inherit doCheck; }
// optionalAttrs (doBenchmark) { inherit doBenchmark; }
// optionalAttrs (checkPhase != "") { inherit checkPhase; }
// optionalAttrs (preCheck != "") { inherit preCheck; }
Expand Down

0 comments on commit 9345fc5

Please sign in to comment.