depot/third_party/nixpkgs/pkgs/development/tools/java/cfr/default.nix
Default email fcc03dbfc5 Project import generated by Copybara.
GitOrigin-RevId: ff96a0fa5635770390b184ae74debea75c3fd534
2021-02-13 15:23:35 +01:00

31 lines
864 B
Nix

{ lib, stdenv, makeWrapper, fetchurl, jre }:
stdenv.mkDerivation rec {
pname = "cfr";
version = "0.151";
src = fetchurl {
url = "http://www.benf.org/other/cfr/cfr_${version}.jar";
sha256 = "sha256-MW6QFbmvKVP8/0/oa/O7pwXzLnzSW9blNcaY3ool6Dc=";
};
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"
'';
meta = with lib; {
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;
};
}