summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--pkgs/applications/misc/dunst/default.nix49
1 files changed, 23 insertions, 26 deletions
diff --git a/pkgs/applications/misc/dunst/default.nix b/pkgs/applications/misc/dunst/default.nix
index 3e60a40ab53..0c51cb13262 100644
--- a/pkgs/applications/misc/dunst/default.nix
+++ b/pkgs/applications/misc/dunst/default.nix
@@ -1,40 +1,37 @@
-{ stdenv, fetchurl, coreutils, unzip, which, pkgconfig, dbus
-, freetype, xdg_utils, libXext, glib, pango, cairo, libX11, libnotify
-, libxdg_basedir, libXScrnSaver, xproto, libXinerama, perl, gdk_pixbuf
-, dbus_daemon, makeWrapper
+{ stdenv, fetchFromGitHub
+, pkgconfig, which, perl
+, cairo, dbus, freetype, gdk_pixbuf, glib, libX11, libXScrnSaver
+, libXext, libXinerama, libnotify, libxdg_basedir, pango, xproto
 }:
 
 stdenv.mkDerivation rec {
-  name = "dunst-1.1.0";
+  name = "dunst-${version}";
   version = "1.1.0";
 
-  src = fetchurl {
-    url = "https://github.com/knopwob/dunst/archive/v${version}.tar.gz";
-    sha256 = "0x95f57s0a96c4lifxdpf73v706iggwmdw8742mabbjnxq55l1qs";
+  src = fetchFromGitHub {
+    owner = "knopwob";
+    repo = "dunst";
+    rev = "v${version}";
+    sha256 = "102s0rkcdz22hnacsi3dhm7kj3lsw9gnikmh3a7wk862nkvvwjmk";
   };
 
-  buildInputs =
-  [ coreutils unzip which pkgconfig dbus freetype libnotify gdk_pixbuf
-    xdg_utils libXext glib pango cairo libX11 libxdg_basedir
-    libXScrnSaver xproto libXinerama perl dbus_daemon makeWrapper ];
+  nativeBuildInputs = [ perl pkgconfig which ];
 
-  buildPhase = ''
-    export VERSION=${version};
-    export PREFIX=$out;
-    make dunst;
-  '';
+  buildInputs = [
+    cairo dbus freetype gdk_pixbuf glib libX11 libXScrnSaver libXext
+    libXinerama libnotify libxdg_basedir pango xproto
+  ];
 
-  postFixup = ''
-    wrapProgram "$out/bin/dunst" \
-      --prefix PATH : '${dbus_daemon.out}/bin'
-  '';
+  outputs = [ "out" "man" ];
 
-  meta = {
-    description = "lightweight and customizable notification daemon";
+  makeFlags = [ "PREFIX=$(out)" "VERSION=$(version)" ];
+
+  meta = with stdenv.lib; {
+    description = "Lightweight and customizable notification daemon";
     homepage = http://www.knopwob.org/dunst/;
-    license = stdenv.lib.licenses.bsd3;
+    license = licenses.bsd3;
     # NOTE: 'unix' or even 'all' COULD work too, I'm not sure
-    platforms = stdenv.lib.platforms.linux;
-    maintainers = [ stdenv.lib.maintainers.domenkozar ];
+    platforms = platforms.linux;
+    maintainers = [ maintainers.domenkozar ];
   };
 }