diff options
author | makefu <github@syntax-fehler.de> | 2017-08-05 22:33:02 +0200 |
---|---|---|
committer | makefu <github@syntax-fehler.de> | 2017-08-05 22:34:29 +0200 |
commit | c82422df5690adda413379f3105c43be10b480d6 (patch) | |
tree | 11fcb25bd10bb2b0546f58662e35ac272589872c | |
parent | 615033a2428f99568f88aa194be631f5bf82aacd (diff) |
ma dex2jar: init
-rw-r--r-- | makefu/5pkgs/dex2jar/default.nix | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/makefu/5pkgs/dex2jar/default.nix b/makefu/5pkgs/dex2jar/default.nix new file mode 100644 index 000000000..b519b80a2 --- /dev/null +++ b/makefu/5pkgs/dex2jar/default.nix @@ -0,0 +1,48 @@ +{ stdenv, lib, pkgs, fetchurl, jre, makeWrapper, unzip }: +stdenv.mkDerivation rec { + name = "${packageName}-${version}"; + packageName = "dex2jar"; + version = "2.0"; + + src = fetchurl { + url = "mirror://sourceforge/${packageName}/${name}.zip"; + sha256 = "1g3mrbyl8sdw1nhp17z23qbfzqpa0w2yxrywgphvd04jdr6yn1vr"; + }; + + nativeBuildInputs = [ makeWrapper unzip ]; + + unpackPhase = '' + unzip $src + cd ${name} + ''; + + configurePhase = ":"; + + buildPhase = '' + rm *.bat + chmod +x *.sh + ''; + + installPhase = '' + f=$out/lib/dex2jar/ + bin=$out/bin + + mkdir -p $f $bin + + # fixup path to java + sed -i 's#^java#${pkgs.jre}/bin/java#' d2j_invoke.sh + + mv * $f + for i in $f/*.sh; do + n=$(basename ''${i%.sh}) + makeWrapper $i $bin/$n + done + ''; + fixupPhase = ":"; + + meta = { + homepage = https://sourceforge.net/projects/dex2jar/; + description = "convert dex to jar"; + license = lib.licenses.asl20; + }; +} |