rPackages: Support building in parallel, do so by default

Some rPackages (e.g. duckdb) take a *very* long time to build without
any parallelization.
This commit is contained in:
Andrew Marshall 2024-04-30 18:16:07 -04:00
parent 58a1abdbae
commit 64c1e6a08c

View file

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