summary refs log tree commit diff
path: root/pkgs/development/tools/misc/patchelf
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2016-02-24 11:13:36 +0100
committerEelco Dolstra <eelco.dolstra@logicblox.com>2016-02-24 11:13:36 +0100
commitaff0451c1059db83acb77125f79b76075261dabd (patch)
treed157cbb52306c13453c25a3b395d958dfd6791ea /pkgs/development/tools/misc/patchelf
parent2f050b5d13784d6ab4b63405db495b7a8485f61a (diff)
downloadnixpkgs-aff0451c1059db83acb77125f79b76075261dabd.tar
nixpkgs-aff0451c1059db83acb77125f79b76075261dabd.tar.gz
nixpkgs-aff0451c1059db83acb77125f79b76075261dabd.tar.bz2
nixpkgs-aff0451c1059db83acb77125f79b76075261dabd.tar.lz
nixpkgs-aff0451c1059db83acb77125f79b76075261dabd.tar.xz
nixpkgs-aff0451c1059db83acb77125f79b76075261dabd.tar.zst
nixpkgs-aff0451c1059db83acb77125f79b76075261dabd.zip
patchELF: Use correct directory
Borrowed from https://github.com/NixOS/nixpkgs/pull/13395.
Diffstat (limited to 'pkgs/development/tools/misc/patchelf')
-rw-r--r--pkgs/development/tools/misc/patchelf/setup-hook.sh5
1 files changed, 3 insertions, 2 deletions
diff --git a/pkgs/development/tools/misc/patchelf/setup-hook.sh b/pkgs/development/tools/misc/patchelf/setup-hook.sh
index 03b6f362a77..563ef57fce1 100644
--- a/pkgs/development/tools/misc/patchelf/setup-hook.sh
+++ b/pkgs/development/tools/misc/patchelf/setup-hook.sh
@@ -5,7 +5,8 @@
 fixupOutputHooks+=('if [ -z "$dontPatchELF" ]; then patchELF "$prefix"; fi')
 
 patchELF() {
-    header "shrinking RPATHs of ELF executables and libraries in $prefix"
+    local dir="$1"
+    header "shrinking RPATHs of ELF executables and libraries in $dir"
 
     local i
     while IFS= read -r -d $'\0' i; do
@@ -13,7 +14,7 @@ patchELF() {
         if ! isELF "$i"; then continue; fi
         echo "shrinking $i"
         patchelf --shrink-rpath "$i" || true
-    done < <(find "$prefix" -type f -print0)
+    done < <(find "$dir" -type f -print0)
 
     stopNest
 }