about summary refs log tree commit diff
path: root/pkgs/development/cuda-modules
diff options
context:
space:
mode:
authorJonathan Ringer <jonringer117@gmail.com>2024-01-04 19:17:41 -0800
committerJonathan Ringer <jonringer117@gmail.com>2024-01-04 19:17:44 -0800
commit72db73af3db9392554b89eb9aeb3187ae9dca78e (patch)
tree50b406cfd4cd4973d4ffc93f29b2a898c623ab10 /pkgs/development/cuda-modules
parent51d4de8c5b7f89f767d6f443115ce0edd55056d0 (diff)
cudaPackage_10_0.cudatoolkit: fix build
Acknowledge to `autoPatchelfHook` that we don't have
ancient versions of ffmeg for the jre shipped.

Also, targets/ directory doesn't exist in cuda 10.0, so
the preFixup phase collected 0 files and when passed to
patchelf would fail the build.
Diffstat (limited to 'pkgs/development/cuda-modules')
-rw-r--r--pkgs/development/cuda-modules/cudatoolkit/default.nix9
1 files changed, 8 insertions, 1 deletions
diff --git a/pkgs/development/cuda-modules/cudatoolkit/default.nix b/pkgs/development/cuda-modules/cudatoolkit/default.nix
index de216c24bb675..57d1a0461e13f 100644
--- a/pkgs/development/cuda-modules/cudatoolkit/default.nix
+++ b/pkgs/development/cuda-modules/cudatoolkit/default.nix
@@ -180,10 +180,17 @@ backendStdenv.mkDerivation rec {
     # This dependency is asked for by target-linux-x64/CollectX/RedHat/x86_64/libssl.so.10
     # - do we even want to use nvidia-shipped libssl?
     "libcom_err.so.2"
+  ] ++ lib.optionals (lib.versionOlder version "10.1") [
+    # For Cuda 10.0, nVidia also shipped a jre implementation which needed
+    # two old versions of ffmpeg which are not available in nixpkgs
+    "libavcodec.so.54"
+    "libavcodec.so.53"
+    "libavformat.so.54"
+    "libavformat.so.53"
   ];
 
   preFixup =
-    if lib.versionOlder version "11" then
+    if (lib.versionAtLeast version "10.1" && lib.versionOlder version "11") then
       ''
         ${lib.getExe' patchelf "patchelf"} $out/targets/*/lib/libnvrtc.so --add-needed libnvrtc-builtins.so
       ''