summary refs log tree commit diff
path: root/pkgs/os-specific/linux/nvidia-x11/builder.sh
diff options
context:
space:
mode:
authorAmbroz Bizjak <abizjak.pro@gmail.com>2019-06-08 15:23:05 +0200
committerFrederik Rietdijk <freddyrietdijk@fridh.nl>2019-06-15 10:54:50 +0200
commitd1226bff8ec0ce78a798f23f06c9a35d0e9ff3c3 (patch)
tree617a5222fe442d841754b219db992bc3f156489b /pkgs/os-specific/linux/nvidia-x11/builder.sh
parent0b8efd8724e59964bad01060935ce291288761c9 (diff)
downloadnixpkgs-d1226bff8ec0ce78a798f23f06c9a35d0e9ff3c3.tar
nixpkgs-d1226bff8ec0ce78a798f23f06c9a35d0e9ff3c3.tar.gz
nixpkgs-d1226bff8ec0ce78a798f23f06c9a35d0e9ff3c3.tar.bz2
nixpkgs-d1226bff8ec0ce78a798f23f06c9a35d0e9ff3c3.tar.lz
nixpkgs-d1226bff8ec0ce78a798f23f06c9a35d0e9ff3c3.tar.xz
nixpkgs-d1226bff8ec0ce78a798f23f06c9a35d0e9ff3c3.tar.zst
nixpkgs-d1226bff8ec0ce78a798f23f06c9a35d0e9ff3c3.zip
nvidia-x11: Set 32-bit library paths for 32-bit libraries.
Patchelf was being called to point RUNPATH to 64-bit library paths even for 32-bit libraries.
Diffstat (limited to 'pkgs/os-specific/linux/nvidia-x11/builder.sh')
-rwxr-xr-xpkgs/os-specific/linux/nvidia-x11/builder.sh6
1 files changed, 5 insertions, 1 deletions
diff --git a/pkgs/os-specific/linux/nvidia-x11/builder.sh b/pkgs/os-specific/linux/nvidia-x11/builder.sh
index 56012aafea9..a30f1d7f593 100755
--- a/pkgs/os-specific/linux/nvidia-x11/builder.sh
+++ b/pkgs/os-specific/linux/nvidia-x11/builder.sh
@@ -102,7 +102,11 @@ installPhase() {
     do
       # I'm lazy to differentiate needed libs per-library, as the closure is the same.
       # Unfortunately --shrink-rpath would strip too much.
-      patchelf --set-rpath "$out/lib:$libPath" "$libname"
+      if [[ -n $lib32 && $libname == "$lib32/lib/"* ]]; then
+        patchelf --set-rpath "$lib32/lib:$libPath32" "$libname"
+      else
+        patchelf --set-rpath "$out/lib:$libPath" "$libname"
+      fi
 
       libname_short=`echo -n "$libname" | sed 's/so\..*/so/'`