9c4e43ab70
- Replace cmdline-tools with tools because tools is obsolete now. - Depend emulator package to systemImages androidenv: fix issues on the PR androidenv: reformat androidenv: support excluding of `tools` package androidenv: provide `tools`, and `build-tools`, dependencies androidenv: replace includeTools with toolsVersion androidenv: fix a typo androidenv: add tests to check licenses and installed packages androidenv: check if tests are running! this commit should fail! androidenv: fix problems in the review https://github.com/NixOS/nixpkgs/pull/208793 androidenv: add test-suite to handle more tests around androidenv: fix the test after couldn't running them with ofborg Update pkgs/development/mobile/androidenv/build-tools.nix Co-authored-by: Sandro <sandro.jaeckel@gmail.com> androidenv: Resolving https://github.com/NixOS/nixpkgs/pull/208793#discussion_r1065851539 Update pkgs/development/mobile/androidenv/cmdline-tools.nix Co-authored-by: Sandro <sandro.jaeckel@gmail.com> Update pkgs/development/mobile/androidenv/tools.nix Co-authored-by: Sandro <sandro.jaeckel@gmail.com> androidenv: fix a typo
61 lines
1.6 KiB
Nix
61 lines
1.6 KiB
Nix
{ deployAndroidPackage, lib, package, os, autoPatchelfHook, makeWrapper, pkgs, pkgsi686Linux, postInstall }:
|
|
|
|
deployAndroidPackage {
|
|
inherit package os;
|
|
nativeBuildInputs = [ makeWrapper ]
|
|
++ lib.optionals (os == "linux") [ autoPatchelfHook ];
|
|
buildInputs = lib.optionals (os == "linux") (with pkgs; [
|
|
glibc
|
|
libcxx
|
|
libGL
|
|
libpulseaudio
|
|
libuuid
|
|
zlib
|
|
ncurses5
|
|
stdenv.cc.cc
|
|
pkgsi686Linux.glibc
|
|
expat
|
|
freetype
|
|
nss
|
|
nspr
|
|
alsa-lib
|
|
]) ++ (with pkgs.xorg; [
|
|
libX11
|
|
libXext
|
|
libXdamage
|
|
libXfixes
|
|
libxcb
|
|
libXcomposite
|
|
libXcursor
|
|
libXi
|
|
libXrender
|
|
libXtst
|
|
]);
|
|
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
|
|
|
|
# Wrap emulator so that it can load required libraries at runtime
|
|
wrapProgram $out/libexec/android-sdk/emulator/emulator \
|
|
--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [
|
|
pkgs.dbus
|
|
pkgs.systemd
|
|
]} \
|
|
--set QT_XKB_CONFIG_ROOT ${pkgs.xkeyboard_config}/share/X11/xkb \
|
|
--set QTCOMPOSE ${pkgs.xorg.libX11.out}/share/X11/locale
|
|
|
|
mkdir -p $out/bin
|
|
cd $out/bin
|
|
find $out/libexec/android-sdk/emulator -type f -executable -mindepth 1 -maxdepth 1 | while read i; do
|
|
ln -s $i
|
|
done
|
|
|
|
cd $out/libexec/android-sdk
|
|
${postInstall}
|
|
'';
|
|
dontMoveLib64 = true;
|
|
}
|