nixpkgs/pkgs/development/mobile/androidenv/default.nix

317 lines
8.7 KiB
Nix
Raw Normal View History

{ buildPackages, pkgs, pkgs_i686, targetPackages
, includeSources ? true
}:
2018-06-21 17:48:05 +01:00
# TODO: use callPackage instead of import to avoid so many inherits
rec {
platformTools = import ./platform-tools.nix {
inherit buildPackages pkgs;
};
2018-02-21 02:34:29 +00:00
buildTools = import ./build-tools.nix {
inherit (pkgs) stdenv fetchurl unzip zlib file;
stdenv_32bit = pkgs_i686.stdenv;
zlib_32bit = pkgs_i686.zlib;
ncurses_32bit = pkgs_i686.ncurses5;
ncurses = pkgs.ncurses5;
};
2018-02-21 02:34:29 +00:00
support = import ./support.nix {
inherit (pkgs) stdenv fetchurl unzip;
};
2018-02-21 02:34:29 +00:00
supportRepository = import ./support-repository.nix {
inherit (pkgs) stdenv fetchurl unzip;
};
platforms = if (pkgs.stdenv.system == "i686-linux" || pkgs.stdenv.system == "x86_64-linux")
then import ./platforms-linux.nix {
inherit (pkgs) stdenv fetchurl unzip;
}
else if pkgs.stdenv.system == "x86_64-darwin"
then import ./platforms-macosx.nix {
inherit (pkgs) stdenv fetchurl unzip;
}
else throw "Platform: ${pkgs.stdenv.system} not supported!";
sysimages = import ./sysimages.nix {
inherit (pkgs) stdenv fetchurl unzip;
};
addons = import ./addons.nix {
inherit (pkgs) stdenv fetchurl unzip;
};
2016-10-09 11:11:55 +01:00
sources = import ./sources.nix {
inherit (pkgs) stdenv fetchurl unzip;
};
androidsdk = import ./androidsdk.nix {
2018-06-21 17:48:05 +01:00
inherit (pkgs) stdenv fetchurl unzip makeWrapper zlib
glxinfo freetype fontconfig glib gtk2 atk
libGLU_combined file alsaLib jdk coreutils
libpulseaudio dbus fetchzip;
inherit (pkgs.xorg) libX11 libXext libXrender
libxcb libXau libXdmcp libXtst xkeyboardconfig;
2018-02-21 02:34:29 +00:00
2018-06-21 17:48:05 +01:00
inherit platformTools buildTools support
supportRepository platforms sysimages
addons sources includeSources;
2018-02-21 02:34:29 +00:00
stdenv_32bit = pkgs_i686.stdenv;
};
2018-02-21 02:34:29 +00:00
2014-05-25 10:30:58 +01:00
androidsdk_2_1 = androidsdk {
platformVersions = [ "7" ];
abiVersions = [ "armeabi-v7a" ];
useGoogleAPIs = true;
};
2018-02-21 02:34:29 +00:00
androidsdk_2_2 = androidsdk {
platformVersions = [ "8" ];
abiVersions = [ "armeabi-v7a" ];
useGoogleAPIs = true;
};
androidsdk_2_3_3 = androidsdk {
platformVersions = [ "10" ];
abiVersions = [ "armeabi-v7a" ];
useGoogleAPIs = true;
};
2018-02-21 02:34:29 +00:00
androidsdk_3_0 = androidsdk {
platformVersions = [ "11" ];
abiVersions = [ "armeabi-v7a" ];
useGoogleAPIs = true;
};
2018-02-21 02:34:29 +00:00
androidsdk_3_1 = androidsdk {
platformVersions = [ "12" ];
abiVersions = [ "armeabi-v7a" ];
useGoogleAPIs = true;
};
2018-02-21 02:34:29 +00:00
androidsdk_3_2 = androidsdk {
platformVersions = [ "13" ];
abiVersions = [ "armeabi-v7a" ];
useGoogleAPIs = true;
};
2018-02-21 02:34:29 +00:00
androidsdk_4_0 = androidsdk {
platformVersions = [ "14" ];
abiVersions = [ "armeabi-v7a" ];
useGoogleAPIs = true;
};
2018-02-21 02:34:29 +00:00
androidsdk_4_0_3 = androidsdk {
platformVersions = [ "15" ];
abiVersions = [ "armeabi-v7a" ];
useGoogleAPIs = true;
};
2018-02-21 02:34:29 +00:00
androidsdk_4_1 = androidsdk {
platformVersions = [ "16" ];
abiVersions = [ "armeabi-v7a" ];
useGoogleAPIs = true;
};
2018-02-21 02:34:29 +00:00
androidsdk_4_2 = androidsdk {
platformVersions = [ "17" ];
abiVersions = [ "armeabi-v7a" ];
useGoogleAPIs = true;
};
2018-02-21 02:34:29 +00:00
androidsdk_4_3 = androidsdk {
platformVersions = [ "18" ];
abiVersions = [ "armeabi-v7a" "x86" ];
useGoogleAPIs = true;
};
2014-05-25 10:30:58 +01:00
androidsdk_4_4 = androidsdk {
platformVersions = [ "19" ];
abiVersions = [ "armeabi-v7a" "x86" ];
useGoogleAPIs = true;
};
androidsdk_5_0_1 = androidsdk {
platformVersions = [ "21" ];
abiVersions = [ "armeabi-v7a" "x86" ];
useGoogleAPIs = true;
};
androidsdk_5_0_1_extras = androidsdk {
platformVersions = [ "21" ];
abiVersions = [ "armeabi-v7a" "x86" ];
useGoogleAPIs = true;
useExtraSupportLibs = true;
useGooglePlayServices = true;
};
androidsdk_5_1_1 = androidsdk {
platformVersions = [ "22" ];
abiVersions = [ "armeabi-v7a" "x86" "x86_64"];
useGoogleAPIs = true;
};
androidsdk_5_1_1_extras = androidsdk {
platformVersions = [ "22" ];
abiVersions = [ "armeabi-v7a" "x86" "x86_64"];
useGoogleAPIs = true;
useExtraSupportLibs = true;
useGooglePlayServices = true;
};
2018-02-21 02:34:29 +00:00
androidsdk_6_0 = androidsdk {
platformVersions = [ "23" ];
abiVersions = [ "armeabi-v7a" "x86" "x86_64"];
useGoogleAPIs = true;
};
androidsdk_6_0_extras = androidsdk {
platformVersions = [ "23" ];
abiVersions = [ "armeabi-v7a" "x86" "x86_64"];
useGoogleAPIs = true;
useExtraSupportLibs = true;
useGooglePlayServices = true;
useInstantApps = true;
};
androidsdk_7_0 = androidsdk {
platformVersions = [ "24" ];
abiVersions = [ "x86" "x86_64"];
useGoogleAPIs = true;
};
androidsdk_7_0_extras = androidsdk {
platformVersions = [ "24" ];
abiVersions = [ "x86" "x86_64"];
useGoogleAPIs = true;
useExtraSupportLibs = true;
useGooglePlayServices = true;
useInstantApps = true;
};
androidsdk_7_1_1 = androidsdk {
platformVersions = [ "25" ];
abiVersions = [ "x86" "x86_64"];
useGoogleAPIs = true;
};
androidsdk_7_1_1_extras = androidsdk {
platformVersions = [ "25" ];
abiVersions = [ "x86" "x86_64"];
useGoogleAPIs = true;
useExtraSupportLibs = true;
useGooglePlayServices = true;
useInstantApps = true;
};
2017-08-05 14:22:18 +01:00
androidsdk_8_0 = androidsdk {
platformVersions = [ "26" ];
abiVersions = [ "x86" "x86_64"];
useGoogleAPIs = true;
};
androidsdk_8_0_extras = androidsdk {
platformVersions = [ "26" ];
abiVersions = [ "x86" "x86_64"];
useGoogleAPIs = true;
useExtraSupportLibs = true;
useGooglePlayServices = true;
useInstantApps = true;
2017-08-05 14:22:18 +01:00
};
androidsdk_latest = androidsdk_8_0;
2018-05-15 16:45:48 +01:00
androidndk_10e = import ./androidndk.nix {
inherit (buildPackages)
2018-06-22 21:48:54 +01:00
unzip makeWrapper;
2018-05-15 16:45:48 +01:00
inherit (pkgs)
stdenv fetchurl zlib ncurses5 lib python3 libcxx
2018-05-15 16:45:48 +01:00
coreutils file findutils gawk gnugrep gnused jdk which;
inherit platformTools;
version = "10e";
sha256 = "032j3sgk93bjbkny84i17ph61dhjmsax9ddqng1zbi2p7dgl0pzf";
};
androidndk_16b = import ./androidndk.nix {
inherit (buildPackages)
2018-06-22 21:48:54 +01:00
unzip makeWrapper;
2018-05-15 16:45:48 +01:00
inherit (pkgs)
stdenv fetchurl zlib ncurses5 lib python3 libcxx
2018-05-15 16:45:48 +01:00
coreutils file findutils gawk gnugrep gnused jdk which;
inherit platformTools;
version = "16b";
sha256 = "00frcnvpcsngv00p6l2vxj4cwi2mwcm9lnjvm3zv4wrp6pss9pmw";
};
androidndk_17 = import ./androidndk.nix {
inherit (buildPackages)
2018-06-22 21:48:54 +01:00
unzip makeWrapper;
inherit (pkgs)
stdenv fetchurl zlib ncurses5 lib python3 libcxx
coreutils file findutils gawk gnugrep gnused jdk which;
inherit platformTools;
2018-05-15 16:45:48 +01:00
version = "17";
sha256 = "1jj3zy958zsidywqd5nwdyrnr72rf9zhippkl8rbqxfy8wxq2gds";
};
androidndk = androidndk_17;
androidndk_r8e = import ./androidndk_r8e.nix {
inherit (buildPackages)
makeWrapper;
inherit (pkgs)
stdenv fetchurl zlib ncurses lib
coreutils file findutils gawk gnugrep gnused jdk which;
inherit platformTools;
};
2018-02-21 02:34:29 +00:00
buildApp = import ./build-app.nix {
inherit (pkgs) stdenv jdk ant gnumake gawk file which;
inherit androidsdk androidndk;
};
2018-02-21 02:34:29 +00:00
emulateApp = import ./emulate-app.nix {
inherit (pkgs) stdenv;
inherit androidsdk;
};
androidndkPkgs_17 = import ./androidndk-pkgs.nix {
inherit (buildPackages)
makeWrapper;
inherit (pkgs)
lib hostPlatform targetPlatform
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_17;
androidndk = androidndk_17;
targetAndroidndkPkgs = targetPackages.androidenv.androidndkPkgs_17;
};
androidndkPkgs = androidndkPkgs_17;
2018-05-17 16:22:27 +01:00
androidndkPkgs_10e = import ./androidndk-pkgs.nix {
inherit (buildPackages)
makeWrapper;
inherit (pkgs)
lib hostPlatform targetPlatform
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;
};
2017-05-16 20:27:27 +01:00
buildGradleApp = import ./build-gradle-app.nix {
2018-06-21 17:48:05 +01:00
inherit (pkgs) stdenv jdk gnumake gawk file runCommand
which gradle fetchurl buildEnv;
2017-05-16 20:27:27 +01:00
inherit androidsdk androidndk;
};
}