Merge pull request #224986 from SomeoneSerge/cudatoolkit-autopatchelf-followup

cudaPackages_12.cudatoolkit: hotfix after switching to autoPatchelfHook

authored by Samuel Ainsworth and committed by GitHub 1a14c8d6 98140dd0

+27 -5
+27 -5
pkgs/development/compilers/cudatoolkit/common.nix
··· 37 37 , freeglut 38 38 , libGLU 39 39 , libsForQt5 40 + , libtiff 41 + , qt6Packages 42 + , rdma-core 43 + , ucx 44 + , rsync 40 45 }: 41 46 42 47 backendStdenv.mkDerivation rec { ··· 67 72 nativeBuildInputs = [ 68 73 perl 69 74 makeWrapper 75 + rsync 70 76 addOpenGLRunpath 71 77 autoPatchelfHook 72 78 autoAddOpenGLRunpathHook 73 79 ] ++ lib.optionals (lib.versionOlder version "11") [ 74 80 libsForQt5.wrapQtAppsHook 81 + ] ++ lib.optionals (lib.versionAtLeast version "11.8") [ 82 + qt6Packages.wrapQtAppsHook 75 83 ]; 76 - buildInputs = [ 84 + buildInputs = lib.optionals (lib.versionOlder version "11") [ 85 + libsForQt5.qt5.qtwebengine 86 + freeglut 87 + libGLU 88 + ] ++ [ 77 89 # To get $GDK_PIXBUF_MODULE_FILE via setup-hook 78 90 gdk-pixbuf 79 91 ··· 109 121 unixODBC 110 122 alsa-lib 111 123 wayland 112 - ] ++ lib.optionals (lib.versionOlder version "11") [ 113 - libsForQt5.qt5.qtwebengine 114 - freeglut 115 - libGLU 124 + ] ++ lib.optionals (lib.versionAtLeast version "11.8") [ 125 + (lib.getLib libtiff) 126 + qt6Packages.qtwayland 127 + rdma-core 128 + ucx 129 + xorg.libxshmfence 130 + xorg.libxkbfile 116 131 ]; 117 132 118 133 # Prepended to runpaths by autoPatchelf. ··· 204 219 205 220 mv pkg/builds/nsight_systems/target-linux-x64 $out/target-linux-x64 206 221 mv pkg/builds/nsight_systems/host-linux-x64 $out/host-linux-x64 222 + ''} 223 + ${lib.optionalString (lib.versionAtLeast version "11.8") 224 + # error: auto-patchelf could not satisfy dependency libtiff.so.5 wanted by /nix/store/.......-cudatoolkit-12.0.1/host-linux-x64/Plugins/imageformats/libqtiff.so 225 + # we only ship libtiff.so.6, so let's use qt plugins built by Nix. 226 + # TODO: don't copy, come up with a symlink-based "merge" 227 + '' 228 + rsync ${lib.getLib qt6Packages.qtimageformats}/lib/qt-6/plugins/ $out/host-linux-x64/Plugins/ -aP 207 229 ''} 208 230 209 231 rm -f $out/tools/CUDA_Occupancy_Calculator.xls # FIXME: why?