2021-02-05 17:12:51 +00:00
|
|
|
{ lib, stdenv, makeWrapper, fetchurl, jre }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "cfr";
|
2021-02-13 14:23:35 +00:00
|
|
|
version = "0.151";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "http://www.benf.org/other/cfr/cfr_${version}.jar";
|
2021-02-13 14:23:35 +00:00
|
|
|
sha256 = "sha256-MW6QFbmvKVP8/0/oa/O7pwXzLnzSW9blNcaY3ool6Dc=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
|
|
|
buildCommand = ''
|
|
|
|
jar=$out/share/java/cfr_${version}.jar
|
|
|
|
install -Dm444 $src $jar
|
|
|
|
makeWrapper ${jre}/bin/java $out/bin/cfr --add-flags "-jar $jar"
|
|
|
|
'';
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
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 = licenses.mit;
|
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
}
|