Merge pull request #217322 from ConnorBaker/cudatoolkit-prune-broken-symlinks

cudatoolkit: prune broken symlinks in `postFixup`
This commit is contained in:
Samuel Ainsworth 2023-02-22 22:42:42 -05:00 committed by GitHub
commit dc3ac9dc42
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -229,6 +229,13 @@ stdenv.mkDerivation rec {
addOpenGLRunpath $out/cuda_sanitizer_api/compute-sanitizer/*
addOpenGLRunpath $out/cuda_sanitizer_api/compute-sanitizer/x86/*
addOpenGLRunpath $out/target-linux-x64/*
'' +
# Prune broken symlinks which can cause problems with consumers of this package.
''
while read -r -d "" file; do
echo "Found and removing broken symlink $file"
rm "$file"
done < <(find "$out" "$lib" "$doc" -xtype l -print0)
'';
# cuda-gdb doesn't run correctly when not using sandboxing, so