summary refs log tree commit diff
path: root/pkgs/development/mobile
diff options
context:
space:
mode:
authorRolf Schröder <rolf.schr@gmail.com>2021-03-06 06:30:58 +0100
committerRolf Schröder <rolf.schr@gmail.com>2021-03-09 21:13:28 +0100
commit2985284ccbff8f9774079ce2d7f02cf328776705 (patch)
tree1d3f4bd259e27d974e0d25eaf19763b1b5eabae5 /pkgs/development/mobile
parent15a64b2facc1b91f4361bdd101576e8886ef834b (diff)
downloadnixpkgs-2985284ccbff8f9774079ce2d7f02cf328776705.tar
nixpkgs-2985284ccbff8f9774079ce2d7f02cf328776705.tar.gz
nixpkgs-2985284ccbff8f9774079ce2d7f02cf328776705.tar.bz2
nixpkgs-2985284ccbff8f9774079ce2d7f02cf328776705.tar.lz
nixpkgs-2985284ccbff8f9774079ce2d7f02cf328776705.tar.xz
nixpkgs-2985284ccbff8f9774079ce2d7f02cf328776705.tar.zst
nixpkgs-2985284ccbff8f9774079ce2d7f02cf328776705.zip
android: Fix shebangs in auto-generated android toolchain scripts
The script make_standalone_toolchain.py autogenerates some shell scripts
when invoked. These scripts have a hardcoded shebang of '#!/bin/bash'.
The generated scripts obviously do not work in a Nix environment. This
commit makes sure the scripts have the correct shebang.
Diffstat (limited to 'pkgs/development/mobile')
-rw-r--r--pkgs/development/mobile/androidenv/ndk-bundle/default.nix4
1 files changed, 4 insertions, 0 deletions
diff --git a/pkgs/development/mobile/androidenv/ndk-bundle/default.nix b/pkgs/development/mobile/androidenv/ndk-bundle/default.nix
index f74b949a7b3..5b7d5a3f1ba 100644
--- a/pkgs/development/mobile/androidenv/ndk-bundle/default.nix
+++ b/pkgs/development/mobile/androidenv/ndk-bundle/default.nix
@@ -14,6 +14,10 @@ deployAndroidPackage {
   patchInstructions = lib.optionalString (os == "linux") (''
     patchShebangs .
 
+    # Fix the shebangs of the auto-generated scripts.
+    substituteInPlace $(pwd)/build/tools/make_standalone_toolchain.py \
+      --replace '#!/bin/bash' '#!${pkgs.bash}/bin/bash'
+
   '' + lib.optionalString (builtins.compareVersions (lib.getVersion package) "21" > 0) ''
     patch -p1 \
       --no-backup-if-mismatch < ${./make_standalone_toolchain.py_18.patch} || true