about summary refs log tree commit diff
path: root/pkgs/test/stdenv
diff options
context:
space:
mode:
authorArtturi <Artturin@artturin.com>2023-01-25 15:51:53 +0200
committerGitHub <noreply@github.com>2023-01-25 15:51:53 +0200
commite42cdd23834d585959cf9f6af86a846208e46c35 (patch)
tree810ad407e516db3c4111a104996d627797b9f917 /pkgs/test/stdenv
parent588d9ab6e20fc6262aa2c04e3de339b54277eca3 (diff)
parentcfb543a53219ac607f930adcdb34cde001b27767 (diff)
Merge pull request #212286 from Artturin/runonall
make-symlinks-relative: run on all outputs
Diffstat (limited to 'pkgs/test/stdenv')
-rw-r--r--pkgs/test/stdenv/hooks.nix12
1 files changed, 11 insertions, 1 deletions
diff --git a/pkgs/test/stdenv/hooks.nix b/pkgs/test/stdenv/hooks.nix
index 7f25d7dbd2db0..3d72efae6c479 100644
--- a/pkgs/test/stdenv/hooks.nix
+++ b/pkgs/test/stdenv/hooks.nix
@@ -23,19 +23,29 @@
     };
   make-symlinks-relative = stdenv.mkDerivation {
     name = "test-make-symlinks-relative";
+    outputs = [ "out" "man" ];
     buildCommand = ''
       mkdir -p $out/{bar,baz}
+      mkdir -p $man/share/{x,y}
       source1="$out/bar/foo"
       destination1="$out/baz/foo"
+      source2="$man/share/x/file1"
+      destination2="$man/share/y/file2"
       echo foo > $source1
+      echo foo > $source2
       ln -s $source1 $destination1
+      ln -s $source2 $destination2
       echo "symlink before patching: $(readlink $destination1)"
+      echo "symlink before patching: $(readlink $destination2)"
 
-      _makeSymlinksRelative
+      _makeSymlinksRelativeInAllOutputs
 
       echo "symlink after patching: $(readlink $destination1)"
       ([[ -e $destination1 ]] && echo "symlink isn't broken") || (echo "symlink is broken" && exit 1)
       ([[ $(readlink $destination1) == "../bar/foo" ]] && echo "absolute symlink was made relative") || (echo "symlink was not made relative" && exit 1)
+      echo "symlink after patching: $(readlink $destination2)"
+      ([[ -e $destination2 ]] && echo "symlink isn't broken") || (echo "symlink is broken" && exit 1)
+      ([[ $(readlink $destination2) == "../x/file1" ]] && echo "absolute symlink was made relative") || (echo "symlink was not made relative" && exit 1)
     '';
   };
   move-docs = stdenv.mkDerivation {