- `(#:glib-or-gtk? #t
- #:phases
- (modify-phases %standard-phases
- (add-after 'unpack 'skip-gtk-update-icon-cache
- ;; Don't create 'icon-theme.cache'.
- (lambda _
- (substitute* "meson_post_install.py"
- (("gtk-update-icon-cache") "true"))))
- (add-after 'unpack 'patch-dbus-service
- (lambda* (#:key outputs #:allow-other-keys)
- (substitute* "data/org.gnome.Maps.service.in"
- (("@pkgdatadir@/org.gnome.Maps")
- (string-append (assoc-ref outputs "out")
- "/bin/gnome-maps")))))
- (add-after 'install 'wrap
- (lambda* (#:key inputs outputs #:allow-other-keys)
- (let ((out (assoc-ref outputs "out"))
- (gi-typelib-path (getenv "GI_TYPELIB_PATH"))
- (geocode-glib-path (string-append
- (assoc-ref inputs "geocode-glib")
- "/lib"))
- (goa-path (string-append
- (assoc-ref inputs "gnome-online-accounts:lib")
- "/lib"))
- (gdk-pixbuf-path (string-append
- (assoc-ref inputs "gdk-pixbuf")
- "/lib"))
- (webkitgtk-path (string-append
- (assoc-ref inputs "webkitgtk")
- "/lib")))
- (wrap-program (string-append out "/bin/gnome-maps")
- `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path))
-
- ;; There seems to be no way to embed the path of
- ;; libgoa-1.0.so.0, libwebkit2gtk-4.0.so.37,
- ;; libgdk_pixbuf-2.0.so, libjavascriptcoregtk-4.0.so.18, and
- ;; libgeocode-glib.so.0
- `("LD_LIBRARY_PATH" ":" prefix (,goa-path
- ,webkitgtk-path
- ,gdk-pixbuf-path
- ,geocode-glib-path)))
- #t))))))
+ (list
+ #:glib-or-gtk? #t
+ #:meson meson-0.63
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'skip-cache-and-database-updates
+ (lambda _
+ (substitute* "meson.build"
+ (("([a-z_]*): true" all option)
+ (cond ; cond rather than match saves an import
+ ((member option '("gtk_update_icon_cache"
+ "update_desktop_database"))
+ (string-append option ": false"))
+ (else all))))))
+ (add-after 'install 'wrap
+ (lambda _
+ (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)))))))))