at master 37 lines 830 B view raw
1{ 2 deployAndroidPackage, 3 lib, 4 package, 5 os, 6 arch, 7 autoPatchelfHook, 8 pkgs, 9 meta, 10}: 11 12deployAndroidPackage { 13 inherit package os arch; 14 nativeBuildInputs = lib.optionals (os == "linux") [ autoPatchelfHook ]; 15 buildInputs = lib.optionals (os == "linux") [ 16 pkgs.glibc 17 (lib.getLib pkgs.stdenv.cc.cc) 18 pkgs.zlib 19 pkgs.ncurses5 20 ]; 21 22 patchInstructions = 23 lib.optionalString (os == "linux") '' 24 addAutoPatchelfSearchPath $packageBaseDir/lib64 25 autoPatchelf --no-recurse $packageBaseDir/lib64 26 autoPatchelf --no-recurse $packageBaseDir 27 '' 28 + '' 29 mkdir -p $out/bin 30 cd $out/bin 31 find $out/libexec/android-sdk/platform-tools -type f -executable -mindepth 1 -maxdepth 1 -not -name sqlite3 | while read i 32 do 33 ln -s $i 34 done 35 ''; 36 inherit meta; 37}