1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-22 21:50:55 +00:00

android-studio: enable Android emulator support

These changes are needed to be able to run the system emulator (QEMU)
from Android Studio. In addition to the added dependencies,
$LD_LIBRARY_PATH had to be changed from --set to --prefix, so that libGL
is found (on NixOS).
This commit is contained in:
Bjørn Forsman 2016-09-06 20:01:48 +02:00
parent 99e06fe771
commit 3e5fe418f8

View file

@ -3,18 +3,25 @@
, coreutils
, fetchurl
, findutils
, file
, git
, glxinfo
, gnugrep
, gnutar
, gzip
, jdk
, libpulseaudio
, libX11
, libXrandr
, makeWrapper
, pciutils
, pkgsi686Linux
, setxkbmap
, stdenv
, unzip
, which
, writeTextFile
, xkeyboard_config
, zlib
}:
@ -40,6 +47,12 @@ let
jdk
which
# For Android emulator
file
glxinfo
pciutils
setxkbmap
# Used during setup wizard
gnutar
gzip
@ -47,17 +60,22 @@ let
# Runtime stuff
git
]}" --set LD_LIBRARY_PATH "${stdenv.lib.makeLibraryPath [
]}" --prefix LD_LIBRARY_PATH : "${stdenv.lib.makeLibraryPath [
# Gradle wants libstdc++.so.6
stdenv.cc.cc.lib
# mksdcard wants 32 bit libstdc++.so.6
pkgsi686Linux.stdenv.cc.cc.lib
# aapt wants libz.so.1
zlib
pkgsi686Linux.zlib
# Support multiple monitors
libXrandr
]}"
# For Android emulator
libpulseaudio
libX11
]}" --set QT_XKB_CONFIG_ROOT "${xkeyboard_config}/share/X11/xkb"
'';
src = fetchurl {
url = "https://dl.google.com/dl/android/studio/ide-zips/${version}/android-studio-ide-${build}-linux.zip";