about summary refs log tree commit diff
path: root/pkgs/development/androidndk-pkgs/default.nix
blob: 341cdf72028d81fff238537e920ed2fe3c3919b1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
{ androidenv, buildPackages, pkgs, targetPackages
, includeSources ? true, licenseAccepted ? false
}:

rec {
  "18b" =
    let
      ndkVersion = "18.1.5063045";

      buildAndroidComposition = buildPackages.buildPackages.androidenv.composeAndroidPackages {
        includeNDK = true;
        inherit ndkVersion;
      };

      androidComposition = androidenv.composeAndroidPackages {
        includeNDK = true;
        inherit ndkVersion;
      };
    in
    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 = buildAndroidComposition.ndk-bundle;
      androidndk = androidComposition.ndk-bundle;
      targetAndroidndkPkgs = targetPackages.androidndkPkgs_18b;
    };
}