about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/editors/android-studio/common.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/applications/editors/android-studio/common.nix')
-rw-r--r--nixpkgs/pkgs/applications/editors/android-studio/common.nix19
1 files changed, 15 insertions, 4 deletions
diff --git a/nixpkgs/pkgs/applications/editors/android-studio/common.nix b/nixpkgs/pkgs/applications/editors/android-studio/common.nix
index 0ce0a37d876f..1c3c4aade5ff 100644
--- a/nixpkgs/pkgs/applications/editors/android-studio/common.nix
+++ b/nixpkgs/pkgs/applications/editors/android-studio/common.nix
@@ -35,6 +35,7 @@
 , libXrender
 , libXtst
 , makeWrapper
+, ncurses5
 , nspr
 , nss
 , pciutils
@@ -72,6 +73,9 @@ let
       cp -r . $out
       wrapProgram $out/bin/studio.sh \
         --set ANDROID_EMULATOR_USE_SYSTEM_LIBS 1 \
+        --set JAVA_HOME "$out/jre" \
+        --set QT_XKB_CONFIG_ROOT "${xkeyboard_config}/share/X11/xkb" \
+        --set FONTCONFIG_FILE ${fontsConf} \
         --prefix PATH : "${lib.makeBinPath [
 
           # Checked in studio.sh
@@ -138,12 +142,19 @@ let
           gnome_vfs
           glib
           GConf
-        ]}" \
-        --set QT_XKB_CONFIG_ROOT "${xkeyboard_config}/share/X11/xkb" \
-        --set FONTCONFIG_FILE ${fontsConf}
+        ]}"
+
+      # AS launches LLDBFrontend with a custom LD_LIBRARY_PATH
+      wrapProgram $out/bin/lldb/bin/LLDBFrontend --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [
+        ncurses5
+        zlib
+      ]}"
     '';
   };
 
+  # Causes the shebangs in interpreter scripts deployed to mobile devices to be patched, which Android does not understand
+  dontPatchShebangs = true;
+
   desktopItem = makeDesktopItem {
     name = drvName;
     exec = pname;
@@ -161,7 +172,7 @@ let
   fhsEnv = buildFHSUserEnv {
     name = "${drvName}-fhs-env";
     multiPkgs = pkgs: [
-      pkgs.ncurses5
+      ncurses5
 
       # Flutter can only search for certs Fedora-way.
       (runCommand "fedoracert" {}