forked from mirrors/nixpkgs
opensubdiv: Remove cudatoolkit from the closure
This reduces Blender's closure size by around ~2 GiB when CUDA support is enabled.
This commit is contained in:
parent
868d30f975
commit
6a472cf4c1
|
@ -39,7 +39,16 @@ stdenv.mkDerivation {
|
|||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
postInstall = "rm $out/lib/*.a";
|
||||
postInstall =
|
||||
''
|
||||
rm $out/lib/*.a
|
||||
'' + lib.optionalString cudaSupport ''
|
||||
# Drop cudatoolkit reference from the closure. We'll get
|
||||
# libOpenCL from /run/opengl-driver.
|
||||
s=${cudatoolkit}/lib
|
||||
t=$(for ((i = 0; i < ''${#s}; i++)); do echo -n X; done)
|
||||
sed -i $out/lib/libosdGPU.so.* -e "s|$s|$t|g"
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "An Open-Source subdivision surface library";
|
||||
|
|
Loading…
Reference in a new issue