nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at devShellTools-shell 104 lines 2.1 kB view raw
1{ 2 mkDerivation, 3 haskellPackages, 4 fetchFromGitHub, 5 lib, 6}: 7 8let 9 # deadd-notification-center.service 10 systemd-service = '' 11 [Unit] 12 Description=Deadd Notification Center 13 PartOf=graphical-session.target 14 15 [Service] 16 Type=dbus 17 BusName=org.freedesktop.Notifications 18 ExecStart=$out/bin/deadd-notification-center 19 20 [Install] 21 WantedBy=graphical-session.target 22 ''; 23in 24mkDerivation rec { 25 pname = "deadd-notification-center"; 26 version = "2.1.1"; 27 28 src = fetchFromGitHub { 29 owner = "phuhl"; 30 repo = "linux_notification_center"; 31 rev = version; 32 hash = "sha256-VU9NaQVS0n8hFRjWMvCMkaF5mZ4hpnluV31+/SAK7tU="; 33 }; 34 35 isLibrary = false; 36 37 isExecutable = true; 38 39 libraryHaskellDepends = with haskellPackages; [ 40 aeson 41 base 42 bytestring 43 ConfigFile 44 containers 45 dbus 46 directory 47 env-locale 48 filepath 49 gi-cairo 50 gi-gdk 51 gi-gdkpixbuf 52 gi-gio 53 gi-glib 54 gi-gobject 55 gi-gtk 56 gi-pango 57 haskell-gettext 58 haskell-gi 59 haskell-gi-base 60 hdaemonize 61 here 62 lens 63 mtl 64 process 65 regex-tdfa 66 setlocale 67 split 68 stm 69 tagsoup 70 text 71 time 72 transformers 73 tuple 74 unix 75 yaml 76 ]; 77 78 executableHaskellDepends = with haskellPackages; [ base ]; 79 80 # Test suite does nothing. 81 doCheck = false; 82 83 postPatch = '' 84 substituteInPlace src/NotificationCenter.hs \ 85 --replace '/etc/xdg/deadd/deadd.css' "$out/etc/deadd.css" 86 ''; 87 88 # Add systemd user unit and install default style. 89 postInstall = '' 90 mkdir -p $out/lib/systemd/user 91 install -Dm644 style.css $out/etc/deadd.css 92 echo "${systemd-service}" > $out/lib/systemd/user/deadd-notification-center.service 93 ''; 94 95 description = "Haskell-written notification center for users that like a desktop with style"; 96 homepage = "https://github.com/phuhl/linux_notification_center"; 97 license = lib.licenses.bsd3; 98 maintainers = with lib.maintainers; [ 99 melkor333 100 sna 101 ]; 102 platforms = lib.platforms.linux; 103 mainProgram = "deadd-notification-center"; 104}