Merge pull request #308114 from amarshall/rpackages-parallel-build

rPackages: Support building in parallel, do so by default
This commit is contained in:
Justin Bedő 2024-05-03 14:05:53 +10:00 committed by GitHub
commit 559d572f72
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -10,8 +10,11 @@ stdenv.mkDerivation ({
env.NIX_CFLAGS_COMPILE = env.NIX_CFLAGS_COMPILE =
lib.optionalString stdenv.isDarwin "-I${lib.getDev libcxx}/include/c++/v1"; lib.optionalString stdenv.isDarwin "-I${lib.getDev libcxx}/include/c++/v1";
enableParallelBuilding = true;
configurePhase = '' configurePhase = ''
runHook preConfigure runHook preConfigure
export MAKEFLAGS+="''${enableParallelBuilding:+-j$NIX_BUILD_CORES}"
export R_LIBS_SITE="$R_LIBS_SITE''${R_LIBS_SITE:+:}$out/library" export R_LIBS_SITE="$R_LIBS_SITE''${R_LIBS_SITE:+:}$out/library"
runHook postConfigure runHook postConfigure
''; '';