Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ stdenv 2, lib 3, fetchurl 4, jre 5, makeWrapper 6, unzip 7}: 8stdenv.mkDerivation rec { 9 name = "${pname}-${version}"; 10 pname = "dex2jar"; 11 version = "2.0"; 12 13 src = fetchurl { 14 url = "mirror://sourceforge/${pname}/${name}.zip"; 15 sha256 = "1g3mrbyl8sdw1nhp17z23qbfzqpa0w2yxrywgphvd04jdr6yn1vr"; 16 }; 17 18 nativeBuildInputs = [ makeWrapper unzip ]; 19 20 postPatch = '' 21 rm *.bat 22 chmod +x *.sh 23 ''; 24 25 installPhase = '' 26 f=$out/lib/dex2jar/ 27 28 mkdir -p $f $out/bin 29 30 mv * $f 31 for i in $f/*.sh; do 32 n=$(basename ''${i%.sh}) 33 makeWrapper $i $out/bin/$n --prefix PATH : ${lib.makeBinPath [ jre ] } 34 done 35 ''; 36 37 meta = with lib; { 38 homepage = "https://sourceforge.net/projects/dex2jar/"; 39 description = "Tools to work with android .dex and java .class files"; 40 maintainers = with maintainers; [ makefu ]; 41 license = licenses.asl20; 42 platforms = platforms.linux; 43 }; 44}