summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/build-support/setup-hooks/separate-debug-info.sh4
-rw-r--r--pkgs/development/tools/misc/patchelf/setup-hook.sh2
2 files changed, 5 insertions, 1 deletions
diff --git a/pkgs/build-support/setup-hooks/separate-debug-info.sh b/pkgs/build-support/setup-hooks/separate-debug-info.sh
index 518be964733..c90d2cd5201 100644
--- a/pkgs/build-support/setup-hooks/separate-debug-info.sh
+++ b/pkgs/build-support/setup-hooks/separate-debug-info.sh
@@ -6,8 +6,10 @@ dontStrip=1
 fixupOutputHooks+=(_separateDebugInfo)
 
 _separateDebugInfo() {
+    [ -e "$prefix" ] || return 0
+
     local dst="${debug:-$out}"
-    if [ "$prefix" = "$dst" ]; then return; fi
+    if [ "$prefix" = "$dst" ]; then return 0; fi
 
     dst="$dst/lib/debug/.build-id"
 
diff --git a/pkgs/development/tools/misc/patchelf/setup-hook.sh b/pkgs/development/tools/misc/patchelf/setup-hook.sh
index 563ef57fce1..bc1cddd4879 100644
--- a/pkgs/development/tools/misc/patchelf/setup-hook.sh
+++ b/pkgs/development/tools/misc/patchelf/setup-hook.sh
@@ -6,6 +6,8 @@ fixupOutputHooks+=('if [ -z "$dontPatchELF" ]; then patchELF "$prefix"; fi')
 
 patchELF() {
     local dir="$1"
+    [ -e "$dir" ] || return 0
+
     header "shrinking RPATHs of ELF executables and libraries in $dir"
 
     local i