Merge pull request #6644 from totherme/android-extras

Added options for androidsdk to use more extras.
This commit is contained in:
Sander van der Burg 2015-03-03 10:46:05 +00:00
commit b9c02fe7a3
3 changed files with 47 additions and 3 deletions

View File

@ -217,6 +217,30 @@ in
};
};
android_support_extra = buildGoogleApis {
name = "android_support_extra";
src = fetchurl {
url = https://dl-ssl.google.com/android/repository/support_r20.zip;
sha1 = "719c260dc3eb950712988f987daaf91afa9e36af";
};
meta = {
description = "Android Support Library";
url = http://developer.android.com/;
};
};
google_play_services = buildGoogleApis {
name = "google_play_services";
src = fetchurl {
url = https://dl-ssl.google.com/android/repository/google_play_services_3265130_r12.zip;
sha1 = "92558dbc380bba3d55d0ec181167fb05ce7c79d9";
};
meta = {
description = "Google Play services client library and sample code";
url = http://developer.android.com/;
};
};
}

View File

@ -5,7 +5,7 @@
, libX11, libXext, libXrender, libxcb, libXau, libXdmcp, libXtst, mesa, alsaLib
, freetype, fontconfig, glib, gtk, atk, file, jdk
}:
{platformVersions, abiVersions, useGoogleAPIs}:
{platformVersions, abiVersions, useGoogleAPIs, useExtraSupportLibs?false, useGooglePlayServices?false}:
stdenv.mkDerivation rec {
name = "android-sdk-${version}";
@ -134,6 +134,18 @@ stdenv.mkDerivation rec {
ln -s ${supportRepository}/m2repository
${if useExtraSupportLibs then
"ln -s ${addons.android_support_extra}/support ."
else ""}
cd ..
mkdir -p google
cd google
${if useGooglePlayServices then
"ln -s ${addons.google_play_services}/google-play-services google_play_services"
else ""}
cd ../..
# Symlink required platforms

View File

@ -134,6 +134,14 @@ rec {
useGoogleAPIs = true;
};
androidsdk_5_0_1_extras = androidsdk {
platformVersions = [ "21" ];
abiVersions = [ "armeabi-v7a" "x86" ];
useGoogleAPIs = true;
useExtraSupportLibs = true;
useGooglePlayServices = true;
};
androidndk = import ./androidndk.nix {
inherit (pkgs) stdenv fetchurl zlib ncurses p7zip lib makeWrapper;
inherit (pkgs) coreutils file findutils gawk gnugrep gnused jdk which;