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