Merge pull request #288738 from samuela/samuela/jaxlib-bin

python3Packages.jaxlib-bin: use `autoAddOpenGLRunpathHook`
This commit is contained in:
Samuel Ainsworth
2024-02-14 11:12:57 -05:00
committed by GitHub
@@ -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