nixpkgs-suyu/pkgs/development/mobile/androidenv/build-tools.nix
Hadi 9c4e43ab70 androidenv: Implement cmdline-tools and patcher
- 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
2023-01-27 18:15:47 -05:00

26 lines
1.1 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") [ pkgs.glibc pkgs.zlib pkgs.ncurses5 pkgsi686Linux.glibc pkgsi686Linux.zlib pkgsi686Linux.ncurses5 pkgs.libcxx ];
patchInstructions = ''
${lib.optionalString (os == "linux") ''
addAutoPatchelfSearchPath $packageBaseDir/lib
if [[ -d $packageBaseDir/lib64 ]]; then
addAutoPatchelfSearchPath $packageBaseDir/lib64
autoPatchelf --no-recurse $packageBaseDir/lib64
fi
autoPatchelf --no-recurse $packageBaseDir
''}
${lib.optionalString (lib.toInt (lib.versions.major package.revision) < 33) ''
wrapProgram $PWD/mainDexClasses \
--prefix PATH : ${pkgs.jdk8}/bin
''}
cd $out/libexec/android-sdk
'' + postInstall;
noAuditTmpdir = true; # The checker script gets confused by the build-tools path that is incorrectly identified as a reference to /build
}