2019-04-11 12:48:53 +00:00
|
|
|
{ config, stdenv, pkgs }:
|
|
|
|
|
|
|
|
with pkgs;
|
|
|
|
with stdenv;
|
|
|
|
|
|
|
|
let
|
|
|
|
gradle = gradle_4_10;
|
|
|
|
androidComposition = androidenv.composeAndroidPackages {
|
|
|
|
toolsVersion = "26.1.1";
|
|
|
|
platformToolsVersion = "28.0.2";
|
|
|
|
buildToolsVersions = [ "28.0.3" ];
|
|
|
|
includeEmulator = false;
|
|
|
|
platformVersions = [ "28" ];
|
|
|
|
includeSources = false;
|
|
|
|
includeDocs = false;
|
|
|
|
includeSystemImages = false;
|
|
|
|
systemImageTypes = [ "default" ];
|
|
|
|
abiVersions = [ "armeabi-v7a" ];
|
|
|
|
lldbVersions = [ "2.0.2558144" ];
|
|
|
|
cmakeVersions = [ "3.6.4111459" ];
|
|
|
|
includeNDK = true;
|
|
|
|
ndkVersion = "19.2.5345600";
|
|
|
|
useGoogleAPIs = false;
|
|
|
|
useGoogleTVAddOns = false;
|
|
|
|
includeExtras = [ "extras;android;m2repository" "extras;google;m2repository" ];
|
|
|
|
};
|
2019-04-29 16:33:40 +00:00
|
|
|
licensedAndroidEnv = callPackage ./licensed-android-sdk.nix { inherit androidComposition; };
|
2019-04-11 12:48:53 +00:00
|
|
|
|
|
|
|
in
|
|
|
|
{
|
|
|
|
inherit androidComposition;
|
|
|
|
|
|
|
|
buildInputs = [ openjdk gradle ];
|
|
|
|
shellHook = ''
|
|
|
|
export JAVA_HOME="${openjdk}"
|
2019-04-29 16:33:40 +00:00
|
|
|
export ANDROID_HOME=${licensedAndroidEnv}
|
2019-04-11 12:48:53 +00:00
|
|
|
export ANDROID_SDK_ROOT="$ANDROID_HOME"
|
|
|
|
export ANDROID_NDK_ROOT="${androidComposition.androidsdk}/libexec/android-sdk/ndk-bundle"
|
|
|
|
export ANDROID_NDK_HOME="$ANDROID_NDK_ROOT"
|
|
|
|
export ANDROID_NDK="$ANDROID_NDK_ROOT"
|
2019-04-29 16:12:49 +00:00
|
|
|
export PATH="$ANDROID_HOME/bin:$ANDROID_HOME/tools:$ANDROID_HOME/tools/bin:$ANDROID_HOME/platform-tools:$ANDROID_HOME/build-tools:$PATH"
|
2019-04-11 12:48:53 +00:00
|
|
|
|
2019-04-03 20:12:31 +00:00
|
|
|
$STATUS_REACT_HOME/scripts/generate-keystore.sh
|
2019-04-11 12:48:53 +00:00
|
|
|
'';
|
|
|
|
}
|