lilyp pushed a commit to branch gnome-team
in repository guix.

commit 9d5e47282e62673a45871d5fb37ff6d713f62e42
Author: Liliana Marie Prikler <[email protected]>
AuthorDate: Thu Jan 9 22:38:02 2025 +0100

    gnu: gjs: Wrap GI_TYPELIB_PATH to include necessary typelibs.
    
    Some packages, like gnome-maps rely on being able to patch the GIRepository
    search path from inside gjs.  For this to work, however, gjs must be able to
    load GIRepository, needing both glib and gobject-introspection to do so.
    
    * gnu/packages/gnome.scm (gjs)[#:phases]: Add ‘wrap-gi’.
---
 gnu/packages/gnome.scm | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 0450f05c1e..b013d5e1de 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -7922,7 +7922,20 @@ configuration program to choose applications starting on 
login.")
              (setenv "DISPLAY" ":1")
 
              ;; For the missing /etc/machine-id.
-             (setenv "DBUS_FATAL_WARNINGS" "0"))))))
+             (setenv "DBUS_FATAL_WARNINGS" "0")))
+         (add-after 'install 'wrap-gi
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (wrap-program (string-append (assoc-ref outputs "out")
+                                          "/bin/gjs")
+               `("GI_TYPELIB_PATH" suffix
+                 (,(dirname
+                    (search-input-file
+                     inputs
+                     "lib/girepository-1.0/GObject-2.0.typelib"))
+                  ,(dirname
+                    (search-input-file
+                     inputs
+                     "lib/girepository-1.0/GIRepository-2.0.typelib"))))))))))
     (native-inputs
      (list `(,glib "bin")               ;for glib-compile-resources
            pkg-config

Reply via email to