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.
This commit is contained in:
parent
15a64b2fac
commit
2985284ccb
1 changed files with 4 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue