lol
fork

Configure Feed

Select the types of activity you want to include in your feed.

at 18.09-beta 51 lines 1.7 kB view raw
1{ buildPackages, pkgs }: 2 3let 4 inherit (buildPackages) fetchurl unzip; 5 inherit (pkgs) stdenv zlib; 6in 7 8stdenv.mkDerivation rec { 9 version = "26.0.2"; 10 name = "android-platform-tools-r${version}"; 11 src = if (stdenv.hostPlatform.system == "i686-linux" || stdenv.hostPlatform.system == "x86_64-linux") 12 then fetchurl { 13 url = "https://dl.google.com/android/repository/platform-tools_r${version}-linux.zip"; 14 sha256 = "0695npvxljbbh8xwfm65k34fcpyfkzvfkssgnp46wkmnq8w5mcb3"; 15 } 16 else if stdenv.hostPlatform.system == "x86_64-darwin" then fetchurl { 17 url = "https://dl.google.com/android/repository/platform-tools_r${version}-darwin.zip"; 18 sha256 = "0gy7apw9pmnnm41z6ywglw5va4ghmny4j57778may4q7ar751l56"; 19 } 20 else throw "System ${stdenv.hostPlatform.system} not supported!"; 21 22 buildCommand = '' 23 mkdir -p $out 24 cd $out 25 unzip $src 26 cd platform-tools 27 28 ${stdenv.lib.optionalString (stdenv.hostPlatform.system == "i686-linux" || stdenv.hostPlatform.system == "x86_64-linux") 29 '' 30 for i in adb dmtracedump fastboot hprof-conv sqlite3 31 do 32 patchelf --set-interpreter ${stdenv.cc.libc.out}/lib/ld-linux-x86-64.so.2 $i 33 patchelf --set-rpath ${stdenv.cc.cc.lib}/lib:`pwd`/lib64 $i 34 done 35 36 for i in etc1tool 37 do 38 patchelf --set-interpreter ${stdenv.cc.libc.out}/lib/ld-linux-x86-64.so.2 $i 39 patchelf --set-rpath ${stdenv.cc.cc.lib}/lib:${zlib.out}/lib:`pwd`/lib64 $i 40 done 41 ''} 42 43 mkdir -p $out/bin 44 for i in adb fastboot 45 do 46 ln -sf $out/platform-tools/$i $out/bin/$i 47 done 48 ''; 49 50 nativeBuildInputs = [ unzip ]; 51}