hsetroot: fix libX11 error

+23 -7
+23 -7
pkgs/tools/X11/hsetroot/default.nix
··· 1 - {stdenv, fetchurl, imlib2, libX11, libXext }: 1 + { stdenv, fetchurl, autoconf, automake, imlib2, libtool, libX11, pkgconfig, xproto }: 2 2 3 - stdenv.mkDerivation { 4 - name = "hsetroot-1.0.2"; 3 + stdenv.mkDerivation rec { 4 + name = "hsetroot-${version}"; 5 + version = "1.0.2"; 5 6 6 7 # The primary download site seems to no longer exist; use Gentoo's mirror for now. 7 8 src = fetchurl { 8 - url = "http://mirror.datapipe.net/gentoo/distfiles/hsetroot-1.0.2.tar.gz"; 9 + url = "http://mirror.datapipe.net/gentoo/distfiles/hsetroot-${version}.tar.gz"; 9 10 sha256 = "d6712d330b31122c077bfc712ec4e213abe1fe71ab24b9150ae2774ca3154fd7"; 10 11 }; 11 12 12 - buildInputs = [ imlib2 libX11 libXext ]; 13 + # See https://bugs.gentoo.org/show_bug.cgi?id=504056 14 + underlinkingPatch = fetchurl { 15 + url = http://www.gtlib.gatech.edu/pub/gentoo/gentoo-x86-portage/x11-misc/hsetroot/files/hsetroot-1.0.2-underlinking.patch; 16 + name = "hsetroot-1.0.2-underlinking.patch"; 17 + sha256 = "1px1p3wz7ji725z9nlwb0x0h6lnnvnpz15sblzzq7zrijl3wz65x"; 18 + }; 13 19 14 - meta = { 20 + buildInputs = [ autoconf automake imlib2 libtool libX11 pkgconfig xproto ]; 21 + 22 + patches = [ underlinkingPatch ]; 23 + 24 + patchFlags = "-p0"; 25 + 26 + preConfigure = "./autogen.sh"; 27 + 28 + meta = with stdenv.lib; { 15 29 description = "Allows you to compose wallpapers ('root pixmaps') for X"; 16 30 homepage = http://thegraveyard.org/hsetroot.html; 17 - license = stdenv.lib.licenses.gpl2Plus; 31 + license = licenses.gpl2Plus; 32 + maintainers = [ maintainers.henrytill ]; 33 + platforms = platforms.unix; 18 34 }; 19 35 }