nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{deployAndroidPackage, lib, package, os, autoPatchelfHook, pkgs}:
2
3deployAndroidPackage {
4 inherit package os;
5 buildInputs = [ autoPatchelfHook ]
6 ++ lib.optionals (os == "linux") [ pkgs.glibc pkgs.zlib pkgs.ncurses5 ];
7 patchInstructions = lib.optionalString (os == "linux") ''
8 addAutoPatchelfSearchPath $packageBaseDir/lib64
9 autoPatchelf --no-recurse $packageBaseDir/lib64
10 autoPatchelf --no-recurse $packageBaseDir
11 '' + ''
12 mkdir -p $out/bin
13 cd $out/bin
14 find $out/libexec/android-sdk/platform-tools -type f -executable -mindepth 1 -maxdepth 1 -not -name sqlite3 | while read i
15 do
16 ln -s $i
17 done
18 '';
19}