nixpkgs/pkgs/by-name/du/dunst/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

104 lines
2.0 KiB
Nix
Raw Normal View History

2024-04-19 21:18:13 +00:00
{ stdenv
, lib
, fetchFromGitHub
, makeWrapper
, pkg-config
, which
, perl
, jq
, libXrandr
, coreutils
, cairo
, dbus
, systemd
, gdk-pixbuf
, glib
, libX11
, libXScrnSaver
, wayland
, wayland-protocols
, libXinerama
, libnotify
, pango
, xorgproto
, librsvg
, testers
, dunst
, withX11 ? true
, withWayland ? true
}:
stdenv.mkDerivation (finalAttrs: {
2019-07-07 14:59:58 +00:00
pname = "dunst";
2024-04-19 19:12:11 +00:00
version = "1.11.0";
src = fetchFromGitHub {
2017-07-15 12:54:18 +00:00
owner = "dunst-project";
repo = "dunst";
rev = "v${finalAttrs.version}";
2024-04-19 19:12:11 +00:00
hash = "sha256-eiFvvavXGNcHZnEGwlTLxRqFNdkvEZMwNIkVyDn1V6o=";
};
2024-04-19 21:18:13 +00:00
nativeBuildInputs = [
perl
pkg-config
which
systemd
makeWrapper
];
buildInputs = [
2024-04-19 21:18:13 +00:00
cairo
dbus
gdk-pixbuf
glib
libnotify
pango
librsvg
] ++ lib.optionals withX11 [
libX11
libXScrnSaver
libXinerama
xorgproto
libXrandr
] ++ lib.optionals withWayland [
wayland
wayland-protocols
];
outputs = [ "out" "man" ];
2018-01-21 15:01:58 +00:00
makeFlags = [
"PREFIX=$(out)"
"VERSION=$(version)"
"SYSCONFDIR=$(out)/etc"
2018-01-21 15:01:58 +00:00
"SERVICEDIR_DBUS=$(out)/share/dbus-1/services"
"SERVICEDIR_SYSTEMD=$(out)/lib/systemd/user"
]
++ lib.optional (!withX11) "X11=0"
++ lib.optional (!withWayland) "WAYLAND=0";
postInstall = ''
wrapProgram $out/bin/dunst \
--set GDK_PIXBUF_MODULE_FILE "$GDK_PIXBUF_MODULE_FILE"
2023-03-15 06:49:05 +00:00
wrapProgram $out/bin/dunstctl \
--prefix PATH : "${lib.makeBinPath [ coreutils dbus ]}"
2024-04-19 19:12:11 +00:00
substituteInPlace $out/share/zsh/site-functions/_dunstctl $out/share/fish/vendor_completions.d/{dunstctl,dunstify} \
--replace-fail "jq" "${lib.getExe jq}"
'';
passthru.tests.version = testers.testVersion { package = dunst; };
2021-11-08 07:47:40 +00:00
2019-07-07 14:59:58 +00:00
meta = with lib; {
description = "Lightweight and customizable notification daemon";
2019-07-07 14:59:58 +00:00
homepage = "https://dunst-project.org/";
license = licenses.bsd3;
# NOTE: 'unix' or even 'all' COULD work too, I'm not sure
platforms = platforms.linux;
2024-04-19 20:52:32 +00:00
maintainers = with maintainers; [ domenkozar gepbird ];
2023-08-04 19:10:05 +00:00
mainProgram = "dunst";
};
})