3
0
Fork 0
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:
Eelco Dolstra 2017-02-14 01:00:17 +01:00
parent 868d30f975
commit 6a472cf4c1

View file

@ -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";