diff --git a/pkgs/build-support/setup-hooks/make-symlinks-relative.sh b/pkgs/build-support/setup-hooks/make-symlinks-relative.sh index cd9c2eaa2d80..f34353a7617b 100644 --- a/pkgs/build-support/setup-hooks/make-symlinks-relative.sh +++ b/pkgs/build-support/setup-hooks/make-symlinks-relative.sh @@ -6,8 +6,8 @@ postFixupHooks+=(_makeSymlinksRelative) _makeSymlinksRelative() { local symlinkTarget - if [ -n "${dontRewriteSymlinks-}" ]; then - return 0 + if [ "${dontRewriteSymlinks-}" ] || [ ! -e "$prefix" ]; then + return fi while IFS= read -r -d $'\0' f; do