guix_mirror_bot pushed a commit to branch master
in repository guix.

commit 57e86a773eddb9973db6d364d8cbfbecbd6135c8
Author: Alvin Hsu <[email protected]>
AuthorDate: Mon Sep 7 17:20:42 2026 -0400

    gnu: gnome-shell-extension-gsconnect: Fix search path prepending.
    
    This patch fixes the following error when attempting to enable GSConnect
    in GNOME 49:
    
    > TypeError:
    > imports.gi.GIRepository.Repository.prepend_search_path is not a function
    
    ‘prepend_search_path’ and other functions are no longer static in GI 2.0,
    so a Repository must be instantiated to call them.
    
    * gnu/packages/gnome-xyz.scm (gnome-shell-extension-gsconnect):
    [arguments]<#:phases>{patch-gjs-shebangs}: Fix import invocations.
    
    Signed-off-by: Liliana Marie Prikler <[email protected]>
---
 gnu/packages/gnome-xyz.scm | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)

diff --git a/gnu/packages/gnome-xyz.scm b/gnu/packages/gnome-xyz.scm
index 423dd74e7a9..c305632347c 100644
--- a/gnu/packages/gnome-xyz.scm
+++ b/gnu/packages/gnome-xyz.scm
@@ -22,7 +22,7 @@
 ;;; Copyright © 2022 Denis 'GNUtoo' Carikli <[email protected]>
 ;;; Copyright © 2022 Trevor Richards <[email protected]>
 ;;; Copyright © 2023 Eidvilas Markevičius <[email protected]>
-;;; Copyright © 2025 aurtzy <[email protected]>
+;;; Copyright © 2025-2026 aurtzy <[email protected]>
 ;;; Copyright © 2025, 2026 Ashvith Shetty <[email protected]>
 ;;; Copyright © 2025 Maxim Cournoyer <[email protected]>
 ;;; Copyright © 2025 Gabriel Santos <[email protected]>
@@ -1060,11 +1060,15 @@ Requires the focus-timer application to be installed.")
                             (with-atomic-file-replacement
                              file
                              (lambda (input output)
-                               (format output "~a"
-                                       (string-append
-                                        "'" gi-typelib-path 
"'.split(':').forEach("
-                                        "path => 
imports.gi.GIRepository.Repository."
-                                        "prepend_search_path(path));\n"))
+                               (display
+                                (string-append
+                                 "import GIRepository from 
'gi://GIRepository';\n"
+                                 "const repo ="
+                                 " GIRepository.Repository.dup_default();\n"
+                                 "'" gi-typelib-path "'.split(':')"
+                                 ".forEach(path => repo"
+                                 ".prepend_search_path(path));\n")
+                                output)
                                (dump-port input output))))
                           '("src/extension.js" "src/prefs.js")))))
           (add-after 'install 'wrap-programs

Reply via email to