From 54611541d9cb145c7c511ac70bc9ee146aca2433 Mon Sep 17 00:00:00 2001 From: Samuel Ainsworth Date: Wed, 14 Feb 2024 05:46:55 +0000 Subject: [PATCH] python3Packages.jaxlib-bin: use `autoAddOpenGLRunpathHook` --- pkgs/development/python-modules/jaxlib/bin.nix | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/jaxlib/bin.nix b/pkgs/development/python-modules/jaxlib/bin.nix index 4547916212b0..0bcf055a8766 100644 --- a/pkgs/development/python-modules/jaxlib/bin.nix +++ b/pkgs/development/python-modules/jaxlib/bin.nix @@ -14,7 +14,6 @@ # * https://github.com/google/jax/issues/5723#issuecomment-913038780 { absl-py -, addOpenGLRunpath , autoPatchelfHook , buildPythonPackage , config @@ -33,7 +32,7 @@ }: let - inherit (cudaPackagesGoogle) cudatoolkit cudnn cudaVersion; + inherit (cudaPackagesGoogle) autoAddOpenGLRunpathHook cudatoolkit cudnn cudaVersion; version = "0.4.24"; @@ -181,7 +180,7 @@ buildPythonPackage { # Prebuilt wheels are dynamically linked against things that nix can't find. # Run `autoPatchelfHook` to automagically fix them. nativeBuildInputs = lib.optionals stdenv.isLinux [ autoPatchelfHook ] - ++ lib.optionals cudaSupport [ addOpenGLRunpath ]; + ++ lib.optionals cudaSupport [ autoAddOpenGLRunpathHook ]; # Dynamic link dependencies buildInputs = [ stdenv.cc.cc.lib ]; @@ -197,8 +196,6 @@ buildPythonPackage { preInstallCheck = lib.optional cudaSupport '' shopt -s globstar - addOpenGLRunpath $out/**/*.so - for file in $out/**/*.so; do rpath=$(patchelf --print-rpath $file) # For some reason `makeLibraryPath` on `cudatoolkit_11` maps to