androidsdk: Make monitor and other commands to work

This commit is contained in:
taku0 2015-05-03 23:03:36 +09:00
parent dd89ec5785
commit d88736df6c
2 changed files with 10 additions and 5 deletions

View File

@ -3,7 +3,7 @@
, 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
, freetype, fontconfig, glib, gtk, atk, file, jdk, coreutils
}:
{platformVersions, abiVersions, useGoogleAPIs, useExtraSupportLibs?false, useGooglePlayServices?false}:
@ -27,7 +27,12 @@ stdenv.mkDerivation rec {
cd $out/libexec
unpackFile $src
cd android-sdk-*/tools
for f in android traceview draw9patch hierarchyviewer monitor ddms screenshot2 uiautomatorviewer monkeyrunner jobb lint
do
sed -i -e "s|/bin/ls|${coreutils}/bin/ls|" "$f"
done
${stdenv.lib.optionalString (stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux")
''
# There are a number of native binaries. We must patch them to let them find the interpreter and libstdc++
@ -84,7 +89,7 @@ stdenv.mkDerivation rec {
patchelf --set-rpath ${libX11}/lib:${libXext}/lib:${libXrender}/lib:${freetype}/lib:${fontconfig}/lib libcairo-swt.so
wrapProgram `pwd`/monitor \
--prefix LD_LIBRARY_PATH : ${gtk}/lib:${atk}/lib:${stdenv.cc.cc}/lib
--prefix LD_LIBRARY_PATH : ${gtk}/lib:${atk}/lib:${stdenv.cc.cc}/lib:${libXtst}/lib
cd ../..
''
@ -97,7 +102,7 @@ stdenv.mkDerivation rec {
patchelf --set-rpath ${libX11}/lib:${libXext}/lib:${libXrender}/lib:${freetype}/lib:${fontconfig}/lib libcairo-swt.so
wrapProgram `pwd`/monitor \
--prefix LD_LIBRARY_PATH : ${gtk}/lib:${atk}/lib:${stdenv.cc.cc}/lib
--prefix LD_LIBRARY_PATH : ${gtk}/lib:${atk}/lib:${stdenv.cc.cc}/lib::${libXtst}/lib
cd ../..
''

View File

@ -40,7 +40,7 @@ rec {
androidsdk = import ./androidsdk.nix {
inherit (pkgs) stdenv fetchurl unzip makeWrapper;
inherit (pkgs) freetype fontconfig glib gtk atk mesa file alsaLib jdk;
inherit (pkgs) freetype fontconfig glib gtk atk mesa file alsaLib jdk coreutils;
inherit (pkgs.xorg) libX11 libXext libXrender libxcb libXau libXdmcp libXtst;
inherit platformTools buildTools support supportRepository platforms sysimages addons;