2017-07-04 18:13:50 +00:00
|
|
|
{ stdenv, fetchurl, gtk2, atk, gdk_pixbuf, glib, pango, fontconfig, zlib, xorg, upx, patchelf }:
|
2014-06-17 19:20:54 +00:00
|
|
|
|
|
|
|
let
|
|
|
|
dynlibPath = stdenv.lib.makeLibraryPath
|
2017-07-04 18:13:50 +00:00
|
|
|
([ gtk2 atk gdk_pixbuf glib pango fontconfig zlib stdenv.cc.cc.lib ]
|
|
|
|
++ (with xorg; [
|
|
|
|
libX11
|
|
|
|
libXext
|
|
|
|
libXrender
|
|
|
|
libXrandr
|
|
|
|
libSM
|
|
|
|
libXfixes
|
|
|
|
libXdamage
|
|
|
|
libXcursor
|
|
|
|
libXinerama
|
|
|
|
libXi
|
|
|
|
libXcomposite
|
|
|
|
libXxf86vm
|
|
|
|
]));
|
2014-06-17 19:20:54 +00:00
|
|
|
in
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "jd-gui-${version}";
|
|
|
|
version = "0.3.5";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "http://jd.benow.ca/jd-gui/downloads/${name}.linux.i686.tar.gz";
|
|
|
|
sha256 = "0jrvzs2s836yvqi41c7fq0gfiwf187qg765b9r1il2bjc0mb3dqv";
|
|
|
|
};
|
|
|
|
|
2017-07-04 18:13:50 +00:00
|
|
|
nativeBuildInputs = [ upx patchelf ];
|
2014-06-17 19:20:54 +00:00
|
|
|
|
|
|
|
unpackPhase = "tar xf ${src}";
|
|
|
|
installPhase = ''
|
2017-07-04 18:13:50 +00:00
|
|
|
mkdir -p $out/bin
|
|
|
|
upx -d jd-gui -o $out/bin/jd-gui
|
|
|
|
|
|
|
|
patchelf \
|
|
|
|
--set-interpreter $(cat ${stdenv.cc}/nix-support/dynamic-linker) \
|
|
|
|
--set-rpath ${dynlibPath} \
|
|
|
|
$out/bin/jd-gui
|
2014-06-17 19:20:54 +00:00
|
|
|
'';
|
|
|
|
|
2017-08-11 09:40:08 +00:00
|
|
|
dontStrip = true;
|
|
|
|
|
2014-06-17 19:20:54 +00:00
|
|
|
meta = {
|
|
|
|
description = "Fast Java Decompiler with powerful GUI";
|
|
|
|
homepage = "http://jd.benow.ca/";
|
|
|
|
license = stdenv.lib.licenses.unfreeRedistributable;
|
|
|
|
platforms = [ "i686-linux" ];
|
|
|
|
maintainers = [ stdenv.lib.maintainers.thoughtpolice ];
|
|
|
|
};
|
|
|
|
}
|