mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-20 00:53:12 +03:00
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
|
||||
# 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 New Issue
Block a user