Limit parallel building of Haskell packages. [Fixes #53665]
This commit is contained in:
parent
178836c9bb
commit
55fe0276b8
|
@ -78,6 +78,7 @@ in
|
||||||
# same package in the (recursive) dependencies of the package being
|
# same package in the (recursive) dependencies of the package being
|
||||||
# built. Will delay failures, if any, to compile time.
|
# built. Will delay failures, if any, to compile time.
|
||||||
allowInconsistentDependencies ? false
|
allowInconsistentDependencies ? false
|
||||||
|
, maxBuildCores ? 4 # GHC usually suffers beyond -j4. https://ghc.haskell.org/trac/ghc/ticket/9221
|
||||||
} @ args:
|
} @ args:
|
||||||
|
|
||||||
assert editedCabalFile != null -> revision != null;
|
assert editedCabalFile != null -> revision != null;
|
||||||
|
@ -250,6 +251,7 @@ stdenv.mkDerivation ({
|
||||||
'' + postPatch;
|
'' + postPatch;
|
||||||
|
|
||||||
setupCompilerEnvironmentPhase = ''
|
setupCompilerEnvironmentPhase = ''
|
||||||
|
NIX_BUILD_CORES=$(( NIX_BUILD_CORES < ${toString maxBuildCores} ? NIX_BUILD_CORES : ${toString maxBuildCores} ))
|
||||||
runHook preSetupCompilerEnvironment
|
runHook preSetupCompilerEnvironment
|
||||||
|
|
||||||
echo "Build with ${ghc}."
|
echo "Build with ${ghc}."
|
||||||
|
|
Loading…
Reference in New Issue