android-sdk: 24.4.1 -> 25.1.7 (#17193)

This commit is contained in:
taku0 2016-07-26 04:47:39 +09:00 committed by obadz
parent 6afb7b9a1a
commit 2ac2676a17
6 changed files with 40 additions and 47 deletions

View File

@ -31,7 +31,7 @@ let
buildInputs = x.buildInputs ++ [ makeWrapper ];
installPhase = x.installPhase + ''
wrapProgram "$out/bin/android-studio" \
--set ANDROID_HOME "${androidsdk}/libexec/android-sdk-linux/" \
--set ANDROID_HOME "${androidsdk}/libexec/" \
--set LD_LIBRARY_PATH "${stdenv.cc.cc.lib}/lib" # Gradle installs libnative-platform.so in ~/.gradle, that requires libstdc++.so.6
'';
});

View File

@ -1,6 +1,6 @@
<?xml version="1.0" ?>
<sdk:sdk-addon xmlns:sdk="http://schemas.android.com/sdk/android/addon/7" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<!--Generated on 2016-07-15 21:31:36.580145 with ADRT.-->
<!--Generated on 2016-07-21 16:22:25.601902 with ADRT.-->
<sdk:license id="android-sdk-license" type="text">Terms and Conditions
This is the Android Software Development Kit License Agreement
@ -1229,18 +1229,18 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS &quot;AS IS&
<sdk:libs/>
</sdk:add-on>
<sdk:extra>
<!--Generated from bid:3063959, branch:git_nyc-dev-->
<!--Generated from bid:3078275, branch:git_nyc-dev-->
<sdk:revision>
<sdk:major>34</sdk:major>
<sdk:major>35</sdk:major>
<sdk:minor>0</sdk:minor>
<sdk:micro>0</sdk:micro>
</sdk:revision>
<sdk:archives>
<sdk:archive>
<!--Built on: Fri Jul 15 16:41:11 2016.-->
<sdk:size>244424374</sdk:size>
<sdk:checksum type="sha1">103e1f1001589986c93e04a691bcce0908b16c65</sdk:checksum>
<sdk:url>android_m2repository_r34.zip</sdk:url>
<!--Built on: Thu Jul 21 12:00:22 2016.-->
<sdk:size>251973915</sdk:size>
<sdk:checksum type="sha1">7a201334775d78bf185ffcce686b1b168d152217</sdk:checksum>
<sdk:url>android_m2repository_r35.zip</sdk:url>
</sdk:archive>
</sdk:archives>
<sdk:uses-license ref="android-sdk-license"/>

View File

@ -1,9 +1,8 @@
{ stdenv, stdenv_32bit, fetchurl, unzip, makeWrapper
, platformTools, buildTools, support, supportRepository, platforms, sysimages, addons
, zlib_32bit
, libX11_32bit, libxcb_32bit, libXau_32bit, libXdmcp_32bit, libXext_32bit, mesa_32bit, alsaLib_32bit
, libX11, libXext, libXrender, libxcb, libXau, libXdmcp, libXtst, mesa, alsaLib
, freetype, fontconfig, glib, gtk, atk, file, jdk, coreutils
, freetype, fontconfig, glib, gtk, atk, file, jdk, coreutils, libpulseaudio
, zlib, glxinfo, xkeyboardconfig
}:
{ platformVersions, abiVersions, useGoogleAPIs, useExtraSupportLibs ? false, useGooglePlayServices ? false }:
@ -11,16 +10,16 @@ with { inherit (stdenv.lib) makeLibraryPath; };
stdenv.mkDerivation rec {
name = "android-sdk-${version}";
version = "24.4.1";
version = "25.1.7";
src = if (stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux")
then fetchurl {
url = "http://dl.google.com/android/android-sdk_r${version}-linux.tgz";
sha1 = "dlr6346lpmxdb8pmryn4xl7py1hb6nvj";
url = "http://dl.google.com/android/repository/tools_r${version}-linux.zip";
sha1 = "p03br08zfq0j7aar5638z8fdh5n9x1in";
}
else if stdenv.system == "x86_64-darwin" then fetchurl {
url = "http://dl.google.com/android/android-sdk_r${version}-macosx.zip";
sha1 = "rm03hm87f7qcadb3c4gnz7hz1g5wrac5";
url = "http://dl.google.com/android/repository/tools_r${version}-macosx.zip";
sha1 = "7fzlfms37cfk25kk4f9zriy63djmbi8g";
}
else throw "platform not ${stdenv.system} supported!";
@ -28,7 +27,7 @@ stdenv.mkDerivation rec {
mkdir -p $out/libexec
cd $out/libexec
unpackFile $src
cd android-sdk-*/tools
cd tools
for f in android traceview draw9patch hierarchyviewer monitor ddms screenshot2 uiautomatorviewer monkeyrunner jobb lint
do
@ -39,16 +38,24 @@ stdenv.mkDerivation rec {
''
# There are a number of native binaries. We must patch them to let them find the interpreter and libstdc++
for i in emulator emulator-arm emulator-mips emulator-x86 mksdcard
for i in mksdcard
do
patchelf --set-interpreter ${stdenv_32bit.cc.libc.out}/lib/ld-linux.so.2 $i
patchelf --set-rpath ${stdenv_32bit.cc.cc.lib}/lib $i
done
${stdenv.lib.optionalString (stdenv.system == "x86_64-linux") ''
for i in bin64/{mkfs.ext4,fsck.ext4,e2fsck,tune2fs,resize2fs}
do
patchelf --set-interpreter ${stdenv.cc.libc.out}/lib/ld-linux-x86-64.so.2 $i
patchelf --set-rpath ${stdenv.cc.cc.lib}/lib64 $i
done
''}
${stdenv.lib.optionalString (stdenv.system == "x86_64-linux") ''
# We must also patch the 64-bit emulator instances, if needed
for i in emulator64-arm emulator64-mips emulator64-x86
for i in emulator emulator64-arm emulator64-mips emulator64-x86 emulator64-crash-service emulator-check qemu/linux-x86_64/qemu-system-*
do
patchelf --set-interpreter ${stdenv.cc.libc.out}/lib/ld-linux-x86-64.so.2 $i
patchelf --set-rpath ${stdenv.cc.cc.lib}/lib64 $i
@ -71,20 +78,14 @@ stdenv.mkDerivation rec {
--prefix LD_LIBRARY_PATH : ${glib}/lib:${gtk}/lib:${libXtst}/lib
# The emulators need additional libraries, which are dynamically loaded => let's wrap them
for i in emulator emulator-arm emulator-mips emulator-x86
do
wrapProgram `pwd`/$i \
--prefix PATH : ${file}/bin \
--suffix LD_LIBRARY_PATH : `pwd`/lib:${makeLibraryPath [ libX11_32bit libxcb_32bit libXau_32bit libXdmcp_32bit libXext_32bit mesa_32bit ]}
done
${stdenv.lib.optionalString (stdenv.system == "x86_64-linux") ''
for i in emulator64-arm emulator64-mips emulator64-x86
for i in emulator emulator64-arm emulator64-mips emulator64-x86 emulator64-crash-service
do
wrapProgram `pwd`/$i \
--prefix PATH : ${file}/bin \
--suffix LD_LIBRARY_PATH : `pwd`/lib64:${makeLibraryPath [ libX11 libxcb libXau libXdmcp libXext mesa alsaLib ]}
--prefix PATH : ${file}/bin:${glxinfo}/bin \
--suffix LD_LIBRARY_PATH : `pwd`/lib64:`pwd`/lib64/qt/lib:${makeLibraryPath [ stdenv.cc.cc libX11 libxcb libXau libXdmcp libXext mesa alsaLib zlib libpulseaudio ]} \
--suffix QT_XKB_CONFIG_ROOT : ${xkeyboardconfig}/share/X11/xkb
done
''}
''}
@ -205,7 +206,7 @@ stdenv.mkDerivation rec {
mkdir -p $out/bin
for i in $out/libexec/android-sdk-*/tools/*
for i in $out/libexec/tools/*
do
if [ ! -d $i ] && [ -x $i ]
then
@ -213,7 +214,7 @@ stdenv.mkDerivation rec {
fi
done
for i in $out/libexec/android-sdk-*/platform-tools/*
for i in $out/libexec/platform-tools/*
do
if [ ! -d $i ] && [ -x $i ]
then
@ -221,7 +222,7 @@ stdenv.mkDerivation rec {
fi
done
for i in $out/libexec/android-sdk-*/build-tools/*/*
for i in $out/libexec/build-tools/*/*
do
if [ ! -d $i ] && [ -x $i ]
then

View File

@ -40,20 +40,12 @@ rec {
androidsdk = import ./androidsdk.nix {
inherit (pkgs) stdenv fetchurl unzip makeWrapper;
inherit (pkgs) freetype fontconfig glib gtk atk mesa file alsaLib jdk coreutils;
inherit (pkgs.xorg) libX11 libXext libXrender libxcb libXau libXdmcp libXtst;
inherit (pkgs) zlib glxinfo freetype fontconfig glib gtk atk mesa file alsaLib jdk coreutils libpulseaudio;
inherit (pkgs.xorg) libX11 libXext libXrender libxcb libXau libXdmcp libXtst xkeyboardconfig;
inherit platformTools buildTools support supportRepository platforms sysimages addons;
stdenv_32bit = pkgs_i686.stdenv;
zlib_32bit = pkgs_i686.zlib;
libX11_32bit = pkgs_i686.xorg.libX11;
libxcb_32bit = pkgs_i686.xorg.libxcb;
libXau_32bit = pkgs_i686.xorg.libXau;
libXdmcp_32bit = pkgs_i686.xorg.libXdmcp;
libXext_32bit = pkgs_i686.xorg.libXext;
mesa_32bit = pkgs_i686.mesa;
alsaLib_32bit = pkgs_i686.alsaLib;
};
androidsdk_2_1 = androidsdk {

View File

@ -15,7 +15,7 @@
* limitations under the License.
-->
<sdk:sdk-repository xmlns:sdk="http://schemas.android.com/sdk/android/repository/11" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<!--Generated on 2016-07-18 18:30:41.214218 with ADRT.-->
<!--Generated on 2016-07-22 11:17:21.550545 with ADRT.-->
<sdk:license id="android-sdk-license" type="text">Terms and Conditions
This is the Android Software Development Kit License Agreement

View File

@ -1,11 +1,11 @@
{stdenv, fetchurl, unzip}:
stdenv.mkDerivation rec {
version = "33";
version = "35";
name = "android-support-repository-r${version}";
src = fetchurl {
url = "http://dl.google.com/android/repository/android_m2repository_r${version}.zip";
sha1 = "pdg5s78wypnc27fs5n62c8rrjl8gwyv4";
sha1 = "2wi1b38n3dmnikpwbwcbyy2xfws1683s";
};
buildCommand = ''