dunst: refactoring (#15665)

- Use `fetchFromGitHub`
- No longer generate wrapper
  dunst doesn't appear to shell out to dbus; nor should it, really
- Use standard buildPhase
- Split outputs
- Also build dbus service file, so that dunst can be
  used with services.dbus.packages
This commit is contained in:
Joachim Fasting 2016-05-24 13:03:04 +02:00 committed by Domen Kožar
parent b614d72f40
commit ed50c2fae3

View File

@ -1,40 +1,37 @@
{ stdenv, fetchurl, coreutils, unzip, which, pkgconfig, dbus { stdenv, fetchFromGitHub
, freetype, xdg_utils, libXext, glib, pango, cairo, libX11, libnotify , pkgconfig, which, perl
, libxdg_basedir, libXScrnSaver, xproto, libXinerama, perl, gdk_pixbuf , cairo, dbus, freetype, gdk_pixbuf, glib, libX11, libXScrnSaver
, dbus_daemon, makeWrapper , libXext, libXinerama, libnotify, libxdg_basedir, pango, xproto
}: }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "dunst-1.1.0"; name = "dunst-${version}";
version = "1.1.0"; version = "1.1.0";
src = fetchurl { src = fetchFromGitHub {
url = "https://github.com/knopwob/dunst/archive/v${version}.tar.gz"; owner = "knopwob";
sha256 = "0x95f57s0a96c4lifxdpf73v706iggwmdw8742mabbjnxq55l1qs"; repo = "dunst";
rev = "v${version}";
sha256 = "102s0rkcdz22hnacsi3dhm7kj3lsw9gnikmh3a7wk862nkvvwjmk";
}; };
buildInputs = nativeBuildInputs = [ perl pkgconfig which ];
[ 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 ];
buildPhase = '' buildInputs = [
export VERSION=${version}; cairo dbus freetype gdk_pixbuf glib libX11 libXScrnSaver libXext
export PREFIX=$out; libXinerama libnotify libxdg_basedir pango xproto
make dunst; ];
'';
postFixup = '' outputs = [ "out" "man" ];
wrapProgram "$out/bin/dunst" \
--prefix PATH : '${dbus_daemon.out}/bin'
'';
meta = { makeFlags = [ "PREFIX=$(out)" "VERSION=$(version)" ];
description = "lightweight and customizable notification daemon";
meta = with stdenv.lib; {
description = "Lightweight and customizable notification daemon";
homepage = http://www.knopwob.org/dunst/; 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 # NOTE: 'unix' or even 'all' COULD work too, I'm not sure
platforms = stdenv.lib.platforms.linux; platforms = platforms.linux;
maintainers = [ stdenv.lib.maintainers.domenkozar ]; maintainers = [ maintainers.domenkozar ];
}; };
} }