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