Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / applications / misc / deadd-notification-center / default.nix
blob44c36281fadd96399f8e2055e2c493b0923cc14f
1 { mkDerivation, haskellPackages, fetchFromGitHub, lib }:
3 let
4   # deadd-notification-center.service
5   systemd-service = ''
6     [Unit]
7     Description=Deadd Notification Center
8     PartOf=graphical-session.target
10     [Service]
11     Type=dbus
12     BusName=org.freedesktop.Notifications
13     ExecStart=$out/bin/deadd-notification-center
15     [Install]
16     WantedBy=graphical-session.target
17   '';
18 in mkDerivation rec {
19   pname = "deadd-notification-center";
20   version = "2.1.1";
22   src = fetchFromGitHub {
23     owner = "phuhl";
24     repo = "linux_notification_center";
25     rev = version;
26     hash = "sha256-VU9NaQVS0n8hFRjWMvCMkaF5mZ4hpnluV31+/SAK7tU=";
27   };
29   isLibrary = false;
31   isExecutable = true;
33   libraryHaskellDepends = with haskellPackages; [
34     aeson base bytestring ConfigFile containers dbus directory env-locale
35     filepath gi-cairo gi-gdk gi-gdkpixbuf gi-gio gi-glib gi-gobject
36     gi-gtk gi-pango haskell-gettext haskell-gi haskell-gi-base
37     hdaemonize here lens mtl process regex-tdfa setlocale split stm
38     tagsoup text time transformers tuple unix yaml
39   ];
41   executableHaskellDepends = with haskellPackages; [ base ];
43   # Test suite does nothing.
44   doCheck = false;
46   # Add systemd user unit.
47   postInstall = ''
48     mkdir -p $out/lib/systemd/user
49     echo "${systemd-service}" > $out/lib/systemd/user/deadd-notification-center.service
50   '';
52   description = "A haskell-written notification center for users that like a desktop with style";
53   homepage = "https://github.com/phuhl/linux_notification_center";
54   license = lib.licenses.bsd3;
55   maintainers = with lib.maintainers; [ melkor333 sna ];
56   platforms = lib.platforms.linux;