Subject: [bug#77485] [PATCH] gnu: swaynotificationcenter: Fix package

From: Daniel Ziltener <[email-masked]>
Date: Thu, 3 Apr 2025 13:18:31 +0200

This fixes two hardcoded paths in swaynotificationcenter that prevented it from even starting on Guix.

---
 gnu/packages/wm.scm | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/wm.scm b/gnu/packages/wm.scm
index 5e0dabe0b4..4adc3281b3 100644
--- a/gnu/packages/wm.scm
+++ b/gnu/packages/wm.scm
@@ -2444,7 +2444,20 @@ (define-public swaynotificationcenter
               (sha256
                (base32 "0cx3ql7qb2wajck1vip9sm2a122jv9x8g2r0bnw4rrxd91yca7a9"))))
     (build-system meson-build-system)
-    (arguments (list #:configure-flags #~(list "-Dsystemd-service=false")))
+    (arguments
+     (list
+      #:configure-flags
+      #~(list "-Dsystemd-service=false")
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'unpack 'fix-swaync-path
+            (lambda _
+              (substitute* "src/config.json.in"
+                (("@JSONPATH@")
+                 (string-append #$output "/etc/xdg/swaync/configSchema.json")))
+              (substitute* "src/functions.vala"
+                (("/usr/local/etc/xdg/swaync")
+                 (string-append #$output "/etc/xdg/swaync"))))))))
     (native-inputs
      (list `(,glib "bin")
            gobject-introspection
-- 
2.49.0