From 9be5f88e18c50df26e5482f80eb8fcbff9c588bd Mon Sep 17 00:00:00 2001 From: Liliana Marie Prikler Date: Wed, 5 Oct 2022 21:59:36 +0200 Subject: gnu: gnome-maps: Properly wrap GI_TYPELIB_PATH. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This fixes a bug reported by pkill9 and tschilptschilp23 in IRC. See and . It does so by using a snippet that's also applied in gnome-shell. * gnu/packages/geo.scm (gnome-maps)[#:phases]: Remove ‘patch-dbus-service’. Update ‘wrap’ so that it uses GJS-specific wrapping code rather than wrap-program. --- gnu/packages/geo.scm | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'gnu') diff --git a/gnu/packages/geo.scm b/gnu/packages/geo.scm index 6b82087d6e..5e484c6e1c 100644 --- a/gnu/packages/geo.scm +++ b/gnu/packages/geo.scm @@ -280,15 +280,16 @@ topology functions.") "update_desktop_database")) (string-append option ": false")) (else all)))))) - (add-after 'unpack 'patch-dbus-service - (lambda _ - (substitute* "data/org.gnome.Maps.service.in" - (("@pkgdatadir@/org.gnome.Maps") - (string-append #$output "/bin/gnome-maps"))))) (add-after 'install 'wrap (lambda _ - (wrap-program (string-append #$output "/bin/gnome-maps") - `("GI_TYPELIB_PATH" ":" prefix (,(getenv "GI_TYPELIB_PATH"))))))))) + (let ((gi-typelib-path (getenv "GI_TYPELIB_PATH"))) + (substitute* (string-append #$output "/share/gnome-maps/" + "org.gnome.Maps") + (("imports\\.package\\.init" all) + (string-append "'" gi-typelib-path "'.split(':').forEach(" + "path => imports.gi.GIRepository.Repository." + "prepend_search_path(path));\n" + all))))))))) (native-inputs (list gettext-minimal `(,glib "bin") -- cgit v1.2.3