diff options
Diffstat (limited to 'pkgs/build-support/builder-defs/builder-defs.nix')
-rw-r--r-- | pkgs/build-support/builder-defs/builder-defs.nix | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/pkgs/build-support/builder-defs/builder-defs.nix b/pkgs/build-support/builder-defs/builder-defs.nix index 3c5d7af621c8..e22aa6bc66ef 100644 --- a/pkgs/build-support/builder-defs/builder-defs.nix +++ b/pkgs/build-support/builder-defs/builder-defs.nix @@ -565,13 +565,15 @@ let inherit (builtins) head tail trace; in # Interpreters that are already in the store are left untouched. echo "patching script interpreter paths" local f - for f in $(find "${dir}" -type f -perm +0100); do + for f in $(find "${dir}" -xtype f -perm +0100); do local oldPath=$(sed -ne '1 s,^#![ ]*\([^ ]*\).*$,\1,p' "$f") if test -n "$oldPath" -a "''${oldPath:0:''${#NIX_STORE}}" != "$NIX_STORE"; then local newPath=$(type -P $(basename $oldPath) || true) if test -n "$newPath" -a "$newPath" != "$oldPath"; then echo "$f: interpreter changed from $oldPath to $newPath" sed -i "1 s,$oldPath,$newPath," "$f" + else + echo "$f: not changing interpreter from $oldPath" fi fi done |