Replace androidenv by new implementation
This commit is contained in:
@@ -1,349 +1,25 @@
|
||||
{ pkgs, pkgs_i686, buildPackages
|
||||
, includeSources ? true, licenseAccepted ? false
|
||||
{ pkgs ? import <nixpkgs> {}
|
||||
, pkgs_i686 ? import <nixpkgs> { system = "i686-linux"; }
|
||||
}:
|
||||
|
||||
# TODO: use callPackage instead of import to avoid so many inherits
|
||||
|
||||
rec {
|
||||
platformTools = import ./platform-tools.nix {
|
||||
inherit buildPackages pkgs;
|
||||
};
|
||||
|
||||
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; };
|
||||
|
||||
buildTools = import ./build-tools.nix {
|
||||
inherit (pkgs) stdenv lib fetchurl unzip zlib file coreutils;
|
||||
inherit buildToolsSources;
|
||||
stdenv_32bit = pkgs_i686.stdenv;
|
||||
zlib_32bit = pkgs_i686.zlib;
|
||||
ncurses_32bit = pkgs_i686.ncurses5;
|
||||
ncurses = pkgs.ncurses5;
|
||||
};
|
||||
|
||||
support = import ./support.nix {
|
||||
inherit (pkgs) stdenv fetchurl unzip;
|
||||
};
|
||||
|
||||
supportRepository = import ./support-repository.nix {
|
||||
inherit (pkgs) stdenv fetchurl unzip;
|
||||
};
|
||||
|
||||
platforms = if (pkgs.stdenv.hostPlatform.system == "i686-linux" || pkgs.stdenv.hostPlatform.system == "x86_64-linux")
|
||||
then import ./platforms-linux.nix {
|
||||
inherit (pkgs) stdenv fetchurl unzip;
|
||||
}
|
||||
else if pkgs.stdenv.hostPlatform.system == "x86_64-darwin"
|
||||
then import ./platforms-macosx.nix {
|
||||
inherit (pkgs) stdenv fetchurl unzip;
|
||||
}
|
||||
else throw "Platform: ${pkgs.stdenv.hostPlatform.system} not supported!";
|
||||
|
||||
sysimages = import ./sysimages.nix {
|
||||
inherit (pkgs) stdenv fetchurl unzip;
|
||||
};
|
||||
|
||||
addons = import ./addons.nix {
|
||||
inherit (pkgs) stdenv fetchurl unzip;
|
||||
};
|
||||
|
||||
sources = import ./sources.nix {
|
||||
inherit (pkgs) stdenv fetchurl unzip;
|
||||
};
|
||||
|
||||
androidsdk = import ./androidsdk.nix {
|
||||
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;
|
||||
|
||||
inherit platformTools buildTools support
|
||||
supportRepository platforms sysimages
|
||||
addons sources includeSources licenseAccepted;
|
||||
|
||||
stdenv_32bit = pkgs_i686.stdenv;
|
||||
};
|
||||
|
||||
androidsdk_2_1 = androidsdk {
|
||||
platformVersions = [ "7" ];
|
||||
abiVersions = [ "armeabi-v7a" ];
|
||||
useGoogleAPIs = true;
|
||||
};
|
||||
|
||||
androidsdk_2_2 = androidsdk {
|
||||
platformVersions = [ "8" ];
|
||||
abiVersions = [ "armeabi-v7a" ];
|
||||
useGoogleAPIs = true;
|
||||
};
|
||||
|
||||
androidsdk_2_3_3 = androidsdk {
|
||||
platformVersions = [ "10" ];
|
||||
abiVersions = [ "armeabi-v7a" ];
|
||||
useGoogleAPIs = true;
|
||||
};
|
||||
|
||||
androidsdk_3_0 = androidsdk {
|
||||
platformVersions = [ "11" ];
|
||||
abiVersions = [ "armeabi-v7a" ];
|
||||
useGoogleAPIs = true;
|
||||
};
|
||||
|
||||
androidsdk_3_1 = androidsdk {
|
||||
platformVersions = [ "12" ];
|
||||
abiVersions = [ "armeabi-v7a" ];
|
||||
useGoogleAPIs = true;
|
||||
};
|
||||
|
||||
androidsdk_3_2 = androidsdk {
|
||||
platformVersions = [ "13" ];
|
||||
abiVersions = [ "armeabi-v7a" ];
|
||||
useGoogleAPIs = true;
|
||||
};
|
||||
|
||||
androidsdk_4_0 = androidsdk {
|
||||
platformVersions = [ "14" ];
|
||||
abiVersions = [ "armeabi-v7a" ];
|
||||
useGoogleAPIs = true;
|
||||
};
|
||||
|
||||
androidsdk_4_0_3 = androidsdk {
|
||||
platformVersions = [ "15" ];
|
||||
abiVersions = [ "armeabi-v7a" ];
|
||||
useGoogleAPIs = true;
|
||||
};
|
||||
|
||||
androidsdk_4_1 = androidsdk {
|
||||
platformVersions = [ "16" ];
|
||||
abiVersions = [ "armeabi-v7a" ];
|
||||
useGoogleAPIs = true;
|
||||
};
|
||||
|
||||
androidsdk_4_2 = androidsdk {
|
||||
platformVersions = [ "17" ];
|
||||
abiVersions = [ "armeabi-v7a" ];
|
||||
useGoogleAPIs = true;
|
||||
};
|
||||
|
||||
androidsdk_4_3 = androidsdk {
|
||||
platformVersions = [ "18" ];
|
||||
abiVersions = [ "armeabi-v7a" "x86" ];
|
||||
useGoogleAPIs = true;
|
||||
};
|
||||
|
||||
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;
|
||||
};
|
||||
|
||||
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;
|
||||
};
|
||||
|
||||
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;
|
||||
};
|
||||
|
||||
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;
|
||||
|
||||
androidndk_10e = pkgs.callPackage ./androidndk.nix {
|
||||
inherit (buildPackages)
|
||||
unzip makeWrapper;
|
||||
inherit (pkgs)
|
||||
stdenv fetchurl zlib ncurses5 lib python3 libcxx
|
||||
coreutils file findutils gawk gnugrep gnused jdk which;
|
||||
inherit platformTools;
|
||||
version = "10e";
|
||||
sha1s = {
|
||||
x86_64-darwin = "6be8598e4ed3d9dd42998c8cb666f0ee502b1294";
|
||||
x86_64-linux = "f692681b007071103277f6edc6f91cb5c5494a32";
|
||||
};
|
||||
};
|
||||
|
||||
androidndk_16b = pkgs.callPackage ./androidndk.nix {
|
||||
inherit (buildPackages)
|
||||
unzip makeWrapper;
|
||||
inherit (pkgs)
|
||||
stdenv fetchurl zlib ncurses5 lib python3 libcxx
|
||||
coreutils file findutils gawk gnugrep gnused jdk which;
|
||||
inherit platformTools;
|
||||
version = "16b";
|
||||
sha1s = {
|
||||
x86_64-darwin = "e51e615449b98c716cf912057e2682e75d55e2de";
|
||||
x86_64-linux = "42aa43aae89a50d1c66c3f9fdecd676936da6128";
|
||||
};
|
||||
};
|
||||
|
||||
androidndk_17c = pkgs.callPackage ./androidndk.nix {
|
||||
inherit (buildPackages)
|
||||
unzip makeWrapper;
|
||||
inherit (pkgs)
|
||||
stdenv fetchurl zlib ncurses5 lib python3 libcxx
|
||||
coreutils file findutils gawk gnugrep gnused jdk which;
|
||||
inherit platformTools;
|
||||
version = "17c";
|
||||
sha1s = {
|
||||
x86_64-darwin = "f97e3d7711497e3b4faf9e7b3fa0f0da90bb649c";
|
||||
x86_64-linux = "12cacc70c3fd2f40574015631c00f41fb8a39048";
|
||||
};
|
||||
};
|
||||
|
||||
androidndk_18b = pkgs.callPackage ./androidndk.nix {
|
||||
inherit (buildPackages)
|
||||
unzip makeWrapper;
|
||||
inherit (pkgs)
|
||||
stdenv fetchurl zlib ncurses5 lib python3 libcxx
|
||||
coreutils file findutils gawk gnugrep gnused jdk which;
|
||||
inherit platformTools;
|
||||
version = "18b";
|
||||
sha1s = {
|
||||
x86_64-darwin = "98cb9909aa8c2dab32db188bbdc3ac6207e09440";
|
||||
x86_64-linux = "500679655da3a86aecf67007e8ab230ea9b4dd7b";
|
||||
};
|
||||
};
|
||||
androidndk = androidndk_18b;
|
||||
|
||||
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;
|
||||
composeAndroidPackages = import ./compose-android-packages.nix {
|
||||
inherit (pkgs) stdenv fetchurl requireFile makeWrapper unzip autoPatchelfHook;
|
||||
inherit pkgs pkgs_i686;
|
||||
};
|
||||
|
||||
buildApp = import ./build-app.nix {
|
||||
inherit (pkgs) stdenv jdk ant gnumake gawk file which;
|
||||
inherit androidsdk androidndk;
|
||||
inherit (pkgs) stdenv jdk ant gnumake gawk;
|
||||
inherit composeAndroidPackages;
|
||||
};
|
||||
|
||||
emulateApp = import ./emulate-app.nix {
|
||||
inherit (pkgs) stdenv;
|
||||
inherit androidsdk;
|
||||
inherit composeAndroidPackages;
|
||||
};
|
||||
|
||||
buildGradleApp = import ./build-gradle-app.nix {
|
||||
inherit (pkgs) stdenv jdk gnumake gawk file runCommand
|
||||
which gradle fetchurl buildEnv;
|
||||
inherit androidsdk androidndk;
|
||||
androidPkgs_9_0 = composeAndroidPackages {
|
||||
platformVersions = [ "28" ];
|
||||
abiVersions = [ "x86" "x86_64"];
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user