Subject: [bug#76572] [PATCH 2/4] gnu: gnome-shell-extension-gsconnect: Wrap gsconnect-preferences.

From: aurtzy <[email-masked]>
Date: Tue, 25 Feb 2025 18:34:22 -0500

This fixes an error when attempting to open the gsconnect-preferences
application due to Typelib files not being found.

* gnu/packages/gnome-xyz.scm (gnome-shell-extension-gsconnect):
[arguments]<#:phases>: Wrap gsconnect-preferences with GI_TYPELIB_PATH
environment variable.  Rename 'wrap-daemons phase to 'wrap-programs.

Change-Id: Ib330766d46dba00a7c68fa3956b28223f07000f8
---
 gnu/packages/gnome-xyz.scm | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/gnu/packages/gnome-xyz.scm b/gnu/packages/gnome-xyz.scm
index 8c1c000feb..0a785193c4 100644
--- a/gnu/packages/gnome-xyz.scm
+++ b/gnu/packages/gnome-xyz.scm
@@ -783,13 +783,16 @@ (define-public gnome-shell-extension-gsconnect
                                "prepend_search_path(path));\n"))
                       (dump-port input output))))
                  '("src/extension.js" "src/prefs.js")))))
-          (add-after 'install 'wrap-daemons
+          (add-after 'install 'wrap-programs
             (lambda _
               (let* ((out #$output)
-                     (service-dir
-                      (string-append out "/share/gnome-shell/extensions"
-                                     "/[email-masked]/service"))
+                     (gsconnect-dir (string-append
+                                     out "/share/gnome-shell/extensions"
+                                     "/[email-masked]"))
+                     (service-dir (string-append gsconnect-dir "/service"))
                      (gi-typelib-path (getenv "GI_TYPELIB_PATH")))
+                (wrap-program (string-append gsconnect-dir "/gsconnect-preferences")
+                  `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path)))
                 (wrap-program (string-append service-dir "/daemon.js")
                   `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path)))))))))
     (inputs
-- 
2.48.1