Commit 4b045c70 authored by Klemens Nanni's avatar Klemens Nanni
Browse files

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.
parent de77849a
Loading
Loading
Loading
Loading
+3 −7
Original line number Diff line number Diff line
@@ -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
      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
      done

      if [ -z "${toString (pkgs.stdenv.hostPlatform != pkgs.stdenv.buildPlatform)}" ]; then