Skip to content

Commit

Permalink
rPackages: Support building in parallel, do so by default
Browse files Browse the repository at this point in the history
Some rPackages (e.g. duckdb) take a *very* long time to build without
any parallelization.
  • Loading branch information
amarshall committed Apr 30, 2024
1 parent 58a1abd commit 64c1e6a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkgs/development/r-modules/generic-builder.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
'';
Expand Down

0 comments on commit 64c1e6a

Please sign in to comment.