diff --git a/pkgs/development/haskell-modules/generic-builder.nix b/pkgs/development/haskell-modules/generic-builder.nix index 52d596da701ae..09cbab13930e8 100644 --- a/pkgs/development/haskell-modules/generic-builder.nix +++ b/pkgs/development/haskell-modules/generic-builder.nix @@ -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 @@ -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; @@ -314,6 +314,8 @@ stdenv.mkDerivation ({ runHook postBuild ''; + inherit doCheck; + checkPhase = '' runHook preCheck ${setupCommand} test ${testTarget} @@ -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; }