From d9d9a72656bdd106dc068840e05d15f41cfc04f6 Mon Sep 17 00:00:00 2001
From: Zynh Ludwig <zynh0722@gmail.com>
Date: Mon, 24 Feb 2025 01:26:49 -0800
Subject: [PATCH] dwlmsg: init

---
 flake.lock              |  4 ++--
 modules/dwl.nix         |  2 ++
 pkgs/default.nix        |  1 +
 pkgs/dwlmsg/default.nix | 38 ++++++++++++++++++++++++++++++++++++++
 4 files changed, 43 insertions(+), 2 deletions(-)
 create mode 100644 pkgs/dwlmsg/default.nix

diff --git a/flake.lock b/flake.lock
index 1ece63a..400197a 100644
--- a/flake.lock
+++ b/flake.lock
@@ -935,14 +935,14 @@
       "locked": {
         "lastModified": 1740387546,
         "narHash": "sha256-9JscMjA4ZMSnMV7cN83ONLL29SeYmJnlEFrKQ9vsYpk=",
-        "ref": "0.7ipc",
+        "ref": "0.7",
         "rev": "1abb07a6c13edcedcbe0f3b19b7976b29cbe3ed7",
         "revCount": 1276,
         "type": "git",
         "url": "https://git.zynh.me/Zynh0722/dwl"
       },
       "original": {
-        "ref": "0.7ipc",
+        "ref": "0.7",
         "type": "git",
         "url": "https://git.zynh.me/Zynh0722/dwl"
       }
diff --git a/modules/dwl.nix b/modules/dwl.nix
index b72e5ca..25756a9 100644
--- a/modules/dwl.nix
+++ b/modules/dwl.nix
@@ -75,6 +75,8 @@ in
       slurp
       satty
 
+      dwlmsg
+
       wdisplays
       xorg.xlsclients
 
diff --git a/pkgs/default.nix b/pkgs/default.nix
index 5bc1938..5ad29d1 100644
--- a/pkgs/default.nix
+++ b/pkgs/default.nix
@@ -11,5 +11,6 @@ in
   zenBrowser = callDefaultPackage ./zenBrowser;
   rose-pine-grub = callDefaultPackage ./rosePineGrub;
   dwm-msg = callDefaultPackage ./dwm-msg;
+  dwlmsg = callDefaultPackage ./dwlmsg;
   uhk-agent = callDefaultPackage ./uhk-agent;
 }
diff --git a/pkgs/dwlmsg/default.nix b/pkgs/dwlmsg/default.nix
new file mode 100644
index 0000000..5b9f414
--- /dev/null
+++ b/pkgs/dwlmsg/default.nix
@@ -0,0 +1,38 @@
+{ lib
+, stdenv
+, fetchgit
+, pkg-config
+, wayland-scanner
+, kdePackages
+,
+}:
+
+stdenv.mkDerivation {
+  pname = "dwlmsg";
+  version = "0-unstable-2025-01-13";
+
+  src = fetchgit {
+    url = "https://codeberg.org/notchoc/dwlmsg/";
+    rev = "7cfc2635984611e6eceef011084f21c22979b3d0";
+    hash = "sha256-uEw9QY0WveM8cu7uhXLbIKLYgtmyUyMxEDti+uWLoCU=";
+  };
+
+  nativeBuildInputs = [
+    pkg-config
+  ];
+
+  buildInputs = [
+    wayland-scanner
+    kdePackages.wayland
+  ];
+
+  makeFlags = [ "PREFIX=${placeholder "out"}" ];
+
+  meta = with lib; {
+    description = "send ipc messages to dwl";
+    homepage = "https://codeberg.org/notchoc/dwlmsg";
+    license = licenses.unfree;
+    mainProgram = "dwm-msg";
+    maintainers = with lib.maintainers; [ nullcube ];
+  };
+}