2022-12-28 02:26:10 +03:00
|
|
|
{deployAndroidPackage, lib, package, os, autoPatchelfHook, makeWrapper, pkgs, pkgsi686Linux, postInstall}:
|
2018-11-27 22:36:27 +03:00
|
|
|
|
|
|
|
deployAndroidPackage {
|
|
|
|
inherit package os;
|
2022-08-15 06:40:21 +03:00
|
|
|
nativeBuildInputs = [ makeWrapper ]
|
|
|
|
++ lib.optionals (os == "linux") [ autoPatchelfHook ];
|
2022-12-15 06:52:41 +03:00
|
|
|
buildInputs = lib.optionals (os == "linux") [ pkgs.glibc pkgs.zlib pkgs.ncurses5 pkgsi686Linux.glibc pkgsi686Linux.zlib pkgsi686Linux.ncurses5 pkgs.libcxx ];
|
2018-11-27 22:36:27 +03:00
|
|
|
patchInstructions = ''
|
|
|
|
${lib.optionalString (os == "linux") ''
|
|
|
|
addAutoPatchelfSearchPath $packageBaseDir/lib
|
2020-02-14 13:36:11 +03:00
|
|
|
if [[ -d $packageBaseDir/lib64 ]]; then
|
|
|
|
addAutoPatchelfSearchPath $packageBaseDir/lib64
|
|
|
|
autoPatchelf --no-recurse $packageBaseDir/lib64
|
|
|
|
fi
|
2018-11-27 22:36:27 +03:00
|
|
|
autoPatchelf --no-recurse $packageBaseDir
|
|
|
|
''}
|
|
|
|
|
2022-08-08 16:03:08 +03:00
|
|
|
${lib.optionalString (lib.toInt (lib.versions.major package.revision) < 33) ''
|
|
|
|
wrapProgram $PWD/mainDexClasses \
|
|
|
|
--prefix PATH : ${pkgs.jdk8}/bin
|
|
|
|
''}
|
2022-12-28 02:26:10 +03:00
|
|
|
|
|
|
|
cd $out/libexec/android-sdk
|
|
|
|
'' + postInstall;
|
2018-11-27 22:36:27 +03:00
|
|
|
noAuditTmpdir = true; # The checker script gets confused by the build-tools path that is incorrectly identified as a reference to /build
|
|
|
|
}
|