Added options for androidsdk to use more extras.
Existing packages should perform unchanged. There's a new package called androidsdk_5_0_1_extras which adds support for android support libraries and google play services.
This commit is contained in:
parent
ebf122c36f
commit
1ae10523c8
3 changed files with 47 additions and 3 deletions
|
@ -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/;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue