diff --git a/pkgs/development/haskell-modules/generic-builder.nix b/pkgs/development/haskell-modules/generic-builder.nix index f9acdd0f4a27b..0dd36c57fc053 100644 --- a/pkgs/development/haskell-modules/generic-builder.nix +++ b/pkgs/development/haskell-modules/generic-builder.nix @@ -567,11 +567,16 @@ stdenv.mkDerivation ({ # `--test-option`, so Cabal passes it to the underlying test suite binary. checkPhase = '' runHook preCheck + + unset GHC_PACKAGE_PATH # Cabal complains if this variable is set during check. + checkFlagsArray+=( "--show-details=streaming" ${lib.escapeShellArgs (builtins.map (opt: "--test-option=${opt}") testFlags)} ) ${setupCommand} test ${testTarget} $checkFlags ''${checkFlagsArray:+"''${checkFlagsArray[@]}"} + export GHC_PACKAGE_PATH="$packageConfDir:" + runHook postCheck '';