Skip to content

Commit

Permalink
Merge pull request #249640 from amarshall/opensubdiv-cuda-parallelism
Browse files Browse the repository at this point in the history
  • Loading branch information
Artturin authored Nov 11, 2023
2 parents 6ab2d53 + 5d9e3ac commit 55482ee
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkgs/development/libraries/opensubdiv/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@ stdenv.mkDerivation rec {
"-DNO_OPENCL=1"
];

preBuild = let maxBuildCores = 16; in lib.optionalString cudaSupport ''
# https://github.com/PixarAnimationStudios/OpenSubdiv/issues/1313
NIX_BUILD_CORES=$(( NIX_BUILD_CORES < ${toString maxBuildCores} ? NIX_BUILD_CORES : ${toString maxBuildCores} ))
'';

postInstall = "rm $out/lib/*.a";

meta = {
Expand Down

0 comments on commit 55482ee

Please sign in to comment.