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 }