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
42 lines
1.3 KiB
Nix
42 lines
1.3 KiB
Nix
{deployAndroidPackage, lib, package, autoPatchelfHook, makeWrapper, os, pkgs, pkgsi686Linux, postInstall}:
|
|
|
|
deployAndroidPackage {
|
|
name = "androidsdk";
|
|
inherit os package;
|
|
nativeBuildInputs = [ makeWrapper ]
|
|
++ lib.optionals (os == "linux") [ autoPatchelfHook ];
|
|
buildInputs = lib.optional (os == "linux") (
|
|
(with pkgs; [ glibc freetype fontconfig fontconfig.lib])
|
|
++ (with pkgs.xorg; [ libX11 libXrender libXext ])
|
|
++ (with pkgsi686Linux; [ glibc xorg.libX11 xorg.libXrender xorg.libXext fontconfig.lib freetype zlib ])
|
|
);
|
|
|
|
patchInstructions = ''
|
|
${lib.optionalString (os == "linux") ''
|
|
# Auto patch all binaries
|
|
autoPatchelf .
|
|
''}
|
|
|
|
# Wrap all scripts that require JAVA_HOME
|
|
for i in bin; do
|
|
find $i -maxdepth 1 -type f -executable | while read program; do
|
|
if grep -q "JAVA_HOME" $program; then
|
|
wrapProgram $PWD/$program --prefix PATH : ${pkgs.jdk8}/bin
|
|
fi
|
|
done
|
|
done
|
|
|
|
# Wrap monitor script
|
|
wrapProgram $PWD/monitor \
|
|
--prefix PATH : ${pkgs.jdk8}/bin \
|
|
--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath (with pkgs; [ xorg.libX11 xorg.libXtst ])}
|
|
|
|
# Patch all script shebangs
|
|
patchShebangs .
|
|
|
|
cd $out/libexec/android-sdk
|
|
${postInstall}
|
|
'';
|
|
|
|
meta.license = lib.licenses.unfree;
|
|
}
|