1{ lib, androidenv, buildPackages, pkgs, targetPackages
2}:
3
4{
5 "21" =
6 let
7 ndkVersion = "21.0.6113669";
8
9 buildAndroidComposition = buildPackages.buildPackages.androidenv.composeAndroidPackages {
10 includeNDK = true;
11 inherit ndkVersion;
12 };
13
14 androidComposition = androidenv.composeAndroidPackages {
15 includeNDK = true;
16 inherit ndkVersion;
17 };
18 in
19 import ./androidndk-pkgs.nix {
20 inherit lib;
21 inherit (buildPackages)
22 makeWrapper autoPatchelfHook;
23 inherit (pkgs)
24 stdenv
25 runCommand wrapBintoolsWith wrapCCWith;
26 # buildPackages.foo rather than buildPackages.buildPackages.foo would work,
27 # but for splicing messing up on infinite recursion for the variants we
28 # *dont't* use. Using this workaround, but also making a test to ensure
29 # these two really are the same.
30 buildAndroidndk = buildAndroidComposition.ndk-bundle;
31 androidndk = androidComposition.ndk-bundle;
32 targetAndroidndkPkgs = targetPackages.androidndkPkgs_21;
33 };
34
35 "23b" =
36 let
37 ndkVersion = "23.1.7779620";
38
39 buildAndroidComposition = buildPackages.buildPackages.androidenv.composeAndroidPackages {
40 includeNDK = true;
41 inherit ndkVersion;
42 };
43
44 androidComposition = androidenv.composeAndroidPackages {
45 includeNDK = true;
46 inherit ndkVersion;
47 };
48 in
49 import ./androidndk-pkgs.nix {
50 inherit lib;
51 inherit (buildPackages)
52 makeWrapper autoPatchelfHook;
53 inherit (pkgs)
54 stdenv
55 runCommand wrapBintoolsWith wrapCCWith;
56 # buildPackages.foo rather than buildPackages.buildPackages.foo would work,
57 # but for splicing messing up on infinite recursion for the variants we
58 # *dont't* use. Using this workaround, but also making a test to ensure
59 # these two really are the same.
60 buildAndroidndk = buildAndroidComposition.ndk-bundle;
61 androidndk = androidComposition.ndk-bundle;
62 targetAndroidndkPkgs = targetPackages.androidndkPkgs_23b;
63 };
64
65 "24" =
66 let
67 ndkVersion = "24.0.8215888";
68
69 buildAndroidComposition = buildPackages.buildPackages.androidenv.composeAndroidPackages {
70 includeNDK = true;
71 inherit ndkVersion;
72 };
73
74 androidComposition = androidenv.composeAndroidPackages {
75 includeNDK = true;
76 inherit ndkVersion;
77 };
78 in
79 import ./androidndk-pkgs.nix {
80 inherit lib;
81 inherit (buildPackages)
82 makeWrapper autoPatchelfHook;
83 inherit (pkgs)
84 stdenv
85 runCommand wrapBintoolsWith wrapCCWith;
86 # buildPackages.foo rather than buildPackages.buildPackages.foo would work,
87 # but for splicing messing up on infinite recursion for the variants we
88 # *dont't* use. Using this workaround, but also making a test to ensure
89 # these two really are the same.
90 buildAndroidndk = buildAndroidComposition.ndk-bundle;
91 androidndk = androidComposition.ndk-bundle;
92 targetAndroidndkPkgs = targetPackages.androidndkPkgs_24;
93 };
94
95}