gnu: Add gnome-maps.
[jackhill/guix/guix.git] / gnu / packages / geo.scm
CommitLineData
03c1662e
LF
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2016 Leo Famulari <leo@famulari.name>
3;;;
4;;; This file is part of GNU Guix.
5;;;
6;;; GNU Guix is free software; you can redistribute it and/or modify it
7;;; under the terms of the GNU General Public License as published by
8;;; the Free Software Foundation; either version 3 of the License, or (at
9;;; your option) any later version.
10;;;
11;;; GNU Guix is distributed in the hope that it will be useful, but
12;;; WITHOUT ANY WARRANTY; without even the implied warranty of
13;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14;;; GNU General Public License for more details.
15;;;
16;;; You should have received a copy of the GNU General Public License
17;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
18
19(define-module (gnu packages geo)
20 #:use-module (guix build-system glib-or-gtk)
21 #:use-module (guix download)
22 #:use-module (guix licenses)
23 #:use-module (guix packages)
24 #:use-module (guix utils)
25 #:use-module (gnu packages glib)
26 #:use-module (gnu packages gnome)
27 #:use-module (gnu packages gtk)
28 #:use-module (gnu packages pkg-config)
29 #:use-module (gnu packages webkit)
30 #:use-module (gnu packages xml))
31
32;;; FIXME GNOME Maps only runs within GNOME. On i3, it fails with this error:
33;;; (org.gnome.Maps:8568): GLib-GIO-ERROR **: Settings schema
34;;; 'org.gnome.desktop.interface' is not installed
35(define-public gnome-maps
36 (package
37 (name "gnome-maps")
38 (version "3.18.2")
39 (source (origin
40 (method url-fetch)
41 (uri (string-append "mirror://gnome/sources/" name "/"
42 (version-major+minor version) "/"
43 name "-" version ".tar.xz"))
44 (sha256
45 (base32
46 "0y4jmh5hwskh2mnladh9hxp9k8as7crm8wwwiifvxsjjj9az2gv9"))))
47 (build-system glib-or-gtk-build-system)
48 (arguments
49 `(#:configure-flags ; Ensure that geoclue is referred to by output.
50 (list (string-append "LDFLAGS=-L"
51 (assoc-ref %build-inputs "geoclue") "/lib")
52 (string-append "CFLAGS=-I"
53 (assoc-ref %build-inputs "geoclue") "/include"))
54 #:phases
55 (modify-phases %standard-phases
56 (add-after
57 'install 'wrap
58 (lambda* (#:key inputs outputs #:allow-other-keys)
59 (let ((out (assoc-ref outputs "out"))
60 (gi-typelib-path (getenv "GI_TYPELIB_PATH"))
61 (goa-path (string-append
62 (assoc-ref inputs "gnome-online-accounts")
63 "/lib")))
64 (wrap-program (string-append out "/bin/gnome-maps")
65 `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path))
66
67 ;; There seems to be no way to embed the path of libgoa-1.0.so.0.
68 `("LD_LIBRARY_PATH" ":" prefix (,goa-path)))
69 #t))))))
70 (native-inputs
71 `(("gobject-introspection" ,gobject-introspection)
72 ("intltool" ,intltool)
73 ("pkg-config" ,pkg-config)))
74 (inputs
75 `(("folks" ,folks)
76 ("libchamplain" ,libchamplain)
77 ("libgee" ,libgee)
78 ("libxml2" ,libxml2)
79 ("geoclue" ,geoclue)
80 ("geocode-glib" ,geocode-glib)
81 ("gfbgraph" ,gfbgraph)
82 ("gjs" ,gjs)
83 ("glib" ,glib)
84 ("gnome-online-accounts" ,gnome-online-accounts)
85 ("rest" ,rest)
86 ("webkitgtk" ,webkitgtk)))
87 (propagated-inputs
88 `(("gtk+3" ,gtk+)))
89 (synopsis "Graphical map viewer and wayfinding program")
90 (description "GNOME Maps is a graphical map viewer. It uses map data from
91the OpenStreetMap project. It can provide directions for walking, bicycling,
92and driving.")
93 (home-page "https://wiki.gnome.org/Apps/Maps")
94 (license gpl2+)))