cudaPackages: use patched patchelf to fix build failures

This commit is contained in:
Gaetan Lepage
2026-10-19 12:07:25 +00:00
parent beaf2ecf95
commit e59d8331a8
2 changed files with 13 additions and 0 deletions

View File

@@ -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

View File

@@ -139,6 +139,7 @@ let
autoAddDriverRunpath
autoPatchelfHook
fetchurl
patchelf
srcOnly
stdenv
stdenvNoCC