depot/third_party/nixpkgs/pkgs/development/mobile/androidenv/build-tools.nix
Luke Granger-Brown f92e137cfb
Some checks failed
/ combine-systems (push) Blocked by required conditions
/ build (x86_64-linux) (push) Failing after 11m44s
/ build (aarch64-linux) (push) Failing after 11m50s
/ build (push) Failing after 16m42s
Merge commit '1e2ed035f4bebc9adad02b365508ad96f7df87c1' into HEAD
2025-03-02 02:23:32 +00:00

27 lines
1.1 KiB
Nix

{deployAndroidPackage, lib, stdenv, package, os, autoPatchelfHook, makeWrapper, pkgs, pkgsi686Linux, postInstall}:
deployAndroidPackage {
inherit package;
nativeBuildInputs = [ makeWrapper ]
++ lib.optionals (os == "linux") [ autoPatchelfHook ];
buildInputs = lib.optionals (os == "linux") [ pkgs.glibc pkgs.zlib pkgs.ncurses5 pkgs.libcxx ]
++ lib.optionals (os == "linux" && stdenv.isx86_64) (with pkgsi686Linux; [ glibc zlib ncurses5 ]);
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
}