Files
nixpkgs/pkgs/development/mobile/androidenv/build-tools.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

56 lines
1.3 KiB
Nix

{
deployAndroidPackage,
lib,
stdenv,
package,
os,
arch,
autoPatchelfHook,
makeWrapper,
pkgs,
pkgsi686Linux,
postInstall,
meta,
}:
deployAndroidPackage {
inherit package os arch;
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.hostPlatform.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
inherit meta;
}