about summary refs log tree commit diff
path: root/pkgs/development/r-modules
diff options
context:
space:
mode:
authorAndrew Marshall <andrew@johnandrewmarshall.com>2024-04-30 18:16:07 -0400
committerAndrew Marshall <andrew@johnandrewmarshall.com>2024-04-30 18:18:36 -0400
commit64c1e6a08ca3ae04ab52eaa51e567d92b94b42db (patch)
treeb2ea48c0fa72bedf47362c0318344c90c455173f /pkgs/development/r-modules
parent58a1abdbae3217ca6b702f03d3b35125d88a2994 (diff)
rPackages: Support building in parallel, do so by default
Some rPackages (e.g. duckdb) take a *very* long time to build without
any parallelization.
Diffstat (limited to 'pkgs/development/r-modules')
-rw-r--r--pkgs/development/r-modules/generic-builder.nix3
1 files changed, 3 insertions, 0 deletions
diff --git a/pkgs/development/r-modules/generic-builder.nix b/pkgs/development/r-modules/generic-builder.nix
index 5939a425aefa9..ecbd78c4057d7 100644
--- a/pkgs/development/r-modules/generic-builder.nix
+++ b/pkgs/development/r-modules/generic-builder.nix
@@ -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
   '';