about summary refs log tree commit diff
diff options
context:
space:
mode:
authorBjørn Forsman <bjorn.forsman@gmail.com>2016-09-06 20:01:48 +0200
committerBjørn Forsman <bjorn.forsman@gmail.com>2016-09-12 10:55:07 +0200
commit3e5fe418f8342d2e85cd88529eda9868fd4e649a (patch)
tree6174988503c1723ed1acff5edfbf6c21b9a37f31
parent99e06fe771c76b88c3bd0b179297da906867b7d1 (diff)
downloadnixlib-3e5fe418f8342d2e85cd88529eda9868fd4e649a.tar
nixlib-3e5fe418f8342d2e85cd88529eda9868fd4e649a.tar.gz
nixlib-3e5fe418f8342d2e85cd88529eda9868fd4e649a.tar.bz2
nixlib-3e5fe418f8342d2e85cd88529eda9868fd4e649a.tar.lz
nixlib-3e5fe418f8342d2e85cd88529eda9868fd4e649a.tar.xz
nixlib-3e5fe418f8342d2e85cd88529eda9868fd4e649a.tar.zst
nixlib-3e5fe418f8342d2e85cd88529eda9868fd4e649a.zip
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).
-rw-r--r--pkgs/applications/editors/android-studio/default.nix22
1 files 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";