diff mbox

[WIP,0/8] GNOME Maps

Message ID 20160614202133.GA31914@jasmine
State New
Headers show

Commit Message

Leo Famulari June 14, 2016, 8:21 p.m. UTC
On Tue, Jun 14, 2016 at 02:17:52PM +0200, Ludovic Courtès wrote:
> Leo Famulari <leo@famulari.name> skribis:
> > It works for version 3.18.2! Attached.
> 
> Cool, let’s commit this one as a starting point!

I found it only works from within GNOME. In i3, it fails like this:
http://paste.lisp.org/display/318375

It never exits. It just hangs open after printing those warnings and
errors.

I don't know if that's acceptable or not.

> Did we eventually figure out where/how this thing looks for typelib
> file/gobject-introspection data?  It seems to be a “simple matter” of
> telling it where to look for whatever it’s looking for.  :-)

Working on it...

> Make sure to add a license header, but otherwise LGTM, thanks!

Revision attached!

Comments

Ludovic Courtès June 15, 2016, 12:25 p.m. UTC | #1
Leo Famulari <leo@famulari.name> skribis:

> On Tue, Jun 14, 2016 at 02:17:52PM +0200, Ludovic Courtès wrote:
>> Leo Famulari <leo@famulari.name> skribis:
>> > It works for version 3.18.2! Attached.
>> 
>> Cool, let’s commit this one as a starting point!
>
> I found it only works from within GNOME. In i3, it fails like this:
> http://paste.lisp.org/display/318375

Which of these warnings show up when running it on GNOME?  It’s hard to
tell which one is critical.

> It never exits. It just hangs open after printing those warnings and
> errors.
>
> I don't know if that's acceptable or not.

That should be addressed at some point.  Now, you could always add a
FIXME and commit it this way; it’s already useful.

>> Did we eventually figure out where/how this thing looks for typelib
>> file/gobject-introspection data?  It seems to be a “simple matter” of
>> telling it where to look for whatever it’s looking for.  :-)
>
> Working on it...
>
>> Make sure to add a license header, but otherwise LGTM, thanks!
>
> Revision attached!

> From 87f3c4b12c75287fde5ff96167c71501676c02f7 Mon Sep 17 00:00:00 2001
> From: Leo Famulari <leo@famulari.name>
> Date: Sat, 5 Mar 2016 02:33:09 -0500
> Subject: [PATCH] gnu: Add gnome-maps.
> 
> * gnu/packages/maps.scm: New file.
> * gnu-system.am (GNU_SYSTEM_MODULES): Add it.

Please add it to gnu/local.mk.

> +    (description "GNOME Maps is a graphical map viewer.  It uses map data from
> +the OpenStreetMap project. It can provide directions for walking, bicycling, and
                            ^^
Two spaces.  :-)

Thanks!

Ludo’.
Leo Famulari June 15, 2016, 5:20 p.m. UTC | #2
On Wed, Jun 15, 2016 at 02:25:15PM +0200, Ludovic Courtès wrote:
> Leo Famulari <leo@famulari.name> skribis:
> > I found it only works from within GNOME. In i3, it fails like this:
> > http://paste.lisp.org/display/318375
> 
> Which of these warnings show up when running it on GNOME?  It’s hard to
> tell which one is critical.

I learned the argument --g-fatal-warnings:

---
$ ./pre-inst-env guix environment --ad-hoc gnome-maps -- gnome-maps --g-fatal-warnings
(org.gnome.Maps:8568): GLib-GIO-ERROR **: Settings schema 'org.gnome.desktop.interface' is not installed
---

Apparently that's the first level of the problem. If I add
gsettings-desktop-schemas as an input, gnome-maps then fails when it 
doesn't find libgweather. Adding that, it fails with these warnings
(wrapped):

---
GLib-GIO-Message: Using the 'memory' GSettings backend.  Your settings
will not be saved or shared with other applications.

(org.gnome.Maps:8723): Gtk-WARNING **: Theme parsing error:
application.css:13:33: The style property GtkWidget:focus-line-width is
deprecated and shouldn't be used anymore. It will be removed in a future
version
---

And, it also hangs while opening on GNOME with those packages added.

> > * gnu/packages/maps.scm: New file.
> > * gnu-system.am (GNU_SYSTEM_MODULES): Add it.
> 
> Please add it to gnu/local.mk.

Right :p

I also decided to call the module (gnu packages geo), since that is more
general.

Applied as 03c1662e3!
Andy Wingo June 16, 2016, 10:07 a.m. UTC | #3
On Wed 15 Jun 2016 19:20, Leo Famulari <leo@famulari.name> writes:

> GLib-GIO-Message: Using the 'memory' GSettings backend.  Your settings
> will not be saved or shared with other applications.

I think this means you have to add dconf as an input, IIRC?

A
diff mbox

Patch

From 87f3c4b12c75287fde5ff96167c71501676c02f7 Mon Sep 17 00:00:00 2001
From: Leo Famulari <leo@famulari.name>
Date: Sat, 5 Mar 2016 02:33:09 -0500
Subject: [PATCH] gnu: Add gnome-maps.

* gnu/packages/maps.scm: New file.
* gnu-system.am (GNU_SYSTEM_MODULES): Add it.
---
 gnu/packages/maps.scm | 91 +++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 91 insertions(+)
 create mode 100644 gnu/packages/maps.scm

diff --git a/gnu/packages/maps.scm b/gnu/packages/maps.scm
new file mode 100644
index 0000000..89962ce
--- /dev/null
+++ b/gnu/packages/maps.scm
@@ -0,0 +1,91 @@ 
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2016 Leo Famulari <leo@famulari.name>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (gnu packages maps)
+  #:use-module (guix build-system glib-or-gtk)
+  #:use-module (guix download)
+  #:use-module (guix licenses)
+  #:use-module (guix packages)
+  #:use-module (guix utils)
+  #:use-module (gnu packages glib) ; intltool
+  #:use-module (gnu packages gnome)
+  #:use-module (gnu packages gtk)
+  #:use-module (gnu packages pkg-config)
+  #:use-module (gnu packages webkit)
+  #:use-module (gnu packages xml))
+
+(define-public gnome-maps
+  (package
+    (name "gnome-maps")
+    (version "3.18.2")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "mirror://gnome/sources/" name "/"
+                                  (version-major+minor version) "/"
+                                  name "-" version ".tar.xz"))
+              (sha256
+               (base32
+                "0y4jmh5hwskh2mnladh9hxp9k8as7crm8wwwiifvxsjjj9az2gv9"))))
+    (build-system glib-or-gtk-build-system)
+    (arguments
+     `(#:configure-flags ; Ensure that geoclue is referred to by output.
+       (list (string-append "LDFLAGS=-L"
+                            (assoc-ref %build-inputs "geoclue") "/lib")
+             (string-append "CFLAGS=-I"
+                            (assoc-ref %build-inputs "geoclue") "/include"))
+       #:phases
+       (modify-phases %standard-phases
+         (add-after
+          'install 'wrap
+          (lambda* (#:key inputs outputs #:allow-other-keys)
+            (let ((out (assoc-ref outputs "out"))
+                  (gi-typelib-path (getenv "GI_TYPELIB_PATH"))
+                  (goa-path (string-append
+                              (assoc-ref inputs "gnome-online-accounts")
+                              "/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.
+               `("LD_LIBRARY_PATH" ":" prefix (,goa-path)))
+              #t))))))
+    (native-inputs
+     `(("gobject-introspection" ,gobject-introspection)
+       ("intltool" ,intltool)
+       ("pkg-config" ,pkg-config)))
+    (inputs
+     `(("folks" ,folks)
+       ("libchamplain" ,libchamplain)
+       ("libgee" ,libgee)
+       ("libxml2" ,libxml2)
+       ("geoclue" ,geoclue)
+       ("geocode-glib" ,geocode-glib)
+       ("gfbgraph" ,gfbgraph)
+       ("gjs" ,gjs)
+       ("glib" ,glib)
+       ("gnome-online-accounts" ,gnome-online-accounts)
+       ("rest" ,rest)
+       ("webkitgtk" ,webkitgtk)))
+    (propagated-inputs
+     `(("gtk+3" ,gtk+)))
+    (synopsis "Graphical map viewer and wayfinding program")
+    (description "GNOME Maps is a graphical map viewer.  It uses map data from
+the OpenStreetMap project. It can provide directions for walking, bicycling, and
+driving.")
+    (home-page "https://wiki.gnome.org/Apps/Maps")
+    (license gpl2+)))
-- 
2.8.4