diff options
author | Matthew Bauer <mjbauer95@gmail.com> | 2018-10-31 15:34:45 -0500 |
---|---|---|
committer | Matthew Bauer <mjbauer95@gmail.com> | 2018-11-02 00:27:14 -0500 |
commit | eb7c50a993833ecdb94cc3affb55ac4c560edf50 (patch) | |
tree | ab4af2fc257cbbabfa81100474a403c5da3004e2 /pkgs/build-support/setup-hooks/patch-shebangs.sh | |
parent | bde99096a80e74692795fa2782619c46a476839e (diff) | |
download | nixpkgs-eb7c50a993833ecdb94cc3affb55ac4c560edf50.tar nixpkgs-eb7c50a993833ecdb94cc3affb55ac4c560edf50.tar.gz nixpkgs-eb7c50a993833ecdb94cc3affb55ac4c560edf50.tar.bz2 nixpkgs-eb7c50a993833ecdb94cc3affb55ac4c560edf50.tar.lz nixpkgs-eb7c50a993833ecdb94cc3affb55ac4c560edf50.tar.xz nixpkgs-eb7c50a993833ecdb94cc3affb55ac4c560edf50.tar.zst nixpkgs-eb7c50a993833ecdb94cc3affb55ac4c560edf50.zip |
patch-shebangs: use --build for auto patch shebangs
In strictDeps=false, autoPatchshebangs should use --build (corresponding to PATH) to lookup commands. This restores the previous behavior of patchshebangs so that we don’t break stuff that isn’t careful in the buildInputs vs. nativeBuildInputs distinction. Unfortunately this won’t work under cross compilation.
Diffstat (limited to 'pkgs/build-support/setup-hooks/patch-shebangs.sh')
-rw-r--r-- | pkgs/build-support/setup-hooks/patch-shebangs.sh | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/pkgs/build-support/setup-hooks/patch-shebangs.sh b/pkgs/build-support/setup-hooks/patch-shebangs.sh index 441f230869b..b35c3c87625 100644 --- a/pkgs/build-support/setup-hooks/patch-shebangs.sh +++ b/pkgs/build-support/setup-hooks/patch-shebangs.sh @@ -102,10 +102,12 @@ patchShebangs() { patchShebangsAuto () { if [ -z "$dontPatchShebangs" -a -e "$prefix" ]; then + if [ -z "${strictDeps-}"]; then + patchShebangs --build "$prefix" # Dev output will end up being run on the build platform. An # example case of this is sdl2-config. Otherwise, we can just # use the runtime path (--host). - if [ "$output" != out ] && [ "$output" = "${!outputDev}" ]; then + elif [ "$output" != out ] && [ "$output" = "${!outputDev}" ]; then patchShebangs --build "$prefix" else patchShebangs --host "$prefix" |