Merge pull request #115229 from rolfschr/android-fix-shebang-in-make-standalone-toolchain

This commit is contained in:
Sandro 2021-03-30 16:59:38 +02:00 committed by GitHub
commit 151d746ab5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -14,10 +14,14 @@ deployAndroidPackage {
patchInstructions = lib.optionalString (os == "linux") (''
patchShebangs .
# Fix the shebangs of the auto-generated scripts.
substituteInPlace ./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
wrapProgram $(pwd)/build/tools/make_standalone_toolchain.py --prefix PATH : "${runtime_paths}"
wrapProgram ./build/tools/make_standalone_toolchain.py --prefix PATH : "${runtime_paths}"
'' + ''
# TODO: allow this stuff