androidndk: Avoid depending on target-sensative openjdk

We just need jdk for this script that helps set up toolchains. The
script might need to know about the target platform, but the interpreter
that runs it (or part of it) doesn't.
This commit is contained in:
John Ericson 2020-09-08 09:49:39 -04:00
parent e2bef8fbdc
commit 452854a13c
3 changed files with 10 additions and 6 deletions

View file

@ -1,4 +1,4 @@
{requireFile, autoPatchelfHook, pkgs, pkgs_i686, licenseAccepted ? false}:
{requireFile, autoPatchelfHook, pkgs, pkgsHostHost, pkgs_i686, licenseAccepted ? false}:
{ toolsVersion ? "25.2.5"
, platformToolsVersion ? "29.0.6"
@ -144,7 +144,7 @@ rec {
) cmakeVersions;
ndk-bundle = import ./ndk-bundle {
inherit deployAndroidPackage os autoPatchelfHook makeWrapper pkgs lib platform-tools;
inherit deployAndroidPackage os autoPatchelfHook makeWrapper pkgs pkgsHostHost lib platform-tools;
package = packages.ndk-bundle.${ndkVersion};
};

View file

@ -1,4 +1,4 @@
{ config, pkgs ? import <nixpkgs> {}
{ config, pkgs ? import <nixpkgs> {}, pkgsHostHost ? pkgs.pkgsHostHost
, pkgs_i686 ? import <nixpkgs> { system = "i686-linux"; }
, licenseAccepted ? config.android_sdk.accept_license or false
}:
@ -6,7 +6,7 @@
rec {
composeAndroidPackages = import ./compose-android-packages.nix {
inherit (pkgs) requireFile autoPatchelfHook;
inherit pkgs pkgs_i686 licenseAccepted;
inherit pkgs pkgsHostHost pkgs_i686 licenseAccepted;
};
buildApp = import ./build-app.nix {

View file

@ -1,7 +1,11 @@
{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;