nixpkgs-suyu/pkgs/development/tools/java/cfr/default.nix
volth 46420bbaa3 treewide: name -> pname (easy cases) (#66585)
treewide replacement of

stdenv.mkDerivation rec {
  name = "*-${version}";
  version = "*";

to pname
2019-08-15 13:41:18 +01:00

31 lines
865 B
Nix

{ stdenv, makeWrapper, fetchurl, jre }:
stdenv.mkDerivation rec {
pname = "cfr";
version = "0.146";
src = fetchurl {
url = "http://www.benf.org/other/cfr/cfr_${version}.jar";
sha256 = "16pmn3shhb00x3ba2zazbkprwvc34a6dds8ghc53winbf371xi3c";
};
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 stdenv.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;
};
}