diff --git a/pkgs/applications/editors/android-studio/default.nix b/pkgs/applications/editors/android-studio/default.nix index 2e14ae339cf..28b6b2b85ad 100644 --- a/pkgs/applications/editors/android-studio/default.nix +++ b/pkgs/applications/editors/android-studio/default.nix @@ -9,7 +9,6 @@ , gnugrep , gnutar , gzip -, jdk , fontconfig , freetype , libpulseaudio @@ -29,6 +28,7 @@ , writeTextFile , xkeyboard_config , zlib +, fontsConf }: let @@ -44,50 +44,57 @@ let ]; installPhase = '' cp -r . $out - wrapProgram $out/bin/studio.sh --set PATH "${stdenv.lib.makeBinPath [ + wrapProgram $out/bin/studio.sh \ + --set PATH "${stdenv.lib.makeBinPath [ - # Checked in studio.sh - coreutils - findutils - gnugrep - jdk - which + # Checked in studio.sh + coreutils + findutils + gnugrep + which - # For Android emulator - file - glxinfo - pciutils - setxkbmap + # For Android emulator + file + glxinfo + pciutils + setxkbmap - # Used during setup wizard - gnutar - gzip + # Used during setup wizard + gnutar + gzip - # Runtime stuff - git + # Runtime stuff + git - ]}" --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 + ]}" \ + --prefix LD_LIBRARY_PATH : "${stdenv.lib.makeLibraryPath [ - # aapt wants libz.so.1 - zlib - pkgsi686Linux.zlib - # Support multiple monitors - libXrandr + # Crash at startup without these + fontconfig + freetype + libXext + libXi + libXrender + libXtst - # For Android emulator - libpulseaudio - libX11 - libXext - libXrender - libXtst - libXi - freetype - fontconfig - ]}" --set QT_XKB_CONFIG_ROOT "${xkeyboard_config}/share/X11/xkb" + # 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" \ + --set FONTCONFIG_FILE ${fontsConf} ''; src = fetchurl { url = "https://dl.google.com/dl/android/studio/ide-zips/${version}/android-studio-ide-${build}-linux.zip"; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 69196921eb1..69192cd6d3a 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -12361,19 +12361,10 @@ in amsn = callPackage ../applications/networking/instant-messengers/amsn { }; - # Oracle JDK is recommended upstream, but unfree and requires a manual - # download. OpenJDK is straightforward, but may suffer from compatibility - # problems e.g. https://code.google.com/p/android/issues/detail?id=174496. - # To use Oracle JDK add an override to ~/.nixpkgs/config.nix: - # { - # packageOverrides = pkgs: { - # android-studio = pkgs.android-studio.override { - # jdk = pkgs.oraclejdk8; - # }; - # }; - # } android-studio = callPackage ../applications/editors/android-studio { - inherit (xorg) libX11 libXext libXi libXrandr libXrender libXtst; + fontsConf = makeFontsConf { + fontDirectories = []; + }; }; antimony = qt5.callPackage ../applications/graphics/antimony {};