jd-gui: Fix interpreter, add many missing deps, un-upx.

This commit is contained in:
Will Dietz 2017-07-04 13:13:50 -05:00
parent f873ba8cc8
commit ad29479457

View File

@ -1,8 +1,22 @@
{ stdenv, fetchurl, gtk2, atk, gdk_pixbuf, pango, makeWrapper }:
{ stdenv, fetchurl, gtk2, atk, gdk_pixbuf, glib, pango, fontconfig, zlib, xorg, upx, patchelf }:
let
dynlibPath = stdenv.lib.makeLibraryPath
[ gtk2 atk gdk_pixbuf pango ];
([ 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
]));
in
stdenv.mkDerivation rec {
name = "jd-gui-${version}";
@ -13,14 +27,18 @@ stdenv.mkDerivation rec {
sha256 = "0jrvzs2s836yvqi41c7fq0gfiwf187qg765b9r1il2bjc0mb3dqv";
};
buildInputs = [ makeWrapper ];
nativeBuildInputs = [ upx patchelf ];
phases = "unpackPhase installPhase";
unpackPhase = "tar xf ${src}";
installPhase = ''
mkdir -p $out/bin && mv jd-gui $out/bin
wrapProgram $out/bin/jd-gui \
--prefix LD_LIBRARY_PATH ":" "${dynlibPath}"
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
'';
meta = {