at 23.11-beta 45 lines 1.0 kB view raw
1{ lib 2, stdenvNoCC 3, fetchurl 4, jre 5, makeWrapper 6, unzip 7}: 8 9stdenvNoCC.mkDerivation (finalAttrs: { 10 pname = "dex2jar"; 11 version = "2.4"; 12 13 src = fetchurl { 14 url = "https://github.com/pxb1988/dex2jar/releases/download/v${finalAttrs.version}/dex-tools-v${finalAttrs.version}.zip"; 15 hash = "sha256-7nxF6zwdJHSmFF2NRH5lGnNqItlmS209O+WlqBfdojo="; 16 }; 17 18 nativeBuildInputs = [ makeWrapper unzip ]; 19 20 postPatch = '' 21 rm *.bat 22 chmod +x *.sh 23 ''; 24 25 installPhase = '' 26 f=$out/share/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://github.com/pxb1988/dex2jar"; 39 description = "Tools to work with android .dex and java .class files"; 40 maintainers = with maintainers; [ makefu ]; 41 sourceProvenance = with sourceTypes; [ binaryBytecode ]; 42 license = licenses.asl20; 43 platforms = platforms.unix; 44 }; 45})