2021-12-06 16:07:01 +00:00
|
|
|
{ stdenv, lib, fetchFromGitHub, makeWrapper
|
2023-05-24 13:37:59 +00:00
|
|
|
, pkg-config, which, perl, jq, libXrandr, coreutils
|
2020-04-24 23:36:52 +00:00
|
|
|
, cairo, dbus, systemd, gdk-pixbuf, glib, libX11, libXScrnSaver
|
2021-10-28 06:52:43 +00:00
|
|
|
, wayland, wayland-protocols
|
2021-03-12 07:09:13 +00:00
|
|
|
, libXinerama, libnotify, pango, xorgproto, librsvg
|
2022-04-27 09:35:20 +00:00
|
|
|
, testers, dunst
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "dunst";
|
2023-04-29 16:46:19 +00:00
|
|
|
version = "1.9.2";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "dunst-project";
|
|
|
|
repo = "dunst";
|
|
|
|
rev = "v${version}";
|
2023-04-29 16:46:19 +00:00
|
|
|
sha256 = "sha256-8IH0WTPSaAundhYh4l7gQR66nyT38H4DstRTm+Xh+Z8=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
nativeBuildInputs = [ perl pkg-config which systemd makeWrapper ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
cairo dbus gdk-pixbuf glib libX11 libXScrnSaver
|
|
|
|
libXinerama libnotify pango xorgproto librsvg libXrandr
|
2021-10-28 06:52:43 +00:00
|
|
|
wayland wayland-protocols
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
outputs = [ "out" "man" ];
|
|
|
|
|
|
|
|
makeFlags = [
|
|
|
|
"PREFIX=$(out)"
|
|
|
|
"VERSION=$(version)"
|
2021-03-12 07:09:13 +00:00
|
|
|
"SYSCONFDIR=$(out)/etc"
|
2020-04-24 23:36:52 +00:00
|
|
|
"SERVICEDIR_DBUS=$(out)/share/dbus-1/services"
|
|
|
|
"SERVICEDIR_SYSTEMD=$(out)/lib/systemd/user"
|
|
|
|
];
|
|
|
|
|
2021-03-12 07:09:13 +00:00
|
|
|
postInstall = ''
|
2020-04-24 23:36:52 +00:00
|
|
|
wrapProgram $out/bin/dunst \
|
|
|
|
--set GDK_PIXBUF_MODULE_FILE "$GDK_PIXBUF_MODULE_FILE"
|
2023-03-24 00:07:29 +00:00
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
wrapProgram $out/bin/dunstctl \
|
|
|
|
--prefix PATH : "${lib.makeBinPath [ coreutils dbus ]}"
|
|
|
|
|
2023-03-24 00:07:29 +00:00
|
|
|
install -D contrib/_dunst.zshcomp $out/share/zsh/site-functions/_dunst
|
|
|
|
install -D contrib/_dunstctl.zshcomp $out/share/zsh/site-functions/_dunstctl
|
|
|
|
substituteInPlace $out/share/zsh/site-functions/_dunstctl \
|
|
|
|
--replace "jq -M" "${jq}/bin/jq -M"
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
passthru.tests.version = testers.testVersion { package = dunst; };
|
2021-12-06 16:07:01 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Lightweight and customizable notification daemon";
|
|
|
|
homepage = "https://dunst-project.org/";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
# NOTE: 'unix' or even 'all' COULD work too, I'm not sure
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ domenkozar ];
|
2023-08-04 22:07:22 +00:00
|
|
|
mainProgram = "dunst";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|