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