summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorSandro <sandro.jaeckel@gmail.com>2023-04-02 02:20:05 +0200
committerGitHub <noreply@github.com>2023-04-02 02:20:05 +0200
commit8ee36b0a25ca5e7e5d45d9afb43ab041b1f2740c (patch)
treeb9c47dc99694787860f7050a8715f4e0857102e0 /pkgs
parent92daaff180c191298a1cb44b63297115f566bc28 (diff)
parentc3853b4745ae3e0c35d4e0ab808a841b4a43a039 (diff)
downloadnixpkgs-8ee36b0a25ca5e7e5d45d9afb43ab041b1f2740c.tar
nixpkgs-8ee36b0a25ca5e7e5d45d9afb43ab041b1f2740c.tar.gz
nixpkgs-8ee36b0a25ca5e7e5d45d9afb43ab041b1f2740c.tar.bz2
nixpkgs-8ee36b0a25ca5e7e5d45d9afb43ab041b1f2740c.tar.lz
nixpkgs-8ee36b0a25ca5e7e5d45d9afb43ab041b1f2740c.tar.xz
nixpkgs-8ee36b0a25ca5e7e5d45d9afb43ab041b1f2740c.tar.zst
nixpkgs-8ee36b0a25ca5e7e5d45d9afb43ab041b1f2740c.zip
Merge pull request #156621 from S-NA/updates/deadd-notification-center
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/applications/misc/deadd-notification-center/default.nix91
-rw-r--r--pkgs/top-level/all-packages.nix2
2 files changed, 44 insertions, 49 deletions
diff --git a/pkgs/applications/misc/deadd-notification-center/default.nix b/pkgs/applications/misc/deadd-notification-center/default.nix
index 4625a6dda99..8474eebf350 100644
--- a/pkgs/applications/misc/deadd-notification-center/default.nix
+++ b/pkgs/applications/misc/deadd-notification-center/default.nix
@@ -1,62 +1,57 @@
-{ lib
-, stdenv
-, fetchFromGitHub
-, autoPatchelfHook
-, wrapGAppsHook
-, hicolor-icon-theme
-, gtk3
-, gobject-introspection
-, libxml2
-, fetchpatch
-}:
-stdenv.mkDerivation rec {
+{ mkDerivation, haskellPackages, fetchFromGitHub, lib, writeText }:
+
+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 {
   pname = "deadd-notification-center";
-  version = "2022-04-20";
+  version = "unstable-2022-11-07";
 
   src = fetchFromGitHub {
     owner = "phuhl";
     repo = "linux_notification_center";
-    rev = "d31867472c35a09562c832b0a589479930c52b86";
-    sha256 = "sha256-Arl4niscJPYCFWd4mw42IgNs+JsHsVpaTx86zEj3KFM=";
+    rev = "f4b8e2b724d86def9e7b0e12ea624f95760352d5";
+    hash = "sha256-ClJfWqStULvmj5YRAUDAmn2WOSA2sVtyZsa+qSY51Gk=";
   };
 
-  patches = [
-    (fetchpatch {
-      url = "https://github.com/phuhl/linux_notification_center/commit/5244e1498574983322be97925e1ff7ebe456d974.patch";
-      sha256 = "sha256-hbqbgBmuewOhtx0na2tmFa5W128ZrBvDcyPme/mRzlI=";
-    })
-  ];
+  isLibrary = false;
 
-  nativeBuildInputs = [
-    autoPatchelfHook
-    wrapGAppsHook
-  ];
+  isExecutable = true;
 
-  buildInputs = [
-    gtk3
-    gobject-introspection
-    libxml2
-    hicolor-icon-theme
+  libraryHaskellDepends = with haskellPackages; [
+    base bytestring ConfigFile containers dbus directory env-locale
+    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
+    tagsoup text time transformers tuple unix
   ];
 
-  buildFlags = [
-    # Exclude stack from `make all` to use the prebuilt binary from .out/
-    "service"
-  ];
+  executableHaskellDepends = with haskellPackages; [ base ];
 
-  makeFlags = [
-    "PREFIX=${placeholder "out"}"
-    "SERVICEDIR_SYSTEMD=${placeholder "out"}/etc/systemd/user"
-    "SERVICEDIR_DBUS=${placeholder "out"}/share/dbus-1/services"
-    # Override systemd auto-detection.
-    "SYSTEMD=1"
-  ];
+  # Test suite does nothing.
+  doCheck = false;
 
-  meta = with lib; {
-    description = "A haskell-written notification center for users that like a desktop with style";
-    homepage = "https://github.com/phuhl/linux_notification_center";
-    license = licenses.bsd3;
-    maintainers = [ maintainers.pacman99 ];
-    platforms = platforms.linux;
-  };
+  # Add systemd user unit.
+  postInstall = ''
+    mkdir -p $out/lib/systemd/user
+    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;
 }
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 85f80ef6d58..496714cfeca 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -30371,7 +30371,7 @@ with pkgs;
 
   linvstmanager = qt5.callPackage ../applications/audio/linvstmanager { };
 
-  deadd-notification-center = callPackage ../applications/misc/deadd-notification-center { };
+  deadd-notification-center = haskell.lib.compose.justStaticExecutables (haskellPackages.callPackage ../applications/misc/deadd-notification-center { });
 
   lollypop = callPackage ../applications/audio/lollypop { };