summary refs log tree commit diff
path: root/nixos/modules/system/boot/stage-1.nix
diff options
context:
space:
mode:
authorKlemens Nanni <klemens@posteo.de>2022-05-12 21:35:33 +0200
committerKlemens Nanni <klemens@posteo.de>2022-05-26 22:17:02 +0200
commit4b045c70664617180c776d3d301fb7563572e66f (patch)
tree25153cfc527f02f639d45e0f8a8341b92ad0fdf4 /nixos/modules/system/boot/stage-1.nix
parentde77849ad689101c4a7af14a9d02c9906d2b0b13 (diff)
downloadnixpkgs-4b045c70664617180c776d3d301fb7563572e66f.tar
nixpkgs-4b045c70664617180c776d3d301fb7563572e66f.tar.gz
nixpkgs-4b045c70664617180c776d3d301fb7563572e66f.tar.bz2
nixpkgs-4b045c70664617180c776d3d301fb7563572e66f.tar.lz
nixpkgs-4b045c70664617180c776d3d301fb7563572e66f.tar.xz
nixpkgs-4b045c70664617180c776d3d301fb7563572e66f.tar.zst
nixpkgs-4b045c70664617180c776d3d301fb7563572e66f.zip
nixos/stage-1: Remove redundant symlink check
find(1)'s test `-type f` already excludes symbolic links, so `test -L`
will never return false for found files.
Diffstat (limited to 'nixos/modules/system/boot/stage-1.nix')
-rw-r--r--nixos/modules/system/boot/stage-1.nix10
1 files changed, 3 insertions, 7 deletions
diff --git a/nixos/modules/system/boot/stage-1.nix b/nixos/modules/system/boot/stage-1.nix
index adb8eb7ccf7..ec2bd5ef352 100644
--- a/nixos/modules/system/boot/stage-1.nix
+++ b/nixos/modules/system/boot/stage-1.nix
@@ -223,16 +223,12 @@ let
 
       # Run patchelf to make the programs refer to the copied libraries.
       find $out/bin $out/lib -type f | while read i; do
-        if ! test -L $i; then
-          nuke-refs -e $out $i
-        fi
+        nuke-refs -e $out $i
       done
 
       find $out/bin -type f | while read i; do
-        if ! test -L $i; then
-          echo "patching $i..."
-          patchelf --set-interpreter $out/lib/ld*.so.? --set-rpath $out/lib $i || true
-        fi
+        echo "patching $i..."
+        patchelf --set-interpreter $out/lib/ld*.so.? --set-rpath $out/lib $i || true
       done
 
       if [ -z "${toString (pkgs.stdenv.hostPlatform != pkgs.stdenv.buildPlatform)}" ]; then