androidenv: Add the Android Instant Apps SDK

This commit is contained in:
Michael Weiss 2017-09-09 16:23:20 +02:00
parent 84e34d4d5d
commit af78d76718
4 changed files with 66 additions and 30 deletions

View File

@ -305,4 +305,16 @@ in
}; };
}; };
instant_apps = buildGoogleApis {
name = "instant_apps_sdk";
src = fetchurl {
url = https://dl.google.com/android/repository/aiasdk-1.0.0.zip;
sha1 = "50074a0f0312ee1d0d81d2cddc3d84a8a9e97a53";
};
meta = {
description = "Android Instant Apps Development SDK";
url = "https://developer.android.com/";
};
};
} }

View File

@ -5,7 +5,8 @@
, zlib, glxinfo, xkeyboardconfig , zlib, glxinfo, xkeyboardconfig
, includeSources , includeSources
}: }:
{ platformVersions, abiVersions, useGoogleAPIs, useExtraSupportLibs ? false, useGooglePlayServices ? false }: { platformVersions, abiVersions, useGoogleAPIs, useExtraSupportLibs ? false
, useGooglePlayServices ? false, useInstantApps ? false }:
let inherit (stdenv.lib) makeLibraryPath; in let inherit (stdenv.lib) makeLibraryPath; in
@ -164,6 +165,9 @@ stdenv.mkDerivation rec {
"ln -s ${addons.google_play_services}/google-play-services google_play_services" "ln -s ${addons.google_play_services}/google-play-services google_play_services"
else ""} else ""}
${stdenv.lib.optionalString useInstantApps
"ln -s ${addons.instant_apps}/whsdk instantapps"}
cd ../.. cd ../..
# Symlink required sources # Symlink required sources

View File

@ -165,6 +165,7 @@ rec {
useGoogleAPIs = true; useGoogleAPIs = true;
useExtraSupportLibs = true; useExtraSupportLibs = true;
useGooglePlayServices = true; useGooglePlayServices = true;
useInstantApps = true;
}; };
androidsdk_7_0 = androidsdk { androidsdk_7_0 = androidsdk {
@ -179,6 +180,7 @@ rec {
useGoogleAPIs = true; useGoogleAPIs = true;
useExtraSupportLibs = true; useExtraSupportLibs = true;
useGooglePlayServices = true; useGooglePlayServices = true;
useInstantApps = true;
}; };
androidsdk_7_1_1 = androidsdk { androidsdk_7_1_1 = androidsdk {
@ -193,6 +195,7 @@ rec {
useGoogleAPIs = true; useGoogleAPIs = true;
useExtraSupportLibs = true; useExtraSupportLibs = true;
useGooglePlayServices = true; useGooglePlayServices = true;
useInstantApps = true;
}; };
androidsdk_8_0 = androidsdk { androidsdk_8_0 = androidsdk {
@ -207,6 +210,7 @@ rec {
useGoogleAPIs = true; useGoogleAPIs = true;
useExtraSupportLibs = true; useExtraSupportLibs = true;
useGooglePlayServices = true; useGooglePlayServices = true;
useInstantApps = true;
}; };
androidndk = import ./androidndk.nix { androidndk = import ./androidndk.nix {

View File

@ -60,6 +60,22 @@ in
}; };
}; };
</xsl:for-each> </xsl:for-each>
<!-- Instant apps -->
<xsl:for-each select="sdk:extra[sdk:path='instantapps']">
instant_apps = buildGoogleApis {
name = "instant_apps_sdk";
src = fetchurl {
url = https://dl.google.com/android/repository/<xsl:value-of select="sdk:archives/sdk:archive/sdk:url"/>;
sha1 = "<xsl:value-of select="sdk:archives/sdk:archive/sdk:checksum[@type='sha1']" />";
};
meta = {
description = "Android Instant Apps Development SDK";
url = "https://developer.android.com/";
};
};
</xsl:for-each>
} }
</xsl:template> </xsl:template>