Merge pull request #21462 from phunehehe/android-studio

Fontconfig for Android Studio
This commit is contained in:
Graham Christensen 2017-01-10 20:05:42 -05:00 committed by GitHub
commit acc889f5ed
2 changed files with 48 additions and 50 deletions

View file

@ -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";

View file

@ -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 {};