Merge pull request #27122 from dtzWill/fix/jd-gui

jd-gui: Fix interpreter, add many missing deps, un-upx.
This commit is contained in:
Gabriel Ebner 2017-07-05 08:26:25 +02:00 committed by GitHub
commit f203b32bb8

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 = {