diff --git a/pkgs/development/cuda-modules/buildRedist/default.nix b/pkgs/development/cuda-modules/buildRedist/default.nix index bdf8a75494a1..0e2fd8cb5c29 100644 --- a/pkgs/development/cuda-modules/buildRedist/default.nix +++ b/pkgs/development/cuda-modules/buildRedist/default.nix @@ -14,6 +14,7 @@ lib, manifests, markForCudatoolkitRootHook, + patchelf, removeStubsFromRunpathHook, srcOnly, stdenv, @@ -277,6 +278,17 @@ extendMkDerivation { nativeBuildInputs = [ ./buildRedistHook.bash + # patchelf 0.19.2 aborts in shiftFile when addDriverRunpath re-patches binaries (e.g. libcufile, cuda_nvcc). + # FIXME: drop once https://github.com/NixOS/patchelf/pull/672 is in the default patchelf + (patchelf.overrideAttrs ( + finalAttrs: _: { + version = "0.15.2"; + src = fetchurl { + url = "https://github.com/NixOS/patchelf/releases/download/${finalAttrs.version}/patchelf-${finalAttrs.version}.tar.bz2"; + hash = "sha256-F3RfVkFZyOIo/EEtplogSLhGxLa0Igt3y/IkFuAvLXw="; + }; + } + )) autoPatchelfHook # This hook will make sure libcuda can be found # in typically /lib/opengl-driver by adding that diff --git a/pkgs/development/cuda-modules/default.nix b/pkgs/development/cuda-modules/default.nix index e8ab8e91c28f..f69e4f37df68 100644 --- a/pkgs/development/cuda-modules/default.nix +++ b/pkgs/development/cuda-modules/default.nix @@ -139,6 +139,7 @@ let autoAddDriverRunpath autoPatchelfHook fetchurl + patchelf srcOnly stdenv stdenvNoCC