about summary refs log tree commit diff
path: root/pkgs/build-support/setup-hooks/make-symlinks-relative.sh
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/build-support/setup-hooks/make-symlinks-relative.sh')
-rw-r--r--pkgs/build-support/setup-hooks/make-symlinks-relative.sh11
1 files changed, 10 insertions, 1 deletions
diff --git a/pkgs/build-support/setup-hooks/make-symlinks-relative.sh b/pkgs/build-support/setup-hooks/make-symlinks-relative.sh
index cd9c2eaa2d804..3ba007858301a 100644
--- a/pkgs/build-support/setup-hooks/make-symlinks-relative.sh
+++ b/pkgs/build-support/setup-hooks/make-symlinks-relative.sh
@@ -1,4 +1,6 @@
-postFixupHooks+=(_makeSymlinksRelative)
+# symlinks are often created in postFixup
+# don't use fixupOutputHooks, it is before postFixup
+postFixupHooks+=(_makeSymlinksRelativeInAllOutputs)
 
 # For every symlink in $output that refers to another file in $output
 # ensure that the symlink is relative. This removes references to the output
@@ -26,3 +28,10 @@ _makeSymlinksRelative() {
 
     done < <(find $prefix -type l -print0)
 }
+
+_makeSymlinksRelativeInAllOutputs() {
+  local output
+  for output in $(getAllOutputNames); do
+    prefix="${!output}" _makeSymlinksRelative
+  done
+}