2023-07-02 21:39:50 +03:00
|
|
|
{ mkDerivation, haskellPackages, fetchFromGitHub, lib }:
|
2022-10-16 01:04:55 +03:00
|
|
|
|
|
|
|
let
|
|
|
|
# deadd-notification-center.service
|
|
|
|
systemd-service = ''
|
|
|
|
[Unit]
|
|
|
|
Description=Deadd Notification Center
|
|
|
|
PartOf=graphical-session.target
|
|
|
|
|
|
|
|
[Service]
|
|
|
|
Type=dbus
|
|
|
|
BusName=org.freedesktop.Notifications
|
|
|
|
ExecStart=$out/bin/deadd-notification-center
|
|
|
|
|
|
|
|
[Install]
|
|
|
|
WantedBy=graphical-session.target
|
|
|
|
'';
|
|
|
|
in mkDerivation rec {
|
2020-05-28 10:19:01 +03:00
|
|
|
pname = "deadd-notification-center";
|
2023-08-11 10:31:56 +03:00
|
|
|
version = "2.1.1";
|
2020-05-28 10:19:01 +03:00
|
|
|
|
2021-01-18 22:11:22 +03:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "phuhl";
|
|
|
|
repo = "linux_notification_center";
|
2023-07-02 21:39:50 +03:00
|
|
|
rev = version;
|
2023-08-11 10:31:56 +03:00
|
|
|
hash = "sha256-VU9NaQVS0n8hFRjWMvCMkaF5mZ4hpnluV31+/SAK7tU=";
|
2020-05-28 10:19:01 +03:00
|
|
|
};
|
|
|
|
|
2022-10-16 01:04:55 +03:00
|
|
|
isLibrary = false;
|
2020-05-28 10:19:01 +03:00
|
|
|
|
2022-10-16 01:04:55 +03:00
|
|
|
isExecutable = true;
|
2020-05-28 10:19:01 +03:00
|
|
|
|
2022-10-16 01:04:55 +03:00
|
|
|
libraryHaskellDepends = with haskellPackages; [
|
2023-05-31 10:25:35 +03:00
|
|
|
aeson base bytestring ConfigFile containers dbus directory env-locale
|
2022-10-16 01:04:55 +03:00
|
|
|
filepath gi-cairo gi-gdk gi-gdkpixbuf gi-gio gi-glib gi-gobject
|
|
|
|
gi-gtk gi-pango haskell-gettext haskell-gi haskell-gi-base
|
|
|
|
hdaemonize here lens mtl process regex-tdfa setlocale split stm
|
2023-05-31 10:25:35 +03:00
|
|
|
tagsoup text time transformers tuple unix yaml
|
2020-05-28 10:19:01 +03:00
|
|
|
];
|
|
|
|
|
2022-10-16 01:04:55 +03:00
|
|
|
executableHaskellDepends = with haskellPackages; [ base ];
|
2021-01-18 22:11:22 +03:00
|
|
|
|
2022-10-16 01:04:55 +03:00
|
|
|
# Test suite does nothing.
|
|
|
|
doCheck = false;
|
2020-05-28 10:19:01 +03:00
|
|
|
|
2024-01-03 01:51:18 +03:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace src/NotificationCenter.hs \
|
|
|
|
--replace '/etc/xdg/deadd/deadd.css' "$out/etc/deadd.css"
|
|
|
|
'';
|
|
|
|
|
|
|
|
# Add systemd user unit and install default style.
|
2022-10-16 01:04:55 +03:00
|
|
|
postInstall = ''
|
|
|
|
mkdir -p $out/lib/systemd/user
|
2024-01-03 01:51:18 +03:00
|
|
|
install -Dm644 style.css $out/etc/deadd.css
|
2022-10-16 01:04:55 +03:00
|
|
|
echo "${systemd-service}" > $out/lib/systemd/user/deadd-notification-center.service
|
|
|
|
'';
|
|
|
|
|
|
|
|
description = "A haskell-written notification center for users that like a desktop with style";
|
|
|
|
homepage = "https://github.com/phuhl/linux_notification_center";
|
|
|
|
license = lib.licenses.bsd3;
|
|
|
|
maintainers = with lib.maintainers; [ melkor333 sna ];
|
|
|
|
platforms = lib.platforms.linux;
|
2024-02-11 05:19:15 +03:00
|
|
|
mainProgram = "deadd-notification-center";
|
2020-05-28 10:19:01 +03:00
|
|
|
}
|