summaryrefslogtreecommitdiffstats
path: root/makefu/5pkgs
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2017-08-06 16:09:19 +0200
committermakefu <github@syntax-fehler.de>2017-08-06 16:14:37 +0200
commit7070c7b45898f2d1c9c5f3587bd6b62487d0f1e5 (patch)
tree3d552464a9c084ea0ca8986d2aa76ef3c8624463 /makefu/5pkgs
parentdb97b0ecc9bd537c795b3d928aff897eaf86296e (diff)
ma jd-gui: init
Diffstat (limited to 'makefu/5pkgs')
-rw-r--r--makefu/5pkgs/jd-gui/default.nix36
1 files changed, 36 insertions, 0 deletions
diff --git a/makefu/5pkgs/jd-gui/default.nix b/makefu/5pkgs/jd-gui/default.nix
new file mode 100644
index 000000000..adefd80dd
--- /dev/null
+++ b/makefu/5pkgs/jd-gui/default.nix
@@ -0,0 +1,36 @@
+{ stdenv, lib, pkgs, fetchurl, jre, makeWrapper, unzip }:
+stdenv.mkDerivation rec {
+ name = "${packageName}-${version}";
+ packageName = "jd-gui";
+ version = "1.4.0";
+
+ src = fetchurl {
+ url = "https://github.com/java-decompiler/jd-gui/releases/download/v${version}/${name}.jar";
+ sha256 = "0rvbplkhafb6s9aiwgcq4ffz4bvzyp7q511pd46hx4ahhzfg7lmx";
+ };
+
+ nativeBuildInputs = [ makeWrapper unzip ];
+
+ phases = [ "installPhase" ];
+
+ installPhase = ''
+ f=$out/lib/jd-gui/
+ bin=$out/bin
+ name=$(basename $src)
+ mkdir -p $f $bin
+
+ # fixup path to java
+ cp $src $f
+ cat > $bin/jd-gui <<EOF
+ #!/bin/sh
+ exec ${pkgs.jre}/bin/java -jar $f/$name \$@
+ EOF
+ chmod +x $bin/jd-gui
+ '';
+
+ meta = {
+ homepage = https://github.com/java-decompiler/jd-gui;
+ description = "A standalone Java Decompiler GUI";
+ license = lib.licenses.gpl3;
+ };
+}