nixpkgs/pkgs/development/mobile/androidenv/platform-tools.nix

20 lines
652 B
Nix
Raw Normal View History

{deployAndroidPackage, lib, package, os, autoPatchelfHook, pkgs}:
deployAndroidPackage {
inherit package os;
buildInputs = [ autoPatchelfHook ]
2019-11-10 00:52:53 +01:00
++ 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
'' + ''
2015-04-22 16:29:18 +02:00
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
2015-04-22 16:29:18 +02:00
do
ln -s $i
2015-04-22 16:29:18 +02:00
done
'';
}