[bug#77485] gnu: swaynotificationcenter: Fix package

Message ID 20250403111903.27395-1-dziltener@lyrion.ch
State New
Headers
Series [bug#77485] gnu: swaynotificationcenter: Fix package |

Commit Message

Daniel Ziltener April 3, 2025, 11:18 a.m. UTC
  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(-)
  

Comments

Christopher Baines April 6, 2025, 6:06 p.m. UTC | #1
Daniel Ziltener via Guix-patches via <guix-patches@gnu.org> writes:

> 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(-)

Thanks for the patch, I've pushed this to master as
ed12cba2216599a35560ad4c43f2894872910f33.

Chris
  

Patch

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