2018-02-21 00:31:16 +01:00
|
|
|
{ buildPackages, pkgs, pkgs_i686, targetPackages
|
2018-10-23 01:00:14 +02:00
|
|
|
, includeSources ? true, licenseAccepted ? false
|
2018-02-21 00:31:16 +01:00
|
|
|
}:
|
2012-11-07 21:10:39 +01:00
|
|
|
|
2018-06-21 18:48:05 +02:00
|
|
|
# TODO: use callPackage instead of import to avoid so many inherits
|
|
|
|
|
2012-11-07 21:10:39 +01:00
|
|
|
rec {
|
|
|
|
platformTools = import ./platform-tools.nix {
|
2018-02-21 00:31:16 +01:00
|
|
|
inherit buildPackages pkgs;
|
2012-11-07 21:10:39 +01:00
|
|
|
};
|
2018-02-21 03:34:29 +01:00
|
|
|
|
2018-10-27 05:26:51 +02:00
|
|
|
buildToolsSources = let
|
|
|
|
system = pkgs.stdenv.hostPlatform.system;
|
|
|
|
path = if (system == "i686-linux" || system == "x86_64-linux")
|
|
|
|
then ./build-tools-srcs-linux.nix
|
|
|
|
else if system == "x86_64-darwin"
|
|
|
|
then ./build-tools-srcs-macosx.nix
|
|
|
|
else throw "System: ${system} not supported!";
|
|
|
|
in
|
|
|
|
import path { inherit (pkgs) fetchurl; };
|
|
|
|
|
2013-07-31 16:00:57 +02:00
|
|
|
buildTools = import ./build-tools.nix {
|
2018-10-27 05:26:51 +02:00
|
|
|
inherit (pkgs) stdenv lib fetchurl unzip zlib file coreutils;
|
|
|
|
inherit buildToolsSources;
|
2013-07-31 16:00:57 +02:00
|
|
|
stdenv_32bit = pkgs_i686.stdenv;
|
|
|
|
zlib_32bit = pkgs_i686.zlib;
|
2016-09-13 22:39:20 +02:00
|
|
|
ncurses_32bit = pkgs_i686.ncurses5;
|
|
|
|
ncurses = pkgs.ncurses5;
|
2013-07-31 16:00:57 +02:00
|
|
|
};
|
2018-02-21 03:34:29 +01:00
|
|
|
|
2012-11-07 21:10:39 +01:00
|
|
|
support = import ./support.nix {
|
|
|
|
inherit (pkgs) stdenv fetchurl unzip;
|
|
|
|
};
|
2018-02-21 03:34:29 +01:00
|
|
|
|
2014-08-02 03:26:21 +02:00
|
|
|
supportRepository = import ./support-repository.nix {
|
|
|
|
inherit (pkgs) stdenv fetchurl unzip;
|
|
|
|
};
|
|
|
|
|
2018-08-20 21:11:29 +02:00
|
|
|
platforms = if (pkgs.stdenv.hostPlatform.system == "i686-linux" || pkgs.stdenv.hostPlatform.system == "x86_64-linux")
|
2012-11-07 21:10:39 +01:00
|
|
|
then import ./platforms-linux.nix {
|
|
|
|
inherit (pkgs) stdenv fetchurl unzip;
|
|
|
|
}
|
2018-08-20 21:11:29 +02:00
|
|
|
else if pkgs.stdenv.hostPlatform.system == "x86_64-darwin"
|
2012-11-07 21:10:39 +01:00
|
|
|
then import ./platforms-macosx.nix {
|
|
|
|
inherit (pkgs) stdenv fetchurl unzip;
|
|
|
|
}
|
2018-08-20 21:11:29 +02:00
|
|
|
else throw "Platform: ${pkgs.stdenv.hostPlatform.system} not supported!";
|
2012-11-07 21:10:39 +01:00
|
|
|
|
|
|
|
sysimages = import ./sysimages.nix {
|
|
|
|
inherit (pkgs) stdenv fetchurl unzip;
|
|
|
|
};
|
|
|
|
|
|
|
|
addons = import ./addons.nix {
|
|
|
|
inherit (pkgs) stdenv fetchurl unzip;
|
|
|
|
};
|
|
|
|
|
2016-10-09 12:11:55 +02:00
|
|
|
sources = import ./sources.nix {
|
|
|
|
inherit (pkgs) stdenv fetchurl unzip;
|
|
|
|
};
|
|
|
|
|
2012-11-07 21:10:39 +01:00
|
|
|
androidsdk = import ./androidsdk.nix {
|
2018-06-21 18:48:05 +02: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 03:34:29 +01:00
|
|
|
|
2018-06-21 18:48:05 +02:00
|
|
|
inherit platformTools buildTools support
|
|
|
|
supportRepository platforms sysimages
|
2018-10-23 01:00:14 +02:00
|
|
|
addons sources includeSources licenseAccepted;
|
2018-02-21 03:34:29 +01:00
|
|
|
|
2012-11-07 21:10:39 +01:00
|
|
|
stdenv_32bit = pkgs_i686.stdenv;
|
|
|
|
};
|
2018-02-21 03:34:29 +01:00
|
|
|
|
2014-05-25 11:30:58 +02:00
|
|
|
androidsdk_2_1 = androidsdk {
|
|
|
|
platformVersions = [ "7" ];
|
|
|
|
abiVersions = [ "armeabi-v7a" ];
|
|
|
|
useGoogleAPIs = true;
|
|
|
|
};
|
2018-02-21 03:34:29 +01:00
|
|
|
|
2014-01-13 13:25:12 +01:00
|
|
|
androidsdk_2_2 = androidsdk {
|
|
|
|
platformVersions = [ "8" ];
|
|
|
|
abiVersions = [ "armeabi-v7a" ];
|
|
|
|
useGoogleAPIs = true;
|
|
|
|
};
|
2014-09-02 14:05:09 +02:00
|
|
|
|
|
|
|
androidsdk_2_3_3 = androidsdk {
|
|
|
|
platformVersions = [ "10" ];
|
|
|
|
abiVersions = [ "armeabi-v7a" ];
|
|
|
|
useGoogleAPIs = true;
|
|
|
|
};
|
2018-02-21 03:34:29 +01:00
|
|
|
|
2014-09-02 14:05:09 +02:00
|
|
|
androidsdk_3_0 = androidsdk {
|
|
|
|
platformVersions = [ "11" ];
|
|
|
|
abiVersions = [ "armeabi-v7a" ];
|
|
|
|
useGoogleAPIs = true;
|
|
|
|
};
|
2018-02-21 03:34:29 +01:00
|
|
|
|
2014-09-02 14:05:09 +02:00
|
|
|
androidsdk_3_1 = androidsdk {
|
|
|
|
platformVersions = [ "12" ];
|
|
|
|
abiVersions = [ "armeabi-v7a" ];
|
|
|
|
useGoogleAPIs = true;
|
|
|
|
};
|
2018-02-21 03:34:29 +01:00
|
|
|
|
2014-09-02 14:05:09 +02:00
|
|
|
androidsdk_3_2 = androidsdk {
|
|
|
|
platformVersions = [ "13" ];
|
|
|
|
abiVersions = [ "armeabi-v7a" ];
|
|
|
|
useGoogleAPIs = true;
|
|
|
|
};
|
2018-02-21 03:34:29 +01:00
|
|
|
|
2014-01-13 13:25:12 +01:00
|
|
|
androidsdk_4_0 = androidsdk {
|
2014-09-02 14:05:09 +02:00
|
|
|
platformVersions = [ "14" ];
|
|
|
|
abiVersions = [ "armeabi-v7a" ];
|
|
|
|
useGoogleAPIs = true;
|
|
|
|
};
|
2018-02-21 03:34:29 +01:00
|
|
|
|
2014-09-02 14:05:09 +02:00
|
|
|
androidsdk_4_0_3 = androidsdk {
|
2014-01-13 13:25:12 +01:00
|
|
|
platformVersions = [ "15" ];
|
|
|
|
abiVersions = [ "armeabi-v7a" ];
|
|
|
|
useGoogleAPIs = true;
|
|
|
|
};
|
2018-02-21 03:34:29 +01:00
|
|
|
|
2012-11-08 13:55:53 +01:00
|
|
|
androidsdk_4_1 = androidsdk {
|
|
|
|
platformVersions = [ "16" ];
|
2013-07-31 18:56:27 +02:00
|
|
|
abiVersions = [ "armeabi-v7a" ];
|
2012-11-08 13:55:53 +01:00
|
|
|
useGoogleAPIs = true;
|
|
|
|
};
|
2018-02-21 03:34:29 +01:00
|
|
|
|
2013-08-01 11:21:54 +02:00
|
|
|
androidsdk_4_2 = androidsdk {
|
|
|
|
platformVersions = [ "17" ];
|
|
|
|
abiVersions = [ "armeabi-v7a" ];
|
|
|
|
useGoogleAPIs = true;
|
|
|
|
};
|
2018-02-21 03:34:29 +01:00
|
|
|
|
2013-09-18 13:07:47 +02:00
|
|
|
androidsdk_4_3 = androidsdk {
|
|
|
|
platformVersions = [ "18" ];
|
|
|
|
abiVersions = [ "armeabi-v7a" "x86" ];
|
|
|
|
useGoogleAPIs = true;
|
|
|
|
};
|
2014-04-20 11:29:10 +02:00
|
|
|
|
2014-05-25 11:30:58 +02:00
|
|
|
androidsdk_4_4 = androidsdk {
|
|
|
|
platformVersions = [ "19" ];
|
|
|
|
abiVersions = [ "armeabi-v7a" "x86" ];
|
|
|
|
useGoogleAPIs = true;
|
|
|
|
};
|
|
|
|
|
2014-12-16 08:22:55 +01:00
|
|
|
androidsdk_5_0_1 = androidsdk {
|
|
|
|
platformVersions = [ "21" ];
|
|
|
|
abiVersions = [ "armeabi-v7a" "x86" ];
|
|
|
|
useGoogleAPIs = true;
|
|
|
|
};
|
|
|
|
|
2015-03-01 21:31:41 +01:00
|
|
|
androidsdk_5_0_1_extras = androidsdk {
|
|
|
|
platformVersions = [ "21" ];
|
|
|
|
abiVersions = [ "armeabi-v7a" "x86" ];
|
|
|
|
useGoogleAPIs = true;
|
|
|
|
useExtraSupportLibs = true;
|
|
|
|
useGooglePlayServices = true;
|
|
|
|
};
|
|
|
|
|
2015-05-02 15:15:29 +02:00
|
|
|
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 03:34:29 +01:00
|
|
|
|
2015-10-06 15:26:53 +02:00
|
|
|
androidsdk_6_0 = androidsdk {
|
|
|
|
platformVersions = [ "23" ];
|
|
|
|
abiVersions = [ "armeabi-v7a" "x86" "x86_64"];
|
|
|
|
useGoogleAPIs = true;
|
|
|
|
};
|
2015-05-02 15:15:29 +02:00
|
|
|
|
2015-10-18 12:02:23 +02:00
|
|
|
androidsdk_6_0_extras = androidsdk {
|
|
|
|
platformVersions = [ "23" ];
|
|
|
|
abiVersions = [ "armeabi-v7a" "x86" "x86_64"];
|
|
|
|
useGoogleAPIs = true;
|
|
|
|
useExtraSupportLibs = true;
|
|
|
|
useGooglePlayServices = true;
|
2017-09-09 16:23:20 +02:00
|
|
|
useInstantApps = true;
|
2015-10-18 12:02:23 +02:00
|
|
|
};
|
|
|
|
|
2016-06-19 04:26:34 +02:00
|
|
|
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;
|
2017-09-09 16:23:20 +02:00
|
|
|
useInstantApps = true;
|
2016-06-19 04:26:34 +02:00
|
|
|
};
|
|
|
|
|
2017-06-10 03:32:25 +02:00
|
|
|
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;
|
2017-09-09 16:23:20 +02:00
|
|
|
useInstantApps = true;
|
2017-06-10 03:32:25 +02:00
|
|
|
};
|
|
|
|
|
2017-08-05 15:22:18 +02: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;
|
2017-09-09 16:23:20 +02:00
|
|
|
useInstantApps = true;
|
2017-08-05 15:22:18 +02:00
|
|
|
};
|
|
|
|
|
2018-10-26 18:48:25 +02:00
|
|
|
androidsdk_8_1 = androidsdk {
|
|
|
|
platformVersions = [ "27" ];
|
|
|
|
abiVersions = [ "x86" "x86_64"];
|
|
|
|
useGoogleAPIs = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
androidsdk_8_1_extras = androidsdk {
|
|
|
|
platformVersions = [ "27" ];
|
|
|
|
abiVersions = [ "x86" "x86_64"];
|
|
|
|
useGoogleAPIs = true;
|
|
|
|
useExtraSupportLibs = true;
|
|
|
|
useGooglePlayServices = true;
|
|
|
|
useInstantApps = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
androidsdk_9_0 = androidsdk {
|
|
|
|
platformVersions = [ "28" ];
|
|
|
|
abiVersions = [ "x86" "x86_64"];
|
|
|
|
useGoogleAPIs = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
androidsdk_9_0_extras = androidsdk {
|
|
|
|
platformVersions = [ "28" ];
|
|
|
|
abiVersions = [ "x86" "x86_64"];
|
|
|
|
useGoogleAPIs = true;
|
|
|
|
useExtraSupportLibs = true;
|
|
|
|
useGooglePlayServices = true;
|
|
|
|
useInstantApps = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
androidsdk_latest = androidsdk_9_0;
|
2018-06-21 22:09:11 +02:00
|
|
|
|
2018-07-10 09:09:34 +02:00
|
|
|
androidndk_10e = pkgs.callPackage ./androidndk.nix {
|
2018-05-15 17:45:48 +02:00
|
|
|
inherit (buildPackages)
|
2018-06-22 22:48:54 +02:00
|
|
|
unzip makeWrapper;
|
2018-05-15 17:45:48 +02:00
|
|
|
inherit (pkgs)
|
2018-05-24 14:38:27 +02:00
|
|
|
stdenv fetchurl zlib ncurses5 lib python3 libcxx
|
2018-05-15 17:45:48 +02:00
|
|
|
coreutils file findutils gawk gnugrep gnused jdk which;
|
|
|
|
inherit platformTools;
|
|
|
|
version = "10e";
|
2018-09-18 04:34:37 +02:00
|
|
|
sha1s = {
|
|
|
|
x86_64-darwin = "6be8598e4ed3d9dd42998c8cb666f0ee502b1294";
|
|
|
|
x86_64-linux = "f692681b007071103277f6edc6f91cb5c5494a32";
|
|
|
|
};
|
2018-05-15 17:45:48 +02:00
|
|
|
};
|
|
|
|
|
2018-07-10 09:09:34 +02:00
|
|
|
androidndk_16b = pkgs.callPackage ./androidndk.nix {
|
2018-05-15 17:45:48 +02:00
|
|
|
inherit (buildPackages)
|
2018-06-22 22:48:54 +02:00
|
|
|
unzip makeWrapper;
|
2018-05-15 17:45:48 +02:00
|
|
|
inherit (pkgs)
|
2018-05-24 14:38:27 +02:00
|
|
|
stdenv fetchurl zlib ncurses5 lib python3 libcxx
|
2018-05-15 17:45:48 +02:00
|
|
|
coreutils file findutils gawk gnugrep gnused jdk which;
|
|
|
|
inherit platformTools;
|
|
|
|
version = "16b";
|
2018-09-18 04:34:37 +02:00
|
|
|
sha1s = {
|
|
|
|
x86_64-darwin = "e51e615449b98c716cf912057e2682e75d55e2de";
|
|
|
|
x86_64-linux = "42aa43aae89a50d1c66c3f9fdecd676936da6128";
|
|
|
|
};
|
2018-05-15 17:45:48 +02:00
|
|
|
};
|
|
|
|
|
2018-09-18 04:34:37 +02:00
|
|
|
androidndk_17c = pkgs.callPackage ./androidndk.nix {
|
2018-02-21 00:31:16 +01:00
|
|
|
inherit (buildPackages)
|
2018-06-22 22:48:54 +02:00
|
|
|
unzip makeWrapper;
|
2018-02-21 00:31:16 +01:00
|
|
|
inherit (pkgs)
|
2018-05-24 14:38:27 +02:00
|
|
|
stdenv fetchurl zlib ncurses5 lib python3 libcxx
|
2018-02-21 00:31:16 +01:00
|
|
|
coreutils file findutils gawk gnugrep gnused jdk which;
|
2014-11-24 09:16:08 +01:00
|
|
|
inherit platformTools;
|
2018-09-18 04:34:37 +02:00
|
|
|
version = "17c";
|
|
|
|
sha1s = {
|
|
|
|
x86_64-darwin = "f97e3d7711497e3b4faf9e7b3fa0f0da90bb649c";
|
|
|
|
x86_64-linux = "12cacc70c3fd2f40574015631c00f41fb8a39048";
|
|
|
|
};
|
2014-04-20 11:29:10 +02:00
|
|
|
};
|
2018-09-18 04:34:37 +02:00
|
|
|
androidndk = androidndk_17c;
|
2015-03-03 15:08:53 +01:00
|
|
|
|
2015-03-03 16:31:49 +01:00
|
|
|
androidndk_r8e = import ./androidndk_r8e.nix {
|
2018-02-21 00:31:16 +01:00
|
|
|
inherit (buildPackages)
|
|
|
|
makeWrapper;
|
|
|
|
inherit (pkgs)
|
|
|
|
stdenv fetchurl zlib ncurses lib
|
|
|
|
coreutils file findutils gawk gnugrep gnused jdk which;
|
2015-03-03 15:08:53 +01:00
|
|
|
inherit platformTools;
|
|
|
|
};
|
2018-02-21 03:34:29 +01:00
|
|
|
|
2012-11-07 21:10:39 +01:00
|
|
|
buildApp = import ./build-app.nix {
|
2014-04-20 11:29:10 +02:00
|
|
|
inherit (pkgs) stdenv jdk ant gnumake gawk file which;
|
|
|
|
inherit androidsdk androidndk;
|
2012-11-07 21:10:39 +01:00
|
|
|
};
|
2018-02-21 03:34:29 +01:00
|
|
|
|
2012-11-07 21:10:39 +01:00
|
|
|
emulateApp = import ./emulate-app.nix {
|
|
|
|
inherit (pkgs) stdenv;
|
|
|
|
inherit androidsdk;
|
|
|
|
};
|
2017-02-17 06:36:10 +01:00
|
|
|
|
2018-09-18 04:34:37 +02:00
|
|
|
androidndkPkgs_17c = import ./androidndk-pkgs.nix {
|
2017-02-17 06:36:10 +01:00
|
|
|
inherit (buildPackages)
|
|
|
|
makeWrapper;
|
|
|
|
inherit (pkgs)
|
2018-09-02 01:29:02 +02:00
|
|
|
lib stdenv
|
2017-02-17 06:36:10 +01:00
|
|
|
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.
|
2018-09-18 04:34:37 +02:00
|
|
|
buildAndroidndk = buildPackages.buildPackages.androidenv.androidndk_17c;
|
|
|
|
androidndk = androidndk_17c;
|
|
|
|
targetAndroidndkPkgs = targetPackages.androidenv.androidndkPkgs_17c;
|
2017-02-17 06:36:10 +01:00
|
|
|
};
|
2018-09-18 04:34:37 +02:00
|
|
|
androidndkPkgs = androidndkPkgs_17c;
|
2018-05-17 17:22:27 +02:00
|
|
|
|
|
|
|
androidndkPkgs_10e = import ./androidndk-pkgs.nix {
|
|
|
|
inherit (buildPackages)
|
|
|
|
makeWrapper;
|
|
|
|
inherit (pkgs)
|
2018-09-02 01:29:02 +02:00
|
|
|
lib stdenv
|
2018-05-17 17:22:27 +02:00
|
|
|
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 21:27:27 +02:00
|
|
|
|
|
|
|
buildGradleApp = import ./build-gradle-app.nix {
|
2018-06-21 18:48:05 +02:00
|
|
|
inherit (pkgs) stdenv jdk gnumake gawk file runCommand
|
|
|
|
which gradle fetchurl buildEnv;
|
2017-05-16 21:27:27 +02:00
|
|
|
inherit androidsdk androidndk;
|
|
|
|
};
|
2012-11-07 21:10:39 +01:00
|
|
|
}
|