summary refs log tree commit diff
path: root/pkgs/tools/X11/hsetroot/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/tools/X11/hsetroot/default.nix')
-rw-r--r--pkgs/tools/X11/hsetroot/default.nix46
1 files changed, 25 insertions, 21 deletions
diff --git a/pkgs/tools/X11/hsetroot/default.nix b/pkgs/tools/X11/hsetroot/default.nix
index 3bfe98a7a21..0d42687bf0b 100644
--- a/pkgs/tools/X11/hsetroot/default.nix
+++ b/pkgs/tools/X11/hsetroot/default.nix
@@ -1,36 +1,40 @@
-{ stdenv, fetchurl, autoconf, automake, imlib2, libtool, libX11, pkgconfig, xorgproto }:
+{ stdenv
+, fetchFromGitHub
+, pkg-config
+, imlib2
+, libX11
+, libXinerama
+}:
 
 stdenv.mkDerivation rec {
   pname = "hsetroot";
-  version = "1.0.2";
+  version = "1.0.5";
 
-  # The primary download site seems to no longer exist; use Gentoo's mirror for now.
-  src = fetchurl {
-    url = "http://mirror.datapipe.net/gentoo/distfiles/hsetroot-${version}.tar.gz";
-    sha256 = "d6712d330b31122c077bfc712ec4e213abe1fe71ab24b9150ae2774ca3154fd7";
+  src = fetchFromGitHub {
+    owner = "himdel";
+    repo = "hsetroot";
+    rev = version;
+    sha256 = "1jbk5hlxm48zmjzkaq5946s58rqwg1v1ds2sdyd2ba029hmvr722";
   };
 
-  # See https://bugs.gentoo.org/show_bug.cgi?id=504056
-  underlinkingPatch = fetchurl {
-    url = "http://www.gtlib.gatech.edu/pub/gentoo/gentoo-x86-portage/x11-misc/hsetroot/files/hsetroot-1.0.2-underlinking.patch";
-    name = "hsetroot-1.0.2-underlinking.patch";
-    sha256 = "1px1p3wz7ji725z9nlwb0x0h6lnnvnpz15sblzzq7zrijl3wz65x";
-  };
-
-  nativeBuildInputs = [ pkgconfig ];
-  buildInputs = [ autoconf automake imlib2 libtool libX11 xorgproto ];
-
-  patches = [ underlinkingPatch ];
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [
+    imlib2
+    libX11
+    libXinerama
+  ];
 
-  patchFlags = [ "-p0" ];
+  makeFlags = [ "PREFIX=$(out)" ];
 
-  preConfigure = "./autogen.sh";
+  preInstall = ''
+    mkdir -p "$out/bin"
+  '';
 
   meta = with stdenv.lib; {
     description = "Allows you to compose wallpapers ('root pixmaps') for X";
-    homepage = "https://thegraveyard.org/hsetroot.html";
+    homepage = "https://github.com/himdel/hsetroot";
     license = licenses.gpl2Plus;
-    maintainers = [ maintainers.henrytill ];
+    maintainers = with maintainers; [ henrytill shamilton ];
     platforms = platforms.unix;
   };
 }