nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 fetchurl,
5 runtimeShell,
6 jre_headless,
7}:
8
9stdenv.mkDerivation rec {
10 pname = "procyon";
11 version = "0.6.0";
12
13 src = fetchurl {
14 url = "https://github.com/mstrobel/procyon/releases/download/v${version}/procyon-decompiler-${version}.jar";
15 sha256 = "sha256-gh2pYBL8aSRPoeopjJBFXuTgIUNLx5bTuVRqskYBt3k=";
16 };
17
18 dontUnpack = true;
19
20 installPhase = ''
21 mkdir -p $out/bin $out/share/procyon
22 cp $src $out/share/procyon/procyon-decompiler.jar
23
24 cat << EOF > $out/bin/procyon
25 #!${runtimeShell}
26 exec ${jre_headless}/bin/java -jar $out/share/procyon/procyon-decompiler.jar "\$@"
27 EOF
28 chmod +x $out/bin/procyon
29 '';
30
31 meta = with lib; {
32 description = "Procyon is a suite of Java metaprogramming tools including a Java decompiler";
33 sourceProvenance = with sourceTypes; [ binaryBytecode ];
34 homepage = "https://github.com/mstrobel/procyon/";
35 license = licenses.asl20;
36 maintainers = [ ];
37 mainProgram = "procyon";
38 };
39}