13da32182d
GitOrigin-RevId: a7855f2235a1876f97473a76151fec2afa02b287
23 lines
988 B
Nix
23 lines
988 B
Nix
{deployAndroidPackage, lib, package, os, autoPatchelfHook, makeWrapper, pkgs, pkgs_i686}:
|
|
|
|
deployAndroidPackage {
|
|
inherit package os;
|
|
buildInputs = [ makeWrapper ] ++
|
|
lib.optionals (os == "linux") [ autoPatchelfHook pkgs.glibc pkgs.zlib pkgs.ncurses5 pkgs_i686.glibc pkgs_i686.zlib pkgs_i686.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
|
|
''}
|
|
'';
|
|
noAuditTmpdir = true; # The checker script gets confused by the build-tools path that is incorrectly identified as a reference to /build
|
|
}
|