2021-01-23 12:26:19 +00:00
|
|
|
{ lib, stdenv, makeWrapper, fetchurl, jre }:
|
2015-05-09 01:43:40 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "cfr";
|
2021-12-21 18:38:47 +00:00
|
|
|
version = "0.152";
|
2015-05-09 01:43:40 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "http://www.benf.org/other/cfr/cfr_${version}.jar";
|
2021-12-21 18:38:47 +00:00
|
|
|
sha256 = "sha256-9obo897Td9e8h9IWqQ6elRLfQVbnWwbGVaFmSK6HZbI=";
|
2015-05-09 01:43:40 +00:00
|
|
|
};
|
|
|
|
|
2019-04-24 19:34:23 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
2015-05-09 01:43:40 +00:00
|
|
|
|
2018-02-25 13:40:00 +00:00
|
|
|
buildCommand = ''
|
|
|
|
jar=$out/share/java/cfr_${version}.jar
|
|
|
|
install -Dm444 $src $jar
|
|
|
|
makeWrapper ${jre}/bin/java $out/bin/cfr --add-flags "-jar $jar"
|
2015-05-09 01:43:40 +00:00
|
|
|
'';
|
2016-01-24 19:31:44 +00:00
|
|
|
|
2021-01-23 12:26:19 +00:00
|
|
|
meta = with lib; {
|
2016-01-24 19:31:44 +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.
|
|
|
|
'';
|
2020-03-06 07:50:32 +00:00
|
|
|
homepage = "http://www.benf.org/other/cfr/";
|
2022-06-02 13:38:41 +00:00
|
|
|
sourceProvenance = with sourceTypes; [ binaryBytecode ];
|
2016-01-24 19:31:44 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
2015-05-09 01:43:40 +00:00
|
|
|
}
|