depot/third_party/nixpkgs/pkgs/development/mobile/androidenv/platform-tools.nix
Default email 87f9c27ba9 Project import generated by Copybara.
GitOrigin-RevId: fe2ecaf706a5907b5e54d979fbde4924d84b65fc
2023-04-12 14:48:02 +02:00

20 lines
721 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.stdenv.cc.cc.lib 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
'';
}