diff options
author | Tobias Geerinckx-Rice <tobias.geerinckx.rice@gmail.com> | 2015-05-09 03:43:40 +0200 |
---|---|---|
committer | Domen Kožar <domen@dev.si> | 2015-05-10 13:46:01 +0200 |
commit | 8bba7c5cf1593f8533c92a131ae2091d603e2ad9 (patch) | |
tree | 84b948f447253ee9d57d97c9fbb64641df6e6758 /pkgs/development/tools | |
parent | a7a0fcfbd21d6253ab681c9a1a66f22ca8833e26 (diff) | |
download | nixlib-8bba7c5cf1593f8533c92a131ae2091d603e2ad9.tar nixlib-8bba7c5cf1593f8533c92a131ae2091d603e2ad9.tar.gz nixlib-8bba7c5cf1593f8533c92a131ae2091d603e2ad9.tar.bz2 nixlib-8bba7c5cf1593f8533c92a131ae2091d603e2ad9.tar.lz nixlib-8bba7c5cf1593f8533c92a131ae2091d603e2ad9.tar.xz nixlib-8bba7c5cf1593f8533c92a131ae2091d603e2ad9.tar.zst nixlib-8bba7c5cf1593f8533c92a131ae2091d603e2ad9.zip |
Add cfr 0_100: another Java decompiler
Diffstat (limited to 'pkgs/development/tools')
-rw-r--r-- | pkgs/development/tools/java/cfr/default.nix | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/pkgs/development/tools/java/cfr/default.nix b/pkgs/development/tools/java/cfr/default.nix new file mode 100644 index 000000000000..6025a59f44cb --- /dev/null +++ b/pkgs/development/tools/java/cfr/default.nix @@ -0,0 +1,41 @@ +{ stdenv, fetchurl, jre }: + +let version = "0_100"; in +stdenv.mkDerivation rec { + name = "cfr-${version}"; + + src = fetchurl { + sha256 = "0q5kh5qdksykz339p55jz0q5cjqvxdzv3a7r4kkijgbfjm1ldr5f"; + url = "http://www.benf.org/other/cfr/cfr_${version}.jar"; + }; + + meta = with stdenv.lib; { + inherit version; + description = "Another java decompiler"; + longDescription = '' + CFR will decompile modern Java features - Java 8 lambdas (pre and post + Java beta 103 changes), Java 7 String switches etc, but is written + entirely in Java 6. + ''; + homepage = http://www.benf.org/other/cfr/; + license = with licenses; mit; + platforms = with platforms; linux; + maintainers = with maintainers; [ nckx ]; + }; + + buildInputs = [ jre ]; + + phases = [ "installPhase" ]; + + installPhase = '' + jar=$out/share/cfr/cfr_${version}.jar + + install -Dm644 ${src} $jar + + cat << EOF > cfr + #!${stdenv.shell} + exec ${jre}/bin/java -jar $jar "\''${@}" + EOF + install -Dm755 cfr $out/bin/cfr + ''; +} |