Commit 476de5c0 authored by Connor Baker's avatar Connor Baker
Browse files

cudatoolkit: prune broken symlinks in `postFixup`

As cudatoolkit is currently written, 11.8 introduces a broken symlink in `include` (also named `include`) and in `lib` (named `lib64`).

This trips up some consumers, like `tensorflow-gpu`.
parent 92247c10
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -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