a0cb138ada
GitOrigin-RevId: a100acd7bbf105915b0004427802286c37738fef
20 lines
699 B
Nix
20 lines
699 B
Nix
{deployAndroidPackage, lib, package, os, autoPatchelfHook, pkgs}:
|
|
|
|
deployAndroidPackage {
|
|
inherit package os;
|
|
nativeBuildInputs = lib.optionals (os == "linux") [ autoPatchelfHook ];
|
|
buildInputs = lib.optionals (os == "linux") [ pkgs.glibc pkgs.zlib pkgs.ncurses5 ];
|
|
|
|
patchInstructions = lib.optionalString (os == "linux") ''
|
|
addAutoPatchelfSearchPath $packageBaseDir/lib64
|
|
autoPatchelf --no-recurse $packageBaseDir/lib64
|
|
autoPatchelf --no-recurse $packageBaseDir
|
|
'' + ''
|
|
mkdir -p $out/bin
|
|
cd $out/bin
|
|
find $out/libexec/android-sdk/platform-tools -type f -executable -mindepth 1 -maxdepth 1 -not -name sqlite3 | while read i
|
|
do
|
|
ln -s $i
|
|
done
|
|
'';
|
|
}
|