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