~ruther/guix-local

70510770267fcc42e330b6dbff1b8c83951a6ac6 — Liliana Marie Prikler 1 year, 7 months ago 6d4a6e9
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’.
1 files changed, 14 insertions(+), 1 deletions(-)

M gnu/packages/gnome.scm
M gnu/packages/gnome.scm => gnu/packages/gnome.scm +14 -1
@@ 7926,7 7926,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