cudatoolkit: fix build

This is a workaround for a segfault in patchelf
when attempting to set an empty rpath
This commit is contained in:
Ryan Burns 2021-09-16 22:29:29 -07:00
parent a3c4956cf9
commit 810e595e4e

View file

@ -193,11 +193,11 @@ stdenv.mkDerivation rec {
--set-interpreter "''$(cat $NIX_CC/nix-support/dynamic-linker)" $i
fi
if [[ $i =~ libcudart ]]; then
rpath2=
patchelf --remove-rpath $i
else
rpath2=$rpath:$lib/lib:$out/jre/lib/amd64/jli:$out/lib:$out/lib64:$out/nvvm/lib:$out/nvvm/lib64
patchelf --set-rpath "$rpath2" --force-rpath $i
fi
patchelf --set-rpath "$rpath2" --force-rpath $i
done < <(find $out $lib $doc -type f -print0)
'';