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

Message ID 36e7a401b7209480c03cb87d5b5c8ef62bb601b0.1741250406.git.aurtzy@gmail.com
State New
Headers
Series Fixes for gnome-shell-extension-gsconnect |

Commit Message

aurtzy March 6, 2025, 8:44 a.m. UTC
  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(-)
  

Patch

diff --git a/gnu/packages/gnome-xyz.scm b/gnu/packages/gnome-xyz.scm
index 1a3a275db5..359dc757fd 100644
--- a/gnu/packages/gnome-xyz.scm
+++ b/gnu/packages/gnome-xyz.scm
@@ -778,13 +778,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"
-                                     "/gsconnect@andyholmes.github.io/service"))
+                     (gsconnect-dir (string-append
+                                     out "/share/gnome-shell/extensions"
+                                     "/gsconnect@andyholmes.github.io"))
+                     (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