From 3e5fe418f8342d2e85cd88529eda9868fd4e649a Mon Sep 17 00:00:00 2001 From: Bjørn Forsman Date: Tue, 6 Sep 2016 20:01:48 +0200 Subject: 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). --- .../editors/android-studio/default.nix | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/editors/android-studio/default.nix b/pkgs/applications/editors/android-studio/default.nix index 4d972a54e373..4e16ceedbbbe 100644 --- a/pkgs/applications/editors/android-studio/default.nix +++ b/pkgs/applications/editors/android-studio/default.nix @@ -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"; -- cgit 1.4.1