Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion pkgs/development/mobile/androidenv/androidsdk.nix
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,16 @@ stdenv.mkDerivation rec {
}
else throw "platform not ${stdenv.hostPlatform.system} supported!";

emulator = fetchurl {
url = "https://dl.google.com/android/repository/emulator-linux-4969155.zip";
sha256 = "0iw0j6j3w9zpfalsa7xq2czz4vzgq96zk2zddjhanwwx4p8fhrfd";
};

buildCommand = ''
mkdir -p $out/libexec
cd $out/libexec
unpackFile $src
unpackFile $emulator
cd tools

for f in monitor bin/monkeyrunner bin/uiautomatorviewer
Expand Down Expand Up @@ -76,13 +82,16 @@ stdenv.mkDerivation rec {
# The emulators need additional libraries, which are dynamically loaded => let's wrap them

${stdenv.lib.optionalString (stdenv.hostPlatform.system == "x86_64-linux") ''
for i in emulator emulator-check
cd ..
for i in emulator/emulator* tools/emulator* emulator/qemu/linux-x86_64/qemu-system-*
do
patchelf --set-interpreter ${stdenv.cc.libc.out}/lib/ld-linux-x86-64.so.2 $i
wrapProgram `pwd`/$i \
--prefix PATH : ${stdenv.lib.makeBinPath [ file glxinfo ]} \
--suffix LD_LIBRARY_PATH : `pwd`/lib:${makeLibraryPath [ stdenv.cc.cc libX11 libxcb libXau libXdmcp libXext libGLU_combined alsaLib zlib libpulseaudio dbus.lib ]} \
--suffix QT_XKB_CONFIG_ROOT : ${xkeyboardconfig}/share/X11/xkb
done
cd tools
''}
''}

Expand Down