diff --git a/pkgs/development/mobile/androidenv/androidndk-pkgs.nix b/pkgs/development/androidndk-pkgs/androidndk-pkgs.nix similarity index 100% rename from pkgs/development/mobile/androidenv/androidndk-pkgs.nix rename to pkgs/development/androidndk-pkgs/androidndk-pkgs.nix diff --git a/pkgs/development/androidndk-pkgs/default.nix b/pkgs/development/androidndk-pkgs/default.nix new file mode 100644 index 000000000000..1c34b1dff7d8 --- /dev/null +++ b/pkgs/development/androidndk-pkgs/default.nix @@ -0,0 +1,36 @@ +{ androidenv, buildPackages, pkgs, targetPackages +, includeSources ? true, licenseAccepted ? false +}: + +rec { + + "17c" = import ./androidndk-pkgs.nix { + inherit (buildPackages) + makeWrapper; + inherit (pkgs) + lib stdenv + runCommand wrapBintoolsWith wrapCCWith; + # buildPackages.foo rather than buildPackages.buildPackages.foo would work, + # but for splicing messing up on infinite recursion for the variants we + # *dont't* use. Using this workaround, but also making a test to ensure + # these two really are the same. + buildAndroidndk = buildPackages.buildPackages.androidenv.androidndk_17c; + androidndk = androidenv.androidndk_17c; + targetAndroidndkPkgs = targetPackages.androidndkPkgs_17c; + }; + + "10e" = import ./androidndk-pkgs.nix { + inherit (buildPackages) + makeWrapper; + inherit (pkgs) + lib stdenv + runCommand wrapBintoolsWith wrapCCWith; + # buildPackages.foo rather than buildPackages.buildPackages.foo would work, + # but for splicing messing up on infinite recursion for the variants we + # *dont't* use. Using this workaround, but also making a test to ensure + # these two really are the same. + buildAndroidndk = buildPackages.buildPackages.androidenv.androidndk_10e; + androidndk = androidenv.androidndk_10e; + targetAndroidndkPkgs = targetPackages.androidndkPkgs_10e; + }; +} diff --git a/pkgs/development/mobile/androidenv/default.nix b/pkgs/development/mobile/androidenv/default.nix index 282924047aa4..071e17c325d4 100644 --- a/pkgs/development/mobile/androidenv/default.nix +++ b/pkgs/development/mobile/androidenv/default.nix @@ -1,4 +1,4 @@ -{ buildPackages, pkgs, pkgs_i686, targetPackages +{ pkgs, pkgs_i686, buildPackages , includeSources ? true, licenseAccepted ? false }: @@ -341,37 +341,6 @@ rec { inherit androidsdk; }; - androidndkPkgs_17c = import ./androidndk-pkgs.nix { - inherit (buildPackages) - makeWrapper; - inherit (pkgs) - lib stdenv - runCommand wrapBintoolsWith wrapCCWith; - # buildPackages.foo rather than buildPackages.buildPackages.foo would work, - # but for splicing messing up on infinite recursion for the variants we - # *dont't* use. Using this workaround, but also making a test to ensure - # these two really are the same. - buildAndroidndk = buildPackages.buildPackages.androidenv.androidndk_17c; - androidndk = androidndk_17c; - targetAndroidndkPkgs = targetPackages.androidenv.androidndkPkgs_17c; - }; - androidndkPkgs = androidndkPkgs_17c; - - androidndkPkgs_10e = import ./androidndk-pkgs.nix { - inherit (buildPackages) - makeWrapper; - inherit (pkgs) - lib stdenv - runCommand wrapBintoolsWith wrapCCWith; - # buildPackages.foo rather than buildPackages.buildPackages.foo would work, - # but for splicing messing up on infinite recursion for the variants we - # *dont't* use. Using this workaround, but also making a test to ensure - # these two really are the same. - buildAndroidndk = buildPackages.buildPackages.androidenv.androidndk_10e; - androidndk = androidndk_10e; - targetAndroidndkPkgs = targetPackages.androidenv.androidndkPkgs_10e; - }; - buildGradleApp = import ./build-gradle-app.nix { inherit (pkgs) stdenv jdk gnumake gawk file runCommand which gradle fetchurl buildEnv; diff --git a/pkgs/stdenv/cross/default.nix b/pkgs/stdenv/cross/default.nix index a6063049a3ad..b8b1e4a258dd 100644 --- a/pkgs/stdenv/cross/default.nix +++ b/pkgs/stdenv/cross/default.nix @@ -53,7 +53,7 @@ in lib.init bootStages ++ [ cc = if crossSystem.useiOSPrebuilt or false then buildPackages.darwin.iosSdkPkgs.clang else if crossSystem.useAndroidPrebuilt or false - then buildPackages.androidenv."androidndkPkgs_${crossSystem.ndkVer}".gcc + then buildPackages."androidndkPkgs_${crossSystem.ndkVer}".gcc else buildPackages.gcc; extraNativeBuildInputs = old.extraNativeBuildInputs diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 0676f8af384d..566a4d8b40a2 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -832,6 +832,10 @@ in inherit (androidenv) androidndk; + androidndkPkgs = androidndkPkgs_17c; + androidndkPkgs_17c = (callPackage ../development/androidndk-pkgs {})."17c"; + androidndkPkgs_10e = (callPackage ../development/androidndk-pkgs {})."10e"; + androidsdk = androidenv.androidsdk_8_0; androidsdk_extras = res.androidenv.androidsdk_8_0_extras;