diff options
author | Rolf Schröder <rolf.schr@gmail.com> | 2021-03-06 06:30:58 +0100 |
---|---|---|
committer | Rolf Schröder <rolf.schr@gmail.com> | 2021-03-09 21:13:28 +0100 |
commit | 2985284ccbff8f9774079ce2d7f02cf328776705 (patch) | |
tree | 1d3f4bd259e27d974e0d25eaf19763b1b5eabae5 /pkgs/development/mobile | |
parent | 15a64b2facc1b91f4361bdd101576e8886ef834b (diff) | |
download | nixpkgs-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.nix | 4 |
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 |