summary refs log tree commit diff
path: root/pkgs/build-support/setup-hooks/patch-shebangs.sh
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/build-support/setup-hooks/patch-shebangs.sh')
-rw-r--r--pkgs/build-support/setup-hooks/patch-shebangs.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/pkgs/build-support/setup-hooks/patch-shebangs.sh b/pkgs/build-support/setup-hooks/patch-shebangs.sh
index 5a7f23b2d81..c51fce708f3 100644
--- a/pkgs/build-support/setup-hooks/patch-shebangs.sh
+++ b/pkgs/build-support/setup-hooks/patch-shebangs.sh
@@ -7,6 +7,12 @@
 
 fixupOutputHooks+=('if [ -z "$dontPatchShebangs" ]; then patchShebangs "$prefix"; fi')
 
+preConfigurePhases+=" patchShebangsPhase"
+
+patchShebangsPhase() {
+    if [ -z "$dontPatchSourceShebangs" ]; then patchShebangs "."; fi
+}
+
 patchShebangs() {
     local dir="$1"
     header "patching script interpreter paths in $dir"