From d88736df6c9cdd6c593646118683fe8e5baadd70 Mon Sep 17 00:00:00 2001 From: taku0 Date: Sun, 3 May 2015 23:03:36 +0900 Subject: [PATCH] androidsdk: Make monitor and other commands to work --- pkgs/development/mobile/androidenv/androidsdk.nix | 13 +++++++++---- pkgs/development/mobile/androidenv/default.nix | 2 +- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/pkgs/development/mobile/androidenv/androidsdk.nix b/pkgs/development/mobile/androidenv/androidsdk.nix index ed7bd051a7a4..52b146b87f4b 100644 --- a/pkgs/development/mobile/androidenv/androidsdk.nix +++ b/pkgs/development/mobile/androidenv/androidsdk.nix @@ -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 ../.. '' diff --git a/pkgs/development/mobile/androidenv/default.nix b/pkgs/development/mobile/androidenv/default.nix index 5df4213d233a..693a53cf428c 100644 --- a/pkgs/development/mobile/androidenv/default.nix +++ b/pkgs/development/mobile/androidenv/default.nix @@ -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;