2020-04-24 23:36:52 +00:00
|
|
|
{ deployAndroidPackage, lib, package, os, autoPatchelfHook, makeWrapper, pkgs, pkgs_i686 }:
|
|
|
|
|
|
|
|
deployAndroidPackage {
|
|
|
|
inherit package os;
|
2022-06-16 17:23:12 +00:00
|
|
|
buildInputs = [ makeWrapper ]
|
|
|
|
++ lib.optionals (os == "linux") (with pkgs; [
|
|
|
|
autoPatchelfHook
|
|
|
|
glibc
|
|
|
|
libcxx
|
|
|
|
libGL
|
|
|
|
libpulseaudio
|
|
|
|
libuuid
|
|
|
|
zlib
|
|
|
|
ncurses5
|
|
|
|
stdenv.cc.cc
|
2022-06-26 10:26:21 +00:00
|
|
|
pkgs_i686.glibc
|
2022-06-16 17:23:12 +00:00
|
|
|
expat
|
|
|
|
freetype
|
|
|
|
nss
|
|
|
|
nspr
|
|
|
|
alsa-lib
|
|
|
|
]) ++ (with pkgs.xorg; [
|
|
|
|
libX11
|
|
|
|
libXext
|
|
|
|
libXdamage
|
|
|
|
libXfixes
|
|
|
|
libxcb
|
|
|
|
libXcomposite
|
|
|
|
libXcursor
|
|
|
|
libXi
|
|
|
|
libXrender
|
|
|
|
libXtst
|
|
|
|
]);
|
2020-04-24 23:36:52 +00:00
|
|
|
patchInstructions = lib.optionalString (os == "linux") ''
|
|
|
|
addAutoPatchelfSearchPath $packageBaseDir/lib
|
|
|
|
addAutoPatchelfSearchPath $packageBaseDir/lib64
|
|
|
|
addAutoPatchelfSearchPath $packageBaseDir/lib64/qt/lib
|
|
|
|
# autoPatchelf is not detecting libuuid :(
|
|
|
|
addAutoPatchelfSearchPath ${pkgs.libuuid.out}/lib
|
|
|
|
autoPatchelf $out
|
|
|
|
|
2020-06-02 18:00:15 +00:00
|
|
|
# Wrap emulator so that it can load required libraries at runtime
|
2020-04-24 23:36:52 +00:00
|
|
|
wrapProgram $out/libexec/android-sdk/emulator/emulator \
|
2021-02-05 17:12:51 +00:00
|
|
|
--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [
|
2020-06-02 18:00:15 +00:00
|
|
|
pkgs.dbus
|
|
|
|
pkgs.systemd
|
|
|
|
]} \
|
2020-04-24 23:36:52 +00:00
|
|
|
--set QT_XKB_CONFIG_ROOT ${pkgs.xkeyboard_config}/share/X11/xkb \
|
|
|
|
--set QTCOMPOSE ${pkgs.xorg.libX11.out}/share/X11/locale
|
|
|
|
'';
|
|
|
|
dontMoveLib64 = true;
|
|
|
|
}
|