summary refs log tree commit diff
diff options
context:
space:
mode:
authorSamuel Ainsworth <skainsworth@gmail.com>2023-04-06 16:32:36 -0400
committerGitHub <noreply@github.com>2023-04-06 16:32:36 -0400
commit1a14c8d6b157e2402695db4e5a05bd3f5c90a16c (patch)
tree9f7cb696126d7e1f0a8f2a6cf414089d6df3fb96
parent98140dd07bc2fba2ccf570d6f6a424d20f7c619d (diff)
parentb100b0a1cc11146a8354ddb8064861afc2c7a659 (diff)
downloadnixpkgs-1a14c8d6b157e2402695db4e5a05bd3f5c90a16c.tar
nixpkgs-1a14c8d6b157e2402695db4e5a05bd3f5c90a16c.tar.gz
nixpkgs-1a14c8d6b157e2402695db4e5a05bd3f5c90a16c.tar.bz2
nixpkgs-1a14c8d6b157e2402695db4e5a05bd3f5c90a16c.tar.lz
nixpkgs-1a14c8d6b157e2402695db4e5a05bd3f5c90a16c.tar.xz
nixpkgs-1a14c8d6b157e2402695db4e5a05bd3f5c90a16c.tar.zst
nixpkgs-1a14c8d6b157e2402695db4e5a05bd3f5c90a16c.zip
Merge pull request #224986 from SomeoneSerge/cudatoolkit-autopatchelf-followup
cudaPackages_12.cudatoolkit: hotfix after switching to autoPatchelfHook
-rw-r--r--pkgs/development/compilers/cudatoolkit/common.nix32
1 files changed, 27 insertions, 5 deletions
diff --git a/pkgs/development/compilers/cudatoolkit/common.nix b/pkgs/development/compilers/cudatoolkit/common.nix
index 8082756b1ed..02eda05de80 100644
--- a/pkgs/development/compilers/cudatoolkit/common.nix
+++ b/pkgs/development/compilers/cudatoolkit/common.nix
@@ -37,6 +37,11 @@ args@
 , freeglut
 , libGLU
 , libsForQt5
+, libtiff
+, qt6Packages
+, rdma-core
+, ucx
+, rsync
 }:
 
 backendStdenv.mkDerivation rec {
@@ -67,13 +72,20 @@ backendStdenv.mkDerivation rec {
   nativeBuildInputs = [
     perl
     makeWrapper
+    rsync
     addOpenGLRunpath
     autoPatchelfHook
     autoAddOpenGLRunpathHook
   ] ++ lib.optionals (lib.versionOlder version "11") [
     libsForQt5.wrapQtAppsHook
+  ] ++ lib.optionals (lib.versionAtLeast version "11.8") [
+    qt6Packages.wrapQtAppsHook
   ];
-  buildInputs = [
+  buildInputs = lib.optionals (lib.versionOlder version "11") [
+    libsForQt5.qt5.qtwebengine
+    freeglut
+    libGLU
+  ] ++ [
     # To get $GDK_PIXBUF_MODULE_FILE via setup-hook
     gdk-pixbuf
 
@@ -109,10 +121,13 @@ backendStdenv.mkDerivation rec {
     unixODBC
     alsa-lib
     wayland
-  ] ++ lib.optionals (lib.versionOlder version "11") [
-    libsForQt5.qt5.qtwebengine
-    freeglut
-    libGLU
+  ] ++ lib.optionals (lib.versionAtLeast version "11.8") [
+    (lib.getLib libtiff)
+    qt6Packages.qtwayland
+    rdma-core
+    ucx
+    xorg.libxshmfence
+    xorg.libxkbfile
   ];
 
   # Prepended to runpaths by autoPatchelf.
@@ -205,6 +220,13 @@ backendStdenv.mkDerivation rec {
       mv pkg/builds/nsight_systems/target-linux-x64 $out/target-linux-x64
       mv pkg/builds/nsight_systems/host-linux-x64 $out/host-linux-x64
     ''}
+      ${lib.optionalString (lib.versionAtLeast version "11.8")
+      # 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
+      # we only ship libtiff.so.6, so let's use qt plugins built by Nix.
+      # TODO: don't copy, come up with a symlink-based "merge"
+    ''
+      rsync ${lib.getLib qt6Packages.qtimageformats}/lib/qt-6/plugins/ $out/host-linux-x64/Plugins/ -aP
+    ''}
 
     rm -f $out/tools/CUDA_Occupancy_Calculator.xls # FIXME: why?