Skip to content

Commit

Permalink
dex2jar: init at 2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
makefu committed May 28, 2020
1 parent 17812e6 commit e682df2
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 0 deletions.
44 changes: 44 additions & 0 deletions pkgs/development/tools/java/dex2jar/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{ stdenv
, lib
, fetchurl
, jre
, makeWrapper
, unzip
}:
stdenv.mkDerivation rec {
name = "${pname}-${version}";
pname = "dex2jar";
version = "2.0";

src = fetchurl {
url = "mirror://sourceforge/${pname}/${name}.zip";
sha256 = "1g3mrbyl8sdw1nhp17z23qbfzqpa0w2yxrywgphvd04jdr6yn1vr";
};

nativeBuildInputs = [ makeWrapper unzip ];

postPatch = ''
rm *.bat
chmod +x *.sh
'';

installPhase = ''
f=$out/lib/dex2jar/
mkdir -p $f $out/bin
mv * $f
for i in $f/*.sh; do
n=$(basename ''${i%.sh})
makeWrapper $i $out/bin/$n --prefix PATH : ${lib.makeBinPath [ jre ] }
done
'';

meta = with stdenv.lib; {
homepage = https://sourceforge.net/projects/dex2jar/;
description = "Tools to work with android .dex and java .class files";
maintainers = with maintainers; [ makefu ];
license = licenses.asl20;
platforms = platforms.linux;
};
}
2 changes: 2 additions & 0 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -15513,6 +15513,8 @@ in

dex-oidc = callPackage ../servers/dex { };

dex2jar = callPackage ../development/tools/java/dex2jar { };

doh-proxy = callPackage ../servers/dns/doh-proxy {
python3Packages = python36Packages;
};
Expand Down

0 comments on commit e682df2

Please sign in to comment.