I think, I figured out the root cause of this.  GApplication launches
apps through dbus, looking up the respective service in share/dbus-1. 
The service for GNOME Maps does not start the actual program, but much
rather a gjs wrapper, which we don't patch -- and which we can't simply
patch, because that leads to other errors, that rival our own when it
comes to how cryptic they are.

I've attached a patch, in which I rewrite the DBUS service to use the
actual program.  I have not fully tested this patch, as `guix
environment --ad-hoc gnome-maps` appears not to be strong enough to
influence the gapplication lookup.  However, if you launch `gnome-maps
--gapplication-service` in one terminal, then quickly switch to some
other and launch `gnome-maps` normally, the one that spawned the
service is the one that gets used, so claiming the bus in this fashion
*should* work.

Regards,
Leo
From d709692ba02e7f3a4c2f9bd8ca43374131a81a7a Mon Sep 17 00:00:00 2001
From: Leo Prikler <leo.prik...@student.tugraz.at>
Date: Mon, 11 May 2020 13:30:44 +0200
Subject: [PATCH] gnu: gnome-maps: Patch DBUS service.

* gnu/packages/geo.scm (gnome-maps):
[arguments]<#:phases>: Add patch-dbus-service.
---
 gnu/packages/geo.scm | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/gnu/packages/geo.scm b/gnu/packages/geo.scm
index 6c68d40..b0d33d9 100644
--- a/gnu/packages/geo.scm
+++ b/gnu/packages/geo.scm
@@ -160,6 +160,12 @@ topology functions.")
              (substitute* "meson_post_install.py"
                (("gtk-update-icon-cache") "true"))
              #t))
+         (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")))
+             #t))
          (add-after 'install 'wrap
            (lambda* (#:key inputs outputs #:allow-other-keys)
              (let ((out (assoc-ref outputs "out"))
--
libgit2 1.0.0

Reply via email to