diff options
Diffstat (limited to 'nixpkgs/pkgs/development/mobile/androidenv/ndk-bundle/default.nix')
-rw-r--r-- | nixpkgs/pkgs/development/mobile/androidenv/ndk-bundle/default.nix | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/nixpkgs/pkgs/development/mobile/androidenv/ndk-bundle/default.nix b/nixpkgs/pkgs/development/mobile/androidenv/ndk-bundle/default.nix index b81fab1ed76..ca305e0398d 100644 --- a/nixpkgs/pkgs/development/mobile/androidenv/ndk-bundle/default.nix +++ b/nixpkgs/pkgs/development/mobile/androidenv/ndk-bundle/default.nix @@ -1,18 +1,24 @@ -{deployAndroidPackage, lib, package, os, autoPatchelfHook, makeWrapper, pkgs, platform-tools}: +{ lib, pkgs, pkgsHostHost, makeWrapper, autoPatchelfHook +, deployAndroidPackage, package, os, platform-tools +}: let - runtime_paths = lib.makeBinPath [ pkgs.coreutils pkgs.file pkgs.findutils pkgs.gawk pkgs.gnugrep pkgs.gnused pkgs.jdk pkgs.python3 pkgs.which ] + ":${platform-tools}/platform-tools"; + runtime_paths = lib.makeBinPath (with pkgsHostHost; [ + coreutils file findutils gawk gnugrep gnused jdk python3 which + ]) + ":${platform-tools}/platform-tools"; in deployAndroidPackage { inherit package os; buildInputs = [ autoPatchelfHook makeWrapper pkgs.python2 ] ++ lib.optional (os == "linux") [ pkgs.glibc pkgs.stdenv.cc.cc pkgs.ncurses5 pkgs.zlib pkgs.libcxx.out ]; - patchInstructions = lib.optionalString (os == "linux") '' + patchInstructions = lib.optionalString (os == "linux") ('' patchShebangs . + '' + lib.optionalString (builtins.compareVersions (lib.getVersion package) "21" > 0) '' patch -p1 \ --no-backup-if-mismatch < ${./make_standalone_toolchain.py_18.patch} wrapProgram $(pwd)/build/tools/make_standalone_toolchain.py --prefix PATH : "${runtime_paths}" + '' + '' # TODO: allow this stuff rm -rf docs tests @@ -46,6 +52,6 @@ deployAndroidPackage { do ln -sf ../libexec/android-sdk/ndk-bundle/$i $out/bin/$i done - ''; + ''); noAuditTmpdir = true; # Audit script gets invoked by the build/ component in the path for the make standalone script } |