diff options
author | Matthew Bauer <mjbauer95@gmail.com> | 2020-09-02 16:29:28 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-02 16:29:28 -0500 |
commit | 8e6f4669676c2f56ad41fa8787f063c7996dfe2e (patch) | |
tree | def15e2330a72325fa898b6129d9988875397348 /pkgs | |
parent | 43afce40d6a2c4f2ddb9083f79ab50737c67498a (diff) | |
parent | ed950bb10438d1e0b5b83cd513fa26db2ac60e2b (diff) | |
download | nixpkgs-8e6f4669676c2f56ad41fa8787f063c7996dfe2e.tar nixpkgs-8e6f4669676c2f56ad41fa8787f063c7996dfe2e.tar.gz nixpkgs-8e6f4669676c2f56ad41fa8787f063c7996dfe2e.tar.bz2 nixpkgs-8e6f4669676c2f56ad41fa8787f063c7996dfe2e.tar.lz nixpkgs-8e6f4669676c2f56ad41fa8787f063c7996dfe2e.tar.xz nixpkgs-8e6f4669676c2f56ad41fa8787f063c7996dfe2e.tar.zst nixpkgs-8e6f4669676c2f56ad41fa8787f063c7996dfe2e.zip |
Merge pull request #96563 from obsidiansystems/skip-cudnn_cnn_infer-instead-of-removing
cudnn: skip libcudnn_cnn_infer.so, instead of removing
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/development/libraries/science/math/cudnn/generic.nix | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/pkgs/development/libraries/science/math/cudnn/generic.nix b/pkgs/development/libraries/science/math/cudnn/generic.nix index 381920682a4..e727218c055 100644 --- a/pkgs/development/libraries/science/math/cudnn/generic.nix +++ b/pkgs/development/libraries/science/math/cudnn/generic.nix @@ -32,19 +32,20 @@ stdenv.mkDerivation { mkdir -p $out cp -a include $out/include cp -a lib64 $out/lib64 - - ${lib.optionalString (lib.versionAtLeast version "8") '' - # patchelf fails on libcudnn_cnn_infer due to it being too big. - # I'm hoping it's not needed for most programs. - # (https://github.com/NixOS/patchelf/issues/222) - rm -f $out/lib64/libcudnn_cnn_infer* - ''} ''; # Set RUNPATH so that libcuda in /run/opengl-driver(-32)/lib can be found. # See the explanation in addOpenGLRunpath. postFixup = '' - addOpenGLRunpath $out/lib/lib*.so + for lib in $out/lib/lib*.so; do + # patchelf fails on libcudnn_cnn_infer due to it being too big. + # Most programs will still get the RPATH since they link to + # other things. + # (https://github.com/NixOS/patchelf/issues/222) + if [ "$(basename $lib)" != libcudnn_cnn_infer.so ]; then + addOpenGLRunpath $lib + fi + done ''; propagatedBuildInputs = [ |