2023-02-02 18:25:31 +00:00
|
|
|
{deployAndroidPackage, lib, package, os, autoPatchelfHook, makeWrapper, pkgs, pkgsi686Linux, postInstall}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
deployAndroidPackage {
|
|
|
|
inherit package os;
|
2022-09-09 14:08:57 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper ]
|
|
|
|
++ lib.optionals (os == "linux") [ autoPatchelfHook ];
|
2022-12-17 10:02:37 +00:00
|
|
|
buildInputs = lib.optionals (os == "linux") [ pkgs.glibc pkgs.zlib pkgs.ncurses5 pkgsi686Linux.glibc pkgsi686Linux.zlib pkgsi686Linux.ncurses5 pkgs.libcxx ];
|
2020-04-24 23:36:52 +00:00
|
|
|
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
|
|
|
|
''}
|
|
|
|
|
2022-08-21 13:32:41 +00:00
|
|
|
${lib.optionalString (lib.toInt (lib.versions.major package.revision) < 33) ''
|
|
|
|
wrapProgram $PWD/mainDexClasses \
|
|
|
|
--prefix PATH : ${pkgs.jdk8}/bin
|
|
|
|
''}
|
2023-02-02 18:25:31 +00:00
|
|
|
|
|
|
|
cd $out/libexec/android-sdk
|
|
|
|
'' + postInstall;
|
2020-04-24 23:36:52 +00:00
|
|
|
noAuditTmpdir = true; # The checker script gets confused by the build-tools path that is incorrectly identified as a reference to /build
|
|
|
|
}
|