gnu: gtk-doc: Add 'gtk-doc/stable' variant.
[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>
f6c507e1 4;;; Copyright © 2017, 2018 Björn Höfling <bjoern.hoefling@bjoernhoefling.de>
e2492f58 5;;; Copyright © 2018–2021 Tobias Geerinckx-Rice <me@tobias.gr>
8d26f48e 6;;; Copyright © 2018 Ricardo Wurmus <rekado@elephly.net>
d33afa26 7;;; Copyright © 2018, 2019 Arun Isaac <arunisaac@systemreboot.net>
3d60f426 8;;; Copyright © 2018 Joshua Sierles, Nextjournal <joshua@nextjournal.com>
f1abc566 9;;; Copyright © 2018, 2019, 2020 Julien Lepiller <julien@lepiller.eu>
fc594863 10;;; Copyright © 2019, 2020, 2021 Guillaume Le Vaillant <glv@posteo.net>
40b3e9da 11;;; Copyright © 2019, 2020, 2021 Efraim Flashner <efraim@flashner.co.il>
41b4b713 12;;; Copyright © 2019 Wiktor Żelazny <wzelazny@vurv.cz>
53c9b398 13;;; Copyright © 2019 Hartmut Goebel <h.goebel@crazy-compilers.com>
517c5538 14;;; Copyright © 2020 Marius Bakke <mbakke@fastmail.com>
1192ae94 15;;; Copyright © 2020 Christopher Baines <mail@cbaines.net>
f33e773c 16;;; Copyright © 2020, 2021 Felix Gruber <felgru@posteo.net>
6be69452 17;;; Copyright © 2021 Sharlatan Hellseher <sharlatanus@gmail.com>
03c1662e
LF
18;;;
19;;; This file is part of GNU Guix.
20;;;
21;;; GNU Guix is free software; you can redistribute it and/or modify it
22;;; under the terms of the GNU General Public License as published by
23;;; the Free Software Foundation; either version 3 of the License, or (at
24;;; your option) any later version.
25;;;
26;;; GNU Guix is distributed in the hope that it will be useful, but
27;;; WITHOUT ANY WARRANTY; without even the implied warranty of
28;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
29;;; GNU General Public License for more details.
30;;;
31;;; You should have received a copy of the GNU General Public License
32;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
33
34(define-module (gnu packages geo)
6dd0e41d 35 #:use-module (guix build-system ant)
8fa3451c 36 #:use-module (guix build-system cmake)
03c1662e 37 #:use-module (guix build-system glib-or-gtk)
065d0125 38 #:use-module (guix build-system gnu)
be7c64ba 39 #:use-module (guix build-system go)
5339d2bb 40 #:use-module (guix build-system meson)
f25e1e24 41 #:use-module (guix build-system python)
bccbeece 42 #:use-module (guix build-system qt)
f2b005f6 43 #:use-module (guix build-system scons)
3d60f426 44 #:use-module (guix build-system r)
03c1662e 45 #:use-module (guix download)
d56af1ff 46 #:use-module (guix git-download)
f041db86 47 #:use-module (guix svn-download)
065d0125 48 #:use-module ((guix licenses) #:prefix license:)
03c1662e
LF
49 #:use-module (guix packages)
50 #:use-module (guix utils)
f9d32883 51 #:use-module (gnu packages)
9fce5914 52 #:use-module (gnu packages algebra)
0f7b8a7f 53 #:use-module (gnu packages astronomy)
7b1fb40d 54 #:use-module (gnu packages audio)
ed72a133 55 #:use-module (gnu packages autotools)
7b1fb40d 56 #:use-module (gnu packages backup)
9fce5914
GLV
57 #:use-module (gnu packages bash)
58 #:use-module (gnu packages bison)
f2b005f6 59 #:use-module (gnu packages boost)
f25e1e24 60 #:use-module (gnu packages check)
1a39141d 61 #:use-module (gnu packages compression)
7b1fb40d 62 #:use-module (gnu packages curl)
f2b005f6 63 #:use-module (gnu packages databases)
889e94e3 64 #:use-module (gnu packages datastructures)
7295171e 65 #:use-module (gnu packages docbook)
889e94e3 66 #:use-module (gnu packages documentation)
7b1fb40d 67 #:use-module (gnu packages elf)
9fce5914 68 #:use-module (gnu packages flex)
0f7b8a7f 69 #:use-module (gnu packages fonts)
f2b005f6 70 #:use-module (gnu packages fontutils)
7b1fb40d
GLV
71 #:use-module (gnu packages gettext)
72 #:use-module (gnu packages gl)
03c1662e
LF
73 #:use-module (gnu packages glib)
74 #:use-module (gnu packages gnome)
151f3d41 75 #:use-module (gnu packages gps)
03c1662e 76 #:use-module (gnu packages gtk)
151f3d41 77 #:use-module (gnu packages haskell-apps)
1a39141d 78 #:use-module (gnu packages image)
f7ac2fe1 79 #:use-module (gnu packages image-processing)
f2b005f6 80 #:use-module (gnu packages icu4c)
f041db86 81 #:use-module (gnu packages java)
151f3d41 82 #:use-module (gnu packages kde)
b0e2299a 83 #:use-module (gnu packages lua)
6cde0737 84 #:use-module (gnu packages maths)
996e45cb 85 #:use-module (gnu packages pcre)
f7ac2fe1 86 #:use-module (gnu packages pdf)
2b9be1a6 87 #:use-module (gnu packages perl)
7b1fb40d 88 #:use-module (gnu packages photo)
03c1662e 89 #:use-module (gnu packages pkg-config)
dc8621a2 90 #:use-module (gnu packages protobuf)
7b1fb40d 91 #:use-module (gnu packages pulseaudio)
f2b005f6 92 #:use-module (gnu packages python)
481b0923 93 #:use-module (gnu packages python-check)
0a71e34e 94 #:use-module (gnu packages python-web)
44d10b1f 95 #:use-module (gnu packages python-xyz)
0f7b8a7f 96 #:use-module (gnu packages qt)
9fce5914 97 #:use-module (gnu packages readline)
f7ac2fe1 98 #:use-module (gnu packages swig)
cd0322a3 99 #:use-module (gnu packages sqlite)
7ba300ee 100 #:use-module (gnu packages textutils)
9fce5914 101 #:use-module (gnu packages time)
5b19776e 102 #:use-module (gnu packages web)
03c1662e 103 #:use-module (gnu packages webkit)
a2a53274 104 #:use-module (gnu packages wxwidgets)
151f3d41
GLV
105 #:use-module (gnu packages xml)
106 #:use-module (gnu packages xorg))
03c1662e 107
7295171e
RG
108(define-public memphis
109 (package
110 (name "memphis")
111 (version "0.2.3")
112 (source
113 (origin
114 (method git-fetch)
115 (uri
116 (git-reference
8ed4c468 117 (url "https://github.com/jiuka/memphis")
7295171e
RG
118 (commit version)))
119 (file-name (git-file-name name version))
120 (sha256
121 (base32 "068c3943pgbpfjq44pmvn5fmkh005ak5aa67vvrq3fn487c6w54q"))))
122 (build-system glib-or-gtk-build-system)
123 (outputs '("out" "doc"))
124 (arguments
125 `(#:configure-flags
126 (list
127 "--disable-static"
128 "--enable-gtk-doc"
129 "--enable-vala"
130 (string-append "--with-html-dir="
131 (assoc-ref %outputs "doc")
132 "/share/gtk-doc/html"))
133 #:phases
134 (modify-phases %standard-phases
135 (add-after 'unpack 'patch-autogen
136 (lambda _
137 (substitute* "autogen.sh"
138 (("\\./configure \"\\$@\"")
139 ""))
140 #t))
141 (add-after 'patch-autogen 'patch-docbook-xml
142 (lambda* (#:key inputs #:allow-other-keys)
143 (with-directory-excursion "docs/reference"
144 (substitute* "libmemphis-docs.sgml"
145 (("http://www.oasis-open.org/docbook/xml/4.3/")
146 (string-append (assoc-ref inputs "docbook-xml")
147 "/xml/dtd/docbook/"))))
148 #t)))))
149 (native-inputs
150 `(("autoconf" ,autoconf)
151 ("automake" ,automake)
152 ("docbook-xml" ,docbook-xml-4.3)
153 ("gobject-introspection" ,gobject-introspection)
154 ("gtk-doc" ,gtk-doc)
155 ("libtool" ,libtool)
156 ("pkg-config" ,pkg-config)
157 ("python" ,python-wrapper)
158 ("seed" ,seed)
159 ("vala" ,vala)))
160 (inputs
161 `(("expat" ,expat)
162 ("glib" ,glib)))
163 (propagated-inputs
164 `(("cairo" ,cairo)))
165 (synopsis "Map-rendering for OpenSteetMap")
166 (description "Memphis is a map-rendering application and a library for
167OpenStreetMap written in C using eXpat, Cairo and GLib.")
168 (home-page "http://trac.openstreetmap.ch/trac/memphis/")
169 (license license:lgpl2.1+)))
170
a7607572
BH
171(define-public geos
172 (package
173 (name "geos")
eed886f8 174 (version "3.8.1")
a7607572
BH
175 (source (origin
176 (method url-fetch)
177 (uri (string-append "http://download.osgeo.org/geos/geos-"
178 version
179 ".tar.bz2"))
180 (sha256
181 (base32
eed886f8 182 "1xqpmr10xi0n9sj47fbwc89qb0yr9imh4ybk0jsxpffy111syn22"))))
a7607572
BH
183 (build-system gnu-build-system)
184 (arguments `(#:phases
185 (modify-phases %standard-phases
186 (add-after
187 'unpack 'patch-test-shebangs
188 (lambda _
189 (substitute* '("tests/xmltester/testrunner.sh"
190 "tests/geostest/testrunner.sh")
191 (("/bin/sh") (which "sh")))
192 #t)))))
193 (inputs
194 `(("glib" ,glib)))
195 (home-page "https://geos.osgeo.org/")
196 (synopsis "Geometry Engine for Geographic Information Systems")
197 (description
198 "GEOS provides a spatial object model and fundamental geometric
199functions. It is a C++ port of the Java Topology Suite (JTS). As such,
200it aims to contain the complete functionality of JTS in C++. This
201includes all the OpenGIS Simple Features for SQL spatial predicate
202functions and spatial operators, as well as specific JTS enhanced
203topology functions.")
204 (license (list license:lgpl2.1+ ; Main distribution.
205 license:zlib ; tests/xmltester/tinyxml/*
206 license:public-domain)))) ; include/geos/timeval.h
207
03c1662e
LF
208(define-public gnome-maps
209 (package
210 (name "gnome-maps")
5b4ebb42 211 (version "3.34.2")
03c1662e
LF
212 (source (origin
213 (method url-fetch)
214 (uri (string-append "mirror://gnome/sources/" name "/"
215 (version-major+minor version) "/"
216 name "-" version ".tar.xz"))
217 (sha256
218 (base32
5b4ebb42 219 "00xslcnhhwslqglgfv2im7vq3awa49y2jxzr8wsby7f713k28vf5"))))
5339d2bb 220 (build-system meson-build-system)
03c1662e 221 (arguments
5339d2bb 222 `(#:glib-or-gtk? #t
03c1662e
LF
223 #:phases
224 (modify-phases %standard-phases
b0a7c0c3
EF
225 (add-after 'unpack 'skip-gtk-update-icon-cache
226 ;; Don't create 'icon-theme.cache'.
227 (lambda _
228 (substitute* "meson_post_install.py"
229 (("gtk-update-icon-cache") "true"))
230 #t))
a2d5f9f6
LP
231 (add-after 'unpack 'patch-dbus-service
232 (lambda* (#:key outputs #:allow-other-keys)
233 (substitute* "data/org.gnome.Maps.service.in"
234 (("@pkgdatadir@/org.gnome.Maps")
235 (string-append (assoc-ref outputs "out") "/bin/gnome-maps")))
236 #t))
67bd376b
KK
237 (add-after 'install 'wrap
238 (lambda* (#:key inputs outputs #:allow-other-keys)
239 (let ((out (assoc-ref outputs "out"))
240 (gi-typelib-path (getenv "GI_TYPELIB_PATH"))
5339d2bb
RW
241 (geocode-glib-path (string-append
242 (assoc-ref inputs "geocode-glib")
243 "/lib"))
67bd376b 244 (goa-path (string-append
2cf1e37c 245 (assoc-ref inputs "gnome-online-accounts:lib")
67bd376b 246 "/lib"))
2cf1e37c
KK
247 (gdk-pixbuf-path (string-append
248 (assoc-ref inputs "gdk-pixbuf")
249 "/lib"))
67bd376b
KK
250 (webkitgtk-path (string-append
251 (assoc-ref inputs "webkitgtk")
252 "/lib")))
253 (wrap-program (string-append out "/bin/gnome-maps")
254 `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path))
03c1662e 255
67bd376b 256 ;; There seems to be no way to embed the path of
5339d2bb 257 ;; libgoa-1.0.so.0, libwebkit2gtk-4.0.so.37,
2cf1e37c
KK
258 ;; libgdk_pixbuf-2.0.so, libjavascriptcoregtk-4.0.so.18, and
259 ;; libgeocode-glib.so.0
5339d2bb
RW
260 `("LD_LIBRARY_PATH" ":" prefix (,goa-path
261 ,webkitgtk-path
2cf1e37c 262 ,gdk-pixbuf-path
5339d2bb 263 ,geocode-glib-path)))
67bd376b 264 #t))))))
03c1662e 265 (native-inputs
f7d34fcd
MB
266 `(("gettext" ,gettext-minimal)
267 ("gobject-introspection" ,gobject-introspection)
03c1662e
LF
268 ("pkg-config" ,pkg-config)))
269 (inputs
7d7fedf6
MB
270 `(("evolution-data-server" ,evolution-data-server)
271 ("folks" ,folks)
03c1662e
LF
272 ("libchamplain" ,libchamplain)
273 ("libgee" ,libgee)
8d26f48e
RW
274 ("libsecret" ,libsecret)
275 ("libsoup" ,libsoup)
276 ("libgweather" ,libgweather)
03c1662e 277 ("libxml2" ,libxml2)
2cf1e37c 278 ("gdk-pixbuf" ,gdk-pixbuf+svg)
8d26f48e 279 ("glib-networking" ,glib-networking)
03c1662e
LF
280 ("geoclue" ,geoclue)
281 ("geocode-glib" ,geocode-glib)
282 ("gfbgraph" ,gfbgraph)
283 ("gjs" ,gjs)
284 ("glib" ,glib)
2cf1e37c 285 ("gnome-online-accounts:lib" ,gnome-online-accounts "lib")
8d26f48e 286 ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
be7e82f0 287 ("gtk+" ,gtk+)
03c1662e
LF
288 ("rest" ,rest)
289 ("webkitgtk" ,webkitgtk)))
03c1662e
LF
290 (synopsis "Graphical map viewer and wayfinding program")
291 (description "GNOME Maps is a graphical map viewer. It uses map data from
292the OpenStreetMap project. It can provide directions for walking, bicycling,
293and driving.")
294 (home-page "https://wiki.gnome.org/Apps/Maps")
065d0125
BH
295 (license license:gpl2+)))
296
22c7c775
BH
297(define-public libgaiagraphics
298 (package
299 (name "libgaiagraphics")
300 (version "0.5")
301 (source
302 (origin
303 (method url-fetch)
304 (uri (string-append "https://www.gaia-gis.it/gaia-sins/libgaiagraphics-"
305 version ".tar.gz"))
306 (sha256
307 (base32
308 "076afqv417ag3hfvnif0qc7qscmnq1dsf6y431yygwgf34rjkayc"))))
309 (build-system gnu-build-system)
310 (native-inputs
311 `(("pkg-config" ,pkg-config)))
312 (inputs
313 `(("cairo" ,cairo)
314 ("libpng" ,libpng)
56e53392 315 ("libjpeg-turbo" ,libjpeg-turbo)
22c7c775
BH
316 ("libtiff" ,libtiff)
317 ("libgeotiff" ,libgeotiff)
318 ("proj.4" ,proj.4)
319 ("libxml2" ,libxml2)
320 ("zlib" ,zlib)))
321 (synopsis "Gaia common graphics support")
322 (description "libgaiagraphics is a library supporting
323 common-utility raster handling methods.")
324 (home-page "https://www.gaia-gis.it/fossil/libgaiagraphics/index")
325 (license license:lgpl3+)))
326
1a39141d
BH
327(define-public libgeotiff
328 (package
329 (name "libgeotiff")
f9d32883 330 (version "1.5.1")
1a39141d
BH
331 (source
332 (origin
333 (method url-fetch)
334 (uri (string-append "http://download.osgeo.org/geotiff/libgeotiff/libgeotiff-"
335 version ".tar.gz"))
f9d32883
AI
336 (patches (search-patches
337 ;; See libgeotiff 1.5.1 issue
338 ;; https://github.com/OSGeo/libgeotiff/issues/22
339 "libgeotiff-adapt-test-script-for-proj-6.2.patch"))
1a39141d 340 (sha256
f9d32883 341 (base32 "0b31mlzcv5b1y7jdvb7p0pa3xradrg3x5g32ym911lbhq4rrgsgr"))
1a39141d
BH
342 (modules '((guix build utils)))
343 (snippet
344 '(begin
345 ;; Remove .csv files, distributed from EPSG under a restricted
346 ;; license. See LICENSE for full license text.
347 (for-each delete-file (find-files "." "\\.csv$"))
6cbee49d 348 #t))))
1a39141d
BH
349 (build-system gnu-build-system)
350 (inputs
351 `(("libjpeg-turbo" ,libjpeg-turbo)
352 ("libtiff" ,libtiff)
1a39141d 353 ("zlib" ,zlib)))
517c5538
MB
354 (propagated-inputs
355 `(;; libgeotiff headers include proj headers, so ensure those are available.
356 ("proj" ,proj)))
1a39141d
BH
357 (arguments
358 `(#:configure-flags
1ecadbfe
MB
359 (list "--disable-static"
360 "--with-zlib" "--with-jpeg"
1a39141d
BH
361 (string-append "--with-libtiff=" (assoc-ref %build-inputs "libtiff")))))
362 (synopsis "Library for handling GeoTIFF (geographic enabled TIFF)")
363 (description "libgeotiff is a library on top of libtiff for reading and
364writing GeoTIFF information tags.")
365 (home-page "https://trac.osgeo.org/geotiff/")
366 ;; This is a mixture of various contributions under different licenses.
367 ;; Note that the EPSG database is NOT "free to use" as the LICENSE file
368 ;; states, as its commercial redistribution is restricted. Hence, we have
369 ;; removed it from the package.
370 (license (list license:public-domain
371 license:x11
372 license:bsd-3
373 (license:non-copyleft "file://LICENSE"
374 "See LICENSE in the distribution.")))))
375
a051bf40
FG
376(define-public librttopo
377 (package
378 (name "librttopo")
379 (version "1.1.0")
380 (source
381 (origin
382 (method git-fetch)
383 (uri (git-reference
384 (url "https://git.osgeo.org/gitea/rttopo/librttopo")
385 (commit (string-append "librttopo-" version))))
386 (file-name (git-file-name name version))
387 (sha256
388 (base32 "0h7lzlkn9g4xky6h81ndy0aa6dxz8wb6rnl8v3987jy1i6pr072p"))))
389 (build-system gnu-build-system)
390 (arguments
391 `(#:phases
392 (modify-phases %standard-phases
393 (add-after 'unpack 'patch-autogen
394 (lambda _
395 (let ((autoconf (which "autoconf"))
396 (autoheader (which "autoheader"))
397 (aclocal (which "aclocal"))
398 (automake (which "automake"))
399 (libtoolize (which "libtoolize")))
400 (substitute* "autogen.sh"
401 (("`which autoconf 2>/dev/null`") autoconf)
402 (("`which autoheader 2>/dev/null`") autoheader)
403 (("ACLOCAL=.*$")
404 (string-append "ACLOCAL=" aclocal "\n"))
405 (("AUTOMAKE=.*$")
406 (string-append "AUTOMAKE=" automake "\n"))
407 (("LIBTOOLIZE=.*$")
408 (string-append "LIBTOOLIZE=" libtoolize "\n"))))
409 #t)))))
410 (native-inputs
411 `(("autoconf" ,autoconf)
412 ("automake" ,automake)
413 ("libtool" ,libtool)
414 ("pkg-config" ,pkg-config)))
415 (inputs
416 `(("geos" ,geos)))
417 (synopsis "Library to handle SQL/MM topologies")
418 (description
419 "The RT Topology Library exposes an API to create and manage standard
420(ISO 13249 aka SQL/MM) topologies using user-provided data stores.")
421 (home-page "https://git.osgeo.org/gitea/rttopo/librttopo")
422 (license license:gpl2+)))
423
f6c507e1
BH
424(define-public libspatialite
425 (package
426 (name "libspatialite")
f33e773c 427 (version "5.0.1")
f6c507e1
BH
428 (source
429 (origin
430 (method url-fetch)
431 (uri (string-append "https://www.gaia-gis.it/gaia-sins/libspatialite-"
432 version ".tar.gz"))
433 (sha256
434 (base32
f33e773c 435 "164y82rw2lrp5glfc0rkn7n6xvx5dvlgmh7bb7815067251wkjzf"))))
f6c507e1
BH
436 (build-system gnu-build-system)
437 (native-inputs
438 `(("pkg-config" ,pkg-config)))
439 (inputs
440 `(("freexl" ,freexl)
441 ("geos" ,geos)
b202c702 442 ("librttopo" ,librttopo)
f6c507e1 443 ("libxml2" ,libxml2)
b202c702 444 ("minizip" ,minizip)
f6c507e1
BH
445 ("proj.4" ,proj.4)
446 ("sqlite" ,sqlite)
447 ("zlib" ,zlib)))
448 (arguments
b202c702
FG
449 `(#:configure-flags
450 '("--enable-rttopo=yes")
451 #:phases
f6c507e1
BH
452 (modify-phases %standard-phases
453 ;; 3 tests are failing, ignore them:
454 (add-after 'unpack 'ignore-broken-tests
455 (lambda _
456 (substitute* '("test/Makefile.in")
457 (("\tcheck_sql_stm.*" all) "\tcheck_multithread$(EXEEXT) \\\n")
458 (("(\tch.*) check_v.*ble2.*$" all vt1) (string-append vt1 " \\\n"))
459 (("\tch.* (check_v.*ble4.*)$" all vt4) (string-append "\t" vt4)))
460 #t)))))
461 (synopsis "Extend SQLite to support Spatial SQL capabilities")
462 (description
463 "SpatiaLite is a library intended to extend the SQLite core to support
464fully fledged Spatial SQL capabilities.")
465 (home-page "https://www.gaia-gis.it/fossil/libspatialite/index")
466 ;; For the genuine libspatialite-sources holds:
467 ;; Any of the licenses MPL1.1, GPL2+ or LGPL2.1+ may be picked.
468 ;; Files under src/control_points are from GRASS
469 ;; and are licensed under GPL2+ only.
470 ;; src/md5.[ch]: Placed into the public domain by Alexander Peslyak.
471 (license (list license:gpl2+
472 license:lgpl2.1+
473 license:mpl1.1
474 license:public-domain))))
475
3500d7ad
AI
476(define-public proj
477 (package
478 (name "proj")
9147d121 479 (version "6.3.1")
3500d7ad
AI
480 (source
481 (origin
482 (method url-fetch)
483 (uri (string-append "http://download.osgeo.org/proj/proj-"
484 version ".tar.gz"))
485 (sha256
486 (base32
9147d121 487 "1y46ij32j9b4x1kjnnlykcwk3kkjwkg44sfc1ziwm3a3g0ki3q3d"))))
3500d7ad
AI
488 (build-system gnu-build-system)
489 (inputs
490 `(("sqlite" ,sqlite)))
491 (native-inputs
492 `(("pkg-config" ,pkg-config)))
493 (home-page "https://proj.org/")
494 (synopsis "Coordinate transformation software")
495 (description
496 "Proj is a generic coordinate transformation software that transforms
497geospatial coordinates from one coordinate reference system (CRS) to another.
498This includes cartographic projections as well as geodetic transformations.
499PROJ includes command line applications for easy conversion of coordinates
500from text files or directly from user input. In addition, proj also exposes
501an application programming interface that lets developers use the
502functionality of proj in their own software.")
503 (license (list license:expat
504 ;; src/projections/patterson.cpp
505 license:asl2.0
506 ;; src/geodesic.*, src/tests/geodtest.cpp
507 license:x11))))
508
065d0125
BH
509(define-public proj.4
510 (package
511 (name "proj.4")
512 (version "4.9.3")
513 (source (origin
514 (method url-fetch)
515 (uri (string-append "http://download.osgeo.org/proj/proj-"
516 version ".tar.gz"))
517 (sha256
518 (base32
519 "1xw5f427xk9p2nbsj04j6m5zyjlyd66sbvl2bkg8hd1kx8pm9139"))))
520 (build-system gnu-build-system)
521 (arguments
522 `(#:phases
523 (modify-phases %standard-phases
524 (add-after 'unpack 'patch-test-paths
525 (lambda _
526 (substitute* '("nad/test27"
527 "nad/test83"
528 "nad/testvarious"
529 "nad/testdatumfile"
530 "nad/testflaky"
531 "nad/testIGNF")
532 (("/bin/rm") (which "rm")))
533 #t))
534 ;; Precision problems on i686 and other platforms. See:
535 ;; https://web.archive.org/web/20151006134301/http://trac.osgeo.org/proj/ticket/255
536 ;; Disable failing test.
537 (add-after 'patch-test-paths 'ignore-failing-tests
538 (lambda _
539 (substitute* '("nad/Makefile.in")
540 (("\tPROJ_LIB.*" all) (string-append "#" all)))
541 #t)))))
542 (inputs
543 `(("glib" ,glib)))
3fbb7bec 544 (home-page "https://proj.org/")
065d0125
BH
545 (synopsis "Cartographic Projections Library")
546 (description
547 "Proj.4 is a library for converting coordinates between cartographic
548projections.")
549 (license (list license:expat
550 ;; src/PJ_patterson.c
551 license:asl2.0
552 ;; src/geodesic.c/h
553 license:x11
554 ;; Embedded EPSG database.
555 (license:non-copyleft "http://www.epsg.org/TermsOfUse")
556 ;; cmake/*
557 license:boost1.0))))
f2b005f6
AI
558
559(define-public mapnik
560 (package
561 (name "mapnik")
562 (version "3.0.18")
563 (source
564 (origin
565 (method url-fetch)
566 (uri (string-append "https://github.com/mapnik/mapnik/releases/download/v"
567 version "/mapnik-v" version ".tar.bz2"))
568 (sha256
569 (base32
570 "06frcikaj2mgz3abfk5h0z4j3hbksi0zikwjngbjv4p5f3pwxf8q"))))
571 (build-system scons-build-system)
572 (inputs
573 `(("boost" ,boost)
574 ("cairo" ,cairo)
575 ("freetype" ,freetype)
576 ("harfbuzz" ,harfbuzz)
577 ("icu4c" ,icu4c)
578 ("libjpeg-turbo" ,libjpeg-turbo)
579 ("libpng" ,libpng)
580 ("libtiff" ,libtiff)
581 ("libwebp" ,libwebp)
582 ("libxml2" ,libxml2)
583 ("proj.4" ,proj.4)
584 ("sqlite" ,sqlite)
585 ("zlib" ,zlib)))
586 (native-inputs
587 `(("pkg-config" ,pkg-config)))
588 (arguments
589 `(#:scons ,scons-python2
590 #:scons-flags
591 (list "CC=gcc"
592 (string-append "PREFIX=" %output)
593 (string-append "CUSTOM_LDFLAGS=-Wl,-rpath=" %output "/lib"))))
711ebe77 594 (home-page "https://mapnik.org/")
f2b005f6
AI
595 (synopsis "Toolkit for developing mapping applications")
596 (description "Mapnik is a toolkit for developing mapping applications. It
597is basically a collection of geographic objects like maps, layers,
598datasources, features, and geometries. At its core is a C++ shared library
599providing algorithms and patterns for spatial data access and visualization.
600The library does not rely on any specific windowing system and can be deployed
601to any server environment. It is intended to play fair in a multi-threaded
602environment and is aimed primarily, but not exclusively, at web-based
603development.")
604 (license (list license:lgpl2.1+
605 ;; demo/viewer, demo/python/rundemo.py
606 license:gpl2+
607 ;; deps/boost, deps/mapbox, deps/agg/include/agg_conv_offset.h
608 license:boost1.0
609 ;; deps/mapnik/sparsehash
610 license:bsd-3
611 ;; deps/agg
612 (license:non-copyleft "file://deps/agg/copying")))))
613
f25e1e24
AI
614(define-public python2-mapnik
615 (package
616 (name "python2-mapnik")
617 (version "3.0.16")
618 (source
619 (origin
620 (method url-fetch)
621 (uri (string-append "https://github.com/mapnik/python-mapnik/archive/v"
622 version ".tar.gz"))
623 (file-name (string-append name "-" version ".tar.gz"))
624 (sha256
625 (base32
626 "0w7wg72gnwmbjani9sqk42p2jwqkrl9hsdkawahni5m05xsifcb4"))))
627 (build-system python-build-system)
628 (inputs
629 `(("boost" ,boost)
630 ("harfbuzz" ,harfbuzz)
631 ("icu4c" ,icu4c)
632 ("libjpeg-turbo" ,libjpeg-turbo)
633 ("libpng" ,libpng)
634 ("libtiff" ,libtiff)
635 ("libwebp" ,libwebp)
636 ("mapnik" ,mapnik)
637 ("proj.4" ,proj.4)
638 ("python2-pycairo" ,python2-pycairo)))
639 (native-inputs
640 (let ((test-data-input
641 (lambda (repository version hash)
642 (origin
643 (method url-fetch)
644 (uri (string-append "https://github.com/mapnik/" repository
645 "/archive/v" version ".tar.gz"))
646 (file-name (string-append "python-mapnik-" repository
647 "-" version ".tar.gz"))
648 (sha256 (base32 hash))))))
649 `(("python2-nose" ,python2-nose)
650 ;; Test data is released as separate tarballs
651 ("test-data"
652 ,(test-data-input "test-data" "3.0.18"
653 "10cvgn5gxn8ldrszj24zr1vzm5w76kqk4s7bl2zzp5yvkhh8lj1n"))
654 ("test-data-visual"
655 ,(test-data-input "test-data-visual" "3.0.18"
656 "1cb9ghy8sis0w5fkp0dvwxdqqx44rhs9a9w8g9r9i7md1c40r80i")))))
657 (arguments
658 `(#:python ,python-2 ; Python 3 support is incomplete, and the build fails
659 #:phases
660 (modify-phases %standard-phases
661 ;; Unpack test data into the source tree
662 (add-after 'unpack 'unpack-submodules
663 (lambda* (#:key inputs #:allow-other-keys)
664 (let ((unpack (lambda (source target)
665 (with-directory-excursion target
666 (invoke "tar" "xvf" (assoc-ref inputs source)
667 "--strip-components=1")))))
668 (unpack "test-data" "test/data")
669 (unpack "test-data-visual" "test/data-visual"))))
670 ;; Skip failing tests
671 (add-after 'unpack 'skip-tests
672 (lambda _
673 (let ((skipped-tests (list "test_vrt_referring_to_missing_files"
674 "test_unicode_regex_replace"
675 "test_proj_antimeridian_bbox"
676 "test_render_with_scale_factor")))
677 (substitute* "setup.cfg"
678 (("\\[nosetests\\]" all)
679 (string-append all "\nexclude=^("
680 (string-join skipped-tests "|") ")$")))))))))
681 (home-page "https://github.com/mapnik/python-mapnik")
682 (synopsis "Python bindings for Mapnik")
683 (description "This package provides Python bindings for Mapnik.")
684 (license license:lgpl2.1+)))
a2a53274
BH
685
686(define-public spatialite-gui
687 (package
688 (name "spatialite-gui")
689 (version "1.7.1")
690 (source
691 (origin
692 (method url-fetch)
693 (uri (string-append "https://www.gaia-gis.it/gaia-sins/spatialite_gui-"
694 version ".tar.gz"))
695 (sha256
696 (base32
697 "1r05dz9pyc8vsd2wbqxcsracpfbaamz470rcyp2myfpqwznv376b"))))
698 (build-system gnu-build-system)
699 (native-inputs
700 `(("pkg-config" ,pkg-config)))
701 (inputs
702 `(("freexl" ,freexl)
703 ("geos" ,geos)
704 ("libgaiagraphics" ,libgaiagraphics)
e8906d86 705 ("libjpeg-turbo" ,libjpeg-turbo)
a2a53274
BH
706 ("libspatialite" ,libspatialite)
707 ("libxml2" ,libxml2)
708 ("proj.4" ,proj.4)
709 ("sqlite" ,sqlite)
710 ("wxwidgets" ,wxwidgets-2)
711 ("zlib" ,zlib)))
f7f67495
GLV
712 (arguments
713 `(#:phases (modify-phases %standard-phases
714 (add-after 'unpack 'fix-gui
715 (lambda _
716 ;; Fix for the GUI not showing up.
717 (substitute* "Main.cpp"
718 (("Hide\\(\\);") ""))
719 #t)))))
a2a53274
BH
720 (synopsis "Graphical user interface for SpatiaLite")
721 (description "Spatialite-gui provides a visual interface for viewing and
722 maintaining a spatialite database. You can easily see the structure of the
723 tables and data contents using point and click functions, many of which
724 construct common SQL queries, or craft your own SQL queries.")
725 (home-page "https://www.gaia-gis.it/fossil/spatialite_gui/index")
726 (license license:gpl3+)))
3d60f426 727
996e45cb
JL
728(define-public gdal
729 (package
730 (name "gdal")
b45be612 731 (version "3.1.2")
996e45cb
JL
732 (source (origin
733 (method url-fetch)
734 (uri (string-append
735 "http://download.osgeo.org/gdal/" version "/gdal-"
736 version ".tar.gz"))
737 (sha256
738 (base32
b45be612 739 "1p6nmlsr8wbyq350pa6c22vrp98dcsa7yjnqsbhdbp74yj53nw9r"))
996e45cb
JL
740 (modules '((guix build utils)))
741 (snippet
742 `(begin
743 ;; TODO: frmts contains a lot more bundled code.
744 (for-each delete-file-recursively
745 ;; bundled code
746 '("frmts/png/libpng"
747 "frmts/gif/giflib"
748 "frmts/jpeg/libjpeg"
749 "frmts/jpeg/libjpeg12"
750 "frmts/gtiff/libtiff"
751 "frmts/gtiff/libgeotiff"
752 "frmts/zlib"
753 "ogr/ogrsf_frmts/geojson/libjson"))))))
754 (build-system gnu-build-system)
755 (arguments
756 `(#:tests? #f
757 #:configure-flags
758 (let-syntax ((with (syntax-rules ()
759 ((_ option input)
760 (string-append option "="
761 (assoc-ref %build-inputs input))))))
762 (list
763 ;; TODO: --with-pcidsk, --with-pcraster
764 (with "--with-freexl" "freexl")
765 (with "--with-libjson-c" "json-c")
766 (with "--with-png" "libpng")
767 (with "--with-webp" "libwebp")
768 (with "--with-gif" "giflib")
109f022e 769 (with "--with-jpeg" "libjpeg-turbo")
996e45cb
JL
770 (with "--with-libtiff" "libtiff")
771 (with "--with-geotiff" "libgeotiff")
772 (with "--with-libz" "zlib")
0f054356 773 (with "--with-expat" "expat")
838db4fc 774 (with "--with-sqlite3" "sqlite")
996e45cb
JL
775 "--with-pcre"))
776 #:phases
777 (modify-phases %standard-phases
778 (add-before 'build 'fix-path
779 (lambda _
780 (substitute* "frmts/mrf/mrf_band.cpp"
781 (("\"../zlib/zlib.h\"") "<zlib.h>")))))))
782 (inputs
0f054356
AI
783 `(("expat" ,expat)
784 ("freexl" ,freexl)
996e45cb
JL
785 ("geos" ,geos)
786 ("giflib" ,giflib)
787 ("json-c" ,json-c)
788 ("libgeotiff" ,libgeotiff)
789 ("libjpeg-turbo" ,libjpeg-turbo)
790 ("libpng" ,libpng)
791 ("libtiff" ,libtiff)
792 ("libwebp" ,libwebp)
6cde0737 793 ("netcdf" ,netcdf)
996e45cb 794 ("pcre" ,pcre)
1ee58405 795 ("postgresql" ,postgresql) ; libpq
e72557c0 796 ("proj" ,proj)
838db4fc 797 ("sqlite" ,sqlite)
996e45cb 798 ("zlib" ,zlib)))
1ee58405
BH
799 (native-inputs
800 `(("pkg-config" ,pkg-config)))
e7453b3c 801 (home-page "https://gdal.org/")
996e45cb
JL
802 (synopsis "Raster and vector geospatial data format library")
803 (description "GDAL is a translator library for raster and vector geospatial
804data formats. As a library, it presents a single raster abstract data model
805and single vector abstract data model to the calling application for all
806supported formats. It also comes with a variety of useful command line
807utilities for data translation and processing.")
808 (license (list
809 ;; general license
810 license:expat
811 ;; frmts/gtiff/tif_float.c, frmts/pcraster/libcsf,
812 ;; ogr/ogrsf_frmts/dxf/intronurbs.cpp, frmts/pdf/pdfdataset.cpp
813 ;; frmts/mrf/
814 license:bsd-3
815 ;; frmts/hdf4/hdf-eos/*
816 ;; similar to the expat license, but without guarantee exclusion
817 (license:non-copyleft "file://frmts/hdf4/hdf-eos/README")
818 ;; frmts/grib/degrib/
819 license:public-domain ; with guarantee exclusion
820 ;; port/cpl_minizip*
821 ;; Some bsd-inspired license
822 (license:non-copyleft "file://port/LICENCE_minizip")
823 ;; alg/internal_libqhull
824 ;; Some 5-clause license
825 (license:non-copyleft "file://alg/internal_libqhull/COPYING.txt")
826 ;; frmts/mrf/libLERC
827 license:asl2.0))))
2b9be1a6 828
a18a27be
SB
829(define-public python-gdal
830 (package (inherit gdal)
831 (name "python-gdal")
832 (build-system python-build-system)
833 (arguments
834 '(#:tests? #f ; no tests
835 #:phases
836 (modify-phases %standard-phases
837 (add-before 'build 'chdir
838 (lambda _
839 (chdir "swig/python")
840 #t)))))
841 (native-inputs '())
842 (propagated-inputs
843 `(("python-numpy" ,python-numpy)))
844 (inputs
845 `(("gdal" ,gdal)))
846 (synopsis "GDAL (Geospatial Data Abstraction Library) python bindings")))
847
2b9be1a6
JL
848(define-public postgis
849 (package
850 (name "postgis")
47df4633 851 (version "3.1.1")
2b9be1a6
JL
852 (source (origin
853 (method url-fetch)
854 (uri (string-append "https://download.osgeo.org/postgis/source/postgis-"
855 version ".tar.gz"))
856 (sha256
857 (base32
47df4633 858 "0z9a39243fv37mansbbjq5mmxpnhr7xzn8pv92fr7dkdb3psz5hf"))))
2b9be1a6
JL
859 (build-system gnu-build-system)
860 (arguments
861 `(#:tests? #f
862 #:make-flags
863 (list (string-append "datadir=" (assoc-ref %outputs "out") "/share")
864 (string-append "docdir="(assoc-ref %outputs "out") "/share/doc")
865 (string-append "pkglibdir="(assoc-ref %outputs "out") "/lib")
866 (string-append "bindir=" (assoc-ref %outputs "out") "/bin"))
867 #:phases
868 (modify-phases %standard-phases
869 (add-before 'build 'fix-install-path
870 (lambda* (#:key outputs #:allow-other-keys)
871 (substitute* '("raster/loader/Makefile" "raster/scripts/python/Makefile")
872 (("\\$\\(DESTDIR\\)\\$\\(PGSQL_BINDIR\\)")
873 (string-append (assoc-ref outputs "out") "/bin"))))))))
874 (inputs
875 `(("gdal" ,gdal)
876 ("geos" ,geos)
bfffe6d2 877 ("giflib" ,giflib)
75e2c054
AI
878 ("json-c" ,json-c)
879 ("libjpeg" ,libjpeg-turbo)
2b9be1a6
JL
880 ("libxml2" ,libxml2)
881 ("pcre" ,pcre)
882 ("postgresql" ,postgresql)
47df4633 883 ("protobuf-c" ,protobuf-c)
75e2c054 884 ("proj" ,proj)))
2b9be1a6
JL
885 (native-inputs
886 `(("perl" ,perl)
887 ("pkg-config" ,pkg-config)))
888 (home-page "https://postgis.net")
889 (synopsis "Spatial database extender for PostgreSQL")
890 (description "PostGIS is a spatial database extender for PostgreSQL
891object-relational database. It adds support for geographic objects allowing
8e3f06c9
JL
892location queries to be run in SQL. This package provides a PostgreSQL
893extension.")
2b9be1a6
JL
894 (license (list
895 ;; General license
896 license:gpl2+
897 ;; loader/dbfopen, safileio.*, shapefil.h, shpopen.c
898 license:expat
899 ;; loader/getopt.*
900 license:public-domain
901 ;; doc/xsl
902 license:bsd-3 ; files only say "BSD"
903 ;; doc
904 license:cc-by-sa3.0))))
be7c64ba
JL
905
906(define-public tegola
907 (package
908 (name "tegola")
909 (version "0.7.0")
910 (source (origin
911 (method url-fetch)
912 (uri (string-append
913 "https://github.com/go-spatial/tegola/archive/v"
914 version ".tar.gz"))
915 (file-name (string-append name "-" version ".tar.gz"))
916 (sha256
917 (base32
918 "09vnzxfn0r70kmd776kcdfqxhzdj11syxa0b27z4ci1k367v7viw"))))
919 (build-system go-build-system)
920 (arguments
921 `(#:import-path "github.com/go-spatial/tegola/cmd/tegola"
d9ef50b3 922 #:unpack-path "github.com/go-spatial/tegola"
be7c64ba
JL
923 #:phases
924 (modify-phases %standard-phases
925 (add-before 'build 'set-version
926 (lambda _
d9ef50b3 927 (with-directory-excursion "src/github.com/go-spatial/tegola"
be7c64ba
JL
928 (substitute* '("cmd/tegola/cmd/root.go"
929 "cmd/tegola_lambda/main.go")
930 (("version not set") ,version)))
be7c64ba 931 #t)))))
0d49a4bb 932 (home-page "https://tegola.io")
be7c64ba
JL
933 (synopsis "Vector tile server for maps")
934 (description "Tegola is a free vector tile server written in Go. Tegola
935takes geospatial data and slices it into vector tiles that can be efficiently
936delivered to any client.")
937 (license (list
938 license:expat
939 ;; Some packages in vendor have other licenses
940 license:asl2.0
941 license:bsd-2
942 license:bsd-3
943 license:wtfpl2))))
3bd7611e
JL
944
945(define-public imposm3
946 (package
947 (name "imposm3")
948 (version "0.6.0-alpha.4")
949 (source
950 (origin
951 (method url-fetch)
952 (uri (string-append "https://github.com/omniscale/imposm3/archive/v"
953 version ".tar.gz"))
954 (file-name (string-append name "-" version ".tar.gz"))
955 (sha256
956 (base32
957 "06f0kwmv52yd5m9jlckqxqmkf0cnqy3hamakrvg9lspplyqrds80"))))
958 (build-system go-build-system)
959 (arguments
960 `(#:import-path "github.com/omniscale/imposm3/cmd/imposm"
bdc0c20c 961 #:unpack-path "github.com/omniscale/imposm3"
3bd7611e
JL
962 #:phases
963 (modify-phases %standard-phases
3bd7611e
JL
964 (add-before 'build 'set-version
965 (lambda _
966 (substitute* "src/github.com/omniscale/imposm3/version.go"
967 (("0.0.0-dev") ,version))
968 #t)))))
969 (inputs
970 `(("geos" ,geos)
971 ("leveldb" ,leveldb)))
972 (home-page "https://imposm.org/")
973 (synopsis "OpenStreetMap importer for PostGIS")
974 (description "Imposm is an importer for OpenStreetMap data. It reads PBF
975files and imports the data into PostgreSQL/PostGIS databases. It is designed
976to create databases that are optimized for rendering/tile/map-services.")
977 (license (list
978 license:asl2.0
979 ;; Some dependencies in vendor have different licenses
980 license:expat
981 license:bsd-2
982 license:bsd-3))))
8fa3451c 983
889e94e3
JL
984(define-public libosmium
985 (package
986 (name "libosmium")
7953f8b7 987 (version "2.15.6")
889e94e3 988 (source
f4daf250
TGR
989 (origin
990 (method git-fetch)
991 (uri (git-reference
b0e7b699 992 (url "https://github.com/osmcode/libosmium")
f4daf250
TGR
993 (commit (string-append "v" version))))
994 (file-name (git-file-name name version))
995 (sha256
7953f8b7 996 (base32 "0rqy18bbakp41f44y5id9ixh0ar2dby46z17p4115z8k1vv9znq2"))))
889e94e3
JL
997 (build-system cmake-build-system)
998 (propagated-inputs
999 `(("boost" ,boost)
7ba300ee 1000 ("bzip2" ,bzip2)
889e94e3
JL
1001 ("expat" ,expat)
1002 ("gdal" ,gdal)
1003 ("geos" ,geos)
7ba300ee 1004 ("proj" ,proj)
889e94e3
JL
1005 ("protozero" ,protozero)
1006 ("sparsehash" ,sparsehash)
7ba300ee 1007 ("utfcpp" ,utfcpp)
889e94e3
JL
1008 ("zlib" ,zlib)))
1009 (native-inputs
1010 `(("doxygen" ,doxygen)))
1011 (home-page "https://osmcode.org/libosmium/")
1012 (synopsis "C++ library for working with OpenStreetMap data")
1013 (description "Libosmium is a fast and flexible C++ library for working with
1014OpenStreetMap data.")
1015 (license license:boost1.0)))
b0e2299a
JL
1016
1017(define-public osm2pgsql
1018 (package
1019 (name "osm2pgsql")
12988adf 1020 (version "1.2.2")
82b47fd9
TGR
1021 (source
1022 (origin
1023 (method git-fetch)
1024 (uri (git-reference
b0e7b699 1025 (url "https://github.com/openstreetmap/osm2pgsql")
82b47fd9
TGR
1026 (commit version)))
1027 (file-name (git-file-name name version))
1028 (sha256
12988adf 1029 (base32 "1j35aa8qinhavliqi5pdm0viyi7lm5xyk402rliaxxs1r2hbsafn"))
82b47fd9
TGR
1030 (modules '((guix build utils)))
1031 (snippet
1032 '(begin
1033 (delete-file-recursively "contrib/protozero")
1034 (delete-file-recursively "contrib/libosmium")
1035 #t))))
b0e2299a
JL
1036 (build-system cmake-build-system)
1037 (arguments
1038 `(#:tests? #f; tests fail because we need to setup a database
1039 #:configure-flags
1040 (list (string-append "-DOSMIUM_INCLUDE_DIR="
1041 (assoc-ref %build-inputs "libosmium")
1042 "/include")
1043 (string-append "-DPROTOZERO_INCLUDE_DIR="
1044 (assoc-ref %build-inputs "protozero")
1045 "/include"))))
1046 (inputs
1047 `(("boost" ,boost)
6145b167 1048 ("bzip2" ,bzip2)
b0e2299a
JL
1049 ("expat" ,expat)
1050 ("libosmium" ,libosmium)
1051 ("lua" ,lua)
1052 ("postgresql" ,postgresql)
6145b167 1053 ("proj" ,proj)
b0e2299a
JL
1054 ("protozero" ,protozero)
1055 ("zlib" ,zlib)))
1056 (native-inputs
6145b167
GLV
1057 `(("python" ,python)
1058 ("python-psycopg2" ,python-psycopg2)))
b0e2299a
JL
1059 (home-page "https://github.com/openstreetmap/osm2pgsql")
1060 (synopsis "OSM data importer to postgresql")
1061 (description "Osm2pgsql is a tool for loading OpenStreetMap data into a
1062PostgreSQL / PostGIS database suitable for applications like rendering into a
1063map, geocoding with Nominatim, or general analysis.")
1064 (license license:gpl2+)))
6f91223f
JL
1065
1066(define-public tippecanoe
1067 (package
1068 (name "tippecanoe")
1069 (version "1.31.5")
8f33d05e
TGR
1070 (source
1071 (origin
1072 (method git-fetch)
1073 (uri (git-reference
b0e7b699 1074 (url "https://github.com/mapbox/tippecanoe")
8f33d05e
TGR
1075 (commit version)))
1076 (file-name (git-file-name name version))
1077 (sha256
1078 (base32 "1m0x931a945sr7axyhcvpwh798m58hx1zxh6ikgf9gsgqhdhmszz"))))
6f91223f
JL
1079 (build-system gnu-build-system)
1080 (arguments
1081 `(#:phases
1082 (modify-phases %standard-phases (delete 'configure))
1083 #:test-target "test"
1084 #:make-flags
1085 (list "CC=gcc"
1086 (string-append "PREFIX=" (assoc-ref %outputs "out")))))
1087 (inputs
1088 `(("perl" ,perl)
1089 ("sqlite" ,sqlite)
1090 ("zlib" ,zlib)))
1091 (home-page "https://github.com/mapbox/tippecanoe")
1092 (synopsis "Vector tile server for maps")
1093 (description "Tippecanoe creates scale-independent view of data, so that
1094the texture and density of features is visible at every zoom level, instead of
1095dropping features at lower levels.")
1096 (license license:bsd-2)))
ed72a133
GLV
1097
1098(define-public osmctools
1099 (package
1100 (name "osmctools")
1101 (version "0.9")
1102 (source
1103 (origin
1104 (method git-fetch)
1105 (uri (git-reference
1106 (url "https://gitlab.com/osm-c-tools/osmctools")
1107 (commit version)))
1108 (file-name (git-file-name name version))
1109 (sha256
1110 (base32
1111 "1m8d3r1q1v05pkr8k9czrmb4xjszw6hvgsf3kn9pf0v14gpn4r8f"))))
1112 (build-system gnu-build-system)
1113 (native-inputs
1114 `(("autoconf" ,autoconf)
1115 ("automake" ,automake)))
1116 (inputs
1117 `(("zlib" ,zlib)))
1118 (home-page "https://gitlab.com/osm-c-tools/osmctools")
1119 (synopsis "Tools to convert, filter and update OpenStreetMap data files")
1120 (description "This project contains a few tools which are used in the
1121OpenStreetMap project. They can be used to convert, filter and update
1122OpenStreetMap data files.")
1123 (license license:agpl3)))
ee34be73
GLV
1124
1125(define-public osm-gps-map
1126 (package
1127 (name "osm-gps-map")
1128 (version "1.1.0")
1129 (source
1130 (origin
1131 (method url-fetch)
1132 (uri (string-append
1133 "https://github.com/nzjrs/osm-gps-map/releases/download/"
1134 version "/osm-gps-map-" version ".tar.gz"))
1135 (sha256
1136 (base32
1137 "11imsf4cz1dpxdjh178k2s29axmq86rkfg1pqmn7incyxmjzhbwg"))))
1138 (build-system gnu-build-system)
1139 (native-inputs
1140 `(("gnome-common" ,gnome-common)
1141 ("gtk-doc" ,gtk-doc)
1142 ("pkg-config" ,pkg-config)))
1143 (inputs
1144 `(("cairo" ,cairo)
1145 ("glib" ,glib)
1146 ("gobject-introspection" ,gobject-introspection)
1147 ("gtk+" ,gtk+)
1148 ("libsoup" ,libsoup)))
1149 (home-page "https://nzjrs.github.io/osm-gps-map/")
1150 (synopsis "GTK+ widget for displaying OpenStreetMap tiles")
1151 (description
1152 "This package provides a GTK+ widget (and Python bindings) that when
1153given GPS coordinates,draws a GPS track, and points of interest on a moving
1154map display. Downloads map data from a number of websites, including
1155@url{https://www.openstreetmap.org}.")
1156 (license license:gpl2+)))
0f7b8a7f
EF
1157
1158(define-public xygrib
1159 (package
1160 (name "xygrib")
29bdabb6 1161 (version "1.2.6.1")
0f7b8a7f
EF
1162 (source (origin
1163 (method git-fetch)
1164 (uri (git-reference
b0e7b699 1165 (url "https://github.com/opengribs/XyGrib")
0f7b8a7f
EF
1166 (commit (string-append "v" version))))
1167 (file-name (git-file-name name version))
1168 (sha256
1169 (base32
29bdabb6 1170 "0xzsm8pr0zjk3f8j880fg5n82jyxn8xf1330qmmq1fqv7rsrg9ia"))
0f7b8a7f
EF
1171 (modules '((guix build utils)))
1172 (snippet
40b3e9da
EF
1173 '(begin
1174 (delete-file-recursively "data/fonts")
1175 ;; Fixes compilation, can be removed with the next release.
1176 ;; Upstream link: https://github.com/opengribs/XyGrib/pull/255
1177 (substitute* "src/SkewT.h"
1178 (("QMessageBox>") "QMessageBox>\n#include <QPainterPath>"))
1179 #t))))
0f7b8a7f
EF
1180 (build-system cmake-build-system)
1181 (arguments
1182 `(#:phases
1183 (modify-phases %standard-phases
1184 (add-after 'unpack 'patch-directories
1185 (lambda* (#:key inputs #:allow-other-keys)
1186 (let ((jpeg (assoc-ref inputs "openjpeg"))
1187 (font (assoc-ref inputs "font-liberation")))
1188 (substitute* "CMakeLists.txt"
1189 ;; Find libjpeg.
1190 (("/usr") jpeg)
1191 ;; Fix install locations.
1192 (("set\\(PREFIX_BIN.*") "set(PREFIX_BIN \"bin\")\n")
1193 (("set\\(PREFIX_PKGDATA.*") "set(PREFIX_PKGDATA \"share/${PROJECT_NAME}\")\n")
1194 ;; Skip looking for the static library.
1195 (("\"libnova.a\"") ""))
1196 ;; Don't use the bundled font-liberation.
1197 (substitute* "src/util/Font.cpp"
1198 (("Util::pathFonts\\(\\)\\+\"liberation-fonts/\"")
1199 (string-append "\"" font "/share/fonts/truetype/\"")))
1200 (substitute* "src/util/Util.h"
1201 (("pathData\\(\\)\\+\"data/fonts/\"")
1202 (string-append "\"" font "/share/fonts/\""))))
1203 #t)))
1204 #:tests? #f)) ; no tests
1205 (native-inputs
1206 `(("qttools" ,qttools)))
1207 (inputs
1208 `(("bzip2" ,bzip2)
1209 ("font-liberation" ,font-liberation)
1210 ("libnova" ,libnova)
1211 ("libpng" ,libpng)
1212 ("openjpeg" ,openjpeg)
1213 ("proj.4" ,proj.4)
1214 ("qtbase" ,qtbase)
1215 ("zlib" ,zlib)))
1216 (synopsis "Weather Forecast Visualization")
1217 (description
1218 "XyGrib is a Grib file reader and visualizes meteorological data providing
1219an off-line capability to analyse weather forecasts or hindcasts. It is
1220intended to be used as a capable weather work station for anyone with a serious
1221interest in examining weather. This would include members of the sailing
1222community, private and sport aviators, farmers, weather buffs and many more.
1223XyGrib is the continuation of the zyGrib software package with a new team of
1224volunteers.")
1225 (home-page "https://opengribs.org")
1226 (license license:gpl3+)))
41b4b713
1227
1228(define-public libspatialindex
1229 (package
1230 (name "libspatialindex")
1cbe7a3e 1231 (version "1.9.3")
41b4b713
1232 (source
1233 (origin
1234 (method url-fetch)
1cbe7a3e
AI
1235 (uri (string-append "https://github.com/libspatialindex/libspatialindex/"
1236 "releases/download/" version "/spatialindex-src-"
1237 version ".tar.bz2"))
41b4b713
1238 (sha256
1239 (base32
1cbe7a3e
AI
1240 "02n5vjcyk04w0djidyp21hfbxfpbbara8ifd9nml6158rwqr8lja"))))
1241 (build-system cmake-build-system)
41b4b713
1242 (home-page "https://libspatialindex.org")
1243 (synopsis "Spatial indexing library")
1244 (description "The purpose of this library is to provide:
1245
1246@itemize
1247 @item An extensible framework that will support robust spatial indexing
1248methods.
1249 @item Support for sophisticated spatial queries. Range, point location,
1250 nearest neighbor and k-nearest neighbor as well as parametric queries (defined
1251by spatial constraints) should be easy to deploy and run.
1252 @item Easy to use interfaces for inserting, deleting and updating information.
1253 @item Wide variety of customization capabilities. Basic index and storage
1254characteristics like the page size, node capacity, minimum fan-out, splitting
1255algorithm, etc. should be easy to customize.
1256 @item Index persistence. Internal memory and external memory structures
1257should be supported. Clustered and non-clustered indices should be easy to be
1258persisted.
1259@end itemize
1260")
1261 (license license:expat)))
6dd0e41d
JL
1262
1263(define-public java-jmapviewer
1264 (package
1265 (name "java-jmapviewer")
8c8c0c63 1266 (version "2.13")
6dd0e41d
JL
1267 (source (origin
1268 (method url-fetch)
1269 (uri (string-append "https://svn.openstreetmap.org/applications/"
1270 "viewer/jmapviewer/releases/" version
1271 "/JMapViewer-" version "-Source.zip"))
1272 (sha256
1273 (base32
8c8c0c63 1274 "0sy6r5fkbb9bclw0is6gwnbzz627m7pjfnsqydxz58pbndakkhrv"))))
6dd0e41d
JL
1275 (build-system ant-build-system)
1276 (native-inputs
1277 `(("unzip" ,unzip)))
1278 (arguments
1279 `(#:build-target "pack"
1280 #:tests? #f; No tests
1281 #:phases
1282 (modify-phases %standard-phases
1283 (add-before 'build 'clean
1284 (lambda* _
1285 (invoke "ant" "clean")))
1286 (replace 'install
1287 (lambda* (#:key outputs #:allow-other-keys)
1288 (let ((dir (string-append (assoc-ref outputs "out") "/share/java/")))
1289 (mkdir-p dir)
54cc2b4e
BH
1290 (copy-file "JMapViewer.jar" (string-append dir "JMapViewer.jar"))
1291 #t))))))
6dd0e41d
JL
1292 (home-page "https://wiki.openstreetmap.org/wiki/JMapViewer")
1293 (synopsis "OSM map integration in Java")
4042f7f8
VC
1294 (description "JMapViewer is a Java component which easily
1295integrates an OSM map view into your Java application. It is maintained as
6dd0e41d
JL
1296an independent project by the JOSM team.")
1297 (license license:gpl2)))
f041db86 1298
f1abc566
JL
1299(define-public java-opening-hours-parser
1300 (package
1301 (name "java-opening-hours-parser")
1302 (version "0.21.4")
1303 (source (origin
1304 (method git-fetch)
1305 (uri (git-reference
1306 (url "https://github.com/simonpoole/OpeningHoursParser")
1307 (commit version)))
1308 (file-name (git-file-name name version))
1309 (sha256
1310 (base32
1311 "1m8sp0jbjyv1nq3ddj8rk6rf3sva3mkacc6vw7rsj0c2n57k3i50"))))
1312 (build-system ant-build-system)
1313 (arguments
1314 `(#:jar-name "java-opening-hours-parser.jar"
1315 #:source-dir "src/main/java"
1316 #:phases
1317 (modify-phases %standard-phases
1318 (add-before 'build 'copy-resources
1319 (lambda _
1320 (copy-recursively "src/main/resources" "build/classes")
1321 #t))
1322 (add-before 'build 'generate-parser
1323 (lambda* _
1324 (let* ((dir "src/main/java/ch/poole/openinghoursparser")
1325 (file (string-append dir "/OpeningHoursParser.jj")))
1326 (invoke "javacc" "-DEBUG_PARSER=false"
1327 "-DEBUG_TOKEN_MANAGER=false" "-JDK_VERSION=1.8"
1328 "-GRAMMAR_ENCODING=UTF-8"
1329 (string-append "-OUTPUT_DIRECTORY=" dir)
1330 file))
1331 #t)))))
1332 (inputs
1333 `(("java-jetbrains-annotations" ,java-jetbrains-annotations)))
1334 (native-inputs
1335 `(("javacc" ,javacc)
1336 ("java-junit" ,java-junit)
1337 ("java-hamcrest-core" ,java-hamcrest-core)))
1338 (home-page "https://github.com/simonpoole/OpeningHoursParser")
1339 (synopsis "Java parser for the OpenStreetMap opening hour format")
1340 (description "This is a very simplistic parser for string values according
1341to the OSM opening hours specification.")
1342 (license license:expat)))
1343
f041db86
JL
1344(define-public josm
1345 (package
1346 (name "josm")
15657947 1347 (version "17329")
f041db86
JL
1348 (source (origin
1349 (method svn-fetch)
1350 (uri (svn-reference
1351 (url "https://josm.openstreetmap.de/svn/trunk")
1352 (revision (string->number version))
1353 (recursive? #f)))
1354 (sha256
1355 (base32
15657947 1356 "0bq6mirdsi0kmhjfzfp3innxi5a4395d7mas7ikxaz0cziljrz1i"))
f041db86
JL
1357 (file-name (string-append name "-" version "-checkout"))
1358 (modules '((guix build utils)))
1359 (snippet
1360 '(begin
1192ae94 1361 (for-each delete-file (find-files "." ".*.jar$"))
f041db86
JL
1362 #t))))
1363 (build-system ant-build-system)
1364 (native-inputs
1365 `(("javacc" ,javacc)))
1366 (inputs
1367 `(("java-commons-jcs" ,java-commons-jcs)
1368 ("java-commons-compress" ,java-commons-compress)
1369 ("java-jmapviewer" ,java-jmapviewer)
1370 ("java-jsonp-api" ,java-jsonp-api)
1371 ("java-jsonp-impl" ,java-jsonp-impl); runtime dependency
1372 ("java-metadata-extractor" ,java-metadata-extractor)
cfdb6770 1373 ("java-opening-hours-parser" ,java-opening-hours-parser)
f041db86
JL
1374 ("java-openjfx-media" ,java-openjfx-media)
1375 ("java-signpost-core" ,java-signpost-core)
1376 ("java-svg-salamander" ,java-svg-salamander)))
1377 (arguments
1378 `(#:tests? #f
1379 #:jar-name "josm.jar"
1380 #:phases
1381 (modify-phases %standard-phases
1382 (add-after 'unpack 'rm-build.xml
1383 (lambda* _
1384 (delete-file "build.xml")
1385 #t))
1386 (add-before 'build 'fix-revision
1387 (lambda* _
1388 (with-output-to-file "REVISION.XML"
1389 (lambda _
1390 (display
1391 (string-append "<info><entry><commit revision=\"" ,version "\">"
1392 "<date>1970-01-01 00:00:00 +0000</date>"
1393 "</commit></entry></info>"))))
1394 #t))
cfdb6770
JL
1395 (add-before 'build 'fix-jcs
1396 (lambda _
1397 ;; This version of JOSM uses an unreleased version of commons-jcs,
1398 ;; which has renamed its classes to another namespace. Rename them
1399 ;; back so they can be used with our version of jcs.
1400 (substitute* (find-files "." ".*.java$")
1401 (("jcs3") "jcs"))
1402 #t))
f041db86
JL
1403 (add-before 'build 'fix-classpath
1404 (lambda* (#:key inputs #:allow-other-keys)
1405 (setenv "CLASSPATH"
1406 (string-join
1407 (filter
1408 (lambda (s)
1409 (let ((source (assoc-ref inputs "source")))
1192ae94
CB
1410 (not (equal? (substring s 0 (string-length source))
1411 source))))
f041db86
JL
1412 (string-split (getenv "CLASSPATH") #\:))
1413 ":"))
1414 #t))
1415 (add-before 'build 'generate-parser
1416 (lambda* _
1417 (let* ((dir "src/org/openstreetmap/josm/gui/mappaint/mapcss")
1418 (out (string-append dir "/parsergen"))
1419 (file (string-append dir "/MapCSSParser.jj")))
1420 (mkdir-p "src/org/openstreetmap/josm/gui/mappaint/mapcss/parsergen")
1421 (invoke "javacc" "-DEBUG_PARSER=false"
1422 "-DEBUG_TOKEN_MANAGER=false" "-JDK_VERSION=1.8"
1423 "-GRAMMAR_ENCODING=UTF-8"
1424 (string-append "-OUTPUT_DIRECTORY=" out)
1425 file))
1426 #t))
1427 (add-after 'build 'generate-epsg
1428 (lambda _
1429 (system* "javac" "scripts/BuildProjectionDefinitions.java"
1430 "-cp" "build/classes")
1431 (mkdir-p "data/projection")
1432 (with-output-to-file "data/projection/custom-epsg"
1433 (lambda _ (display "")))
1434 (invoke "java" "-cp" "build/classes:scripts:."
1435 "BuildProjectionDefinitions" ".")
1436 #t))
cfdb6770 1437 (add-after 'generate-epsg 'copy-resources
f041db86 1438 (lambda _
cfdb6770 1439 (copy-recursively "resources" "build/classes")
f041db86
JL
1440 #t))
1441 (add-before 'install 'regenerate-jar
1442 (lambda _
1443 ;; We need to regenerate the jar file to add data.
1444 (delete-file "build/jar/josm.jar")
1445 (invoke "jar" "-cf" "build/jar/josm.jar" "-C"
1446 "build/classes" ".")
1447 #t))
f041db86
JL
1448 (add-before 'build 'copy-revision
1449 (lambda _
1450 (mkdir-p "build/classes")
1451 (with-output-to-file "build/classes/REVISION"
1452 (lambda _
1453 (display
1454 (string-append "Revision: " ,version "\n"
1455 "Is-Local-Build: true\n"
1456 "Build-Date: 1970-01-01 00:00:00 +0000\n"))))
1457 #t))
1192ae94
CB
1458 (add-after 'install 'install-share-directories
1459 (lambda* (#:key outputs #:allow-other-keys)
1460 (let ((out (assoc-ref outputs "out"))
1461 (share-directories '("applications" "icons" "man" "menu"
1462 "metainfo" "mime" "pixmaps")))
1463 (for-each (lambda (directory)
1464 (copy-recursively (string-append
1465 "native/linux/tested/usr/share/"
1466 directory)
1467 (string-append
1468 out "/share/" directory)))
1469 share-directories))
1470 #t))
f041db86
JL
1471 (add-after 'install 'install-bin
1472 (lambda* (#:key outputs inputs #:allow-other-keys)
1473 (let* ((out (assoc-ref outputs "out"))
1474 (bin (string-append out "/bin")))
1475 (mkdir-p bin)
1476 (with-output-to-file (string-append bin "/josm")
1477 (lambda _
1478 (display
1479 (string-append "#!/bin/sh\n"
1480 (assoc-ref inputs "jdk") "/bin/java"
1481 " -cp " out "/share/java/josm.jar:"
1482 (getenv "CLASSPATH")
1483 " org.openstreetmap.josm.gui.MainApplication"))))
1484 (chmod (string-append bin "/josm") #o755))
1485 #t)))))
1486 (home-page "https://josm.openstreetmap.de")
1487 (synopsis "OSM editor")
1488 (description "JOSM is an extensible editor for OpenStreetMap (OSM). It
1489supports loading GPX tracks, background imagery and OSM data from local
9df26b02 1490sources as well as from online sources and allows editing the OSM data (nodes,
f041db86
JL
1491ways, and relations) and their metadata tags.")
1492 (license license:gpl2+)))
53c9b398
HG
1493
1494(define-public libmaxminddb
1495 (package
1496 (name "libmaxminddb")
07c0b3ce 1497 (version "1.4.3")
53c9b398
HG
1498 (source
1499 (origin
1500 (method url-fetch)
1501 (uri (string-append "https://github.com/maxmind/libmaxminddb"
1502 "/releases/download/" version "/"
1503 "/libmaxminddb-" version ".tar.gz"))
1504 (sha256
07c0b3ce 1505 (base32 "0fd4a4sxiiwzbd5h74wl1ijnb7xybjyybb7q41vdq3w8nk3zdzd5"))))
53c9b398
HG
1506 (build-system gnu-build-system)
1507 (arguments
2113ddb7
TGR
1508 `(#:make-flags
1509 (list ,(string-append "CC=" (cc-for-target)))))
53c9b398
HG
1510 (native-inputs
1511 `(("perl" ,perl)))
1512 (home-page "https://maxmind.github.io/libmaxminddb/")
1513 (synopsis "C library for the MaxMind DB file format")
1514 (description "The libmaxminddb library provides a C library for reading
1515MaxMind DB files, including the GeoIP2 databases from MaxMind. The MaxMind DB
1516format is a custom, but open, binary format designed to facilitate fast
1517lookups of IP addresses while allowing flexibility in the type of data
1518associated with an address.")
1519 (license license:asl2.0)))
b1414a81
HG
1520
1521(define-public python-maxminddb
1522 (package
1523 (name "python-maxminddb")
1524 (version "1.5.1")
1525 (source
1526 (origin
1527 (method url-fetch)
1528 (uri (pypi-uri "maxminddb" version))
1529 (sha256
1530 (base32
1531 "0y9giw81k4wdmpryr4k42w50z292mf364a6vs1vxf83ksc9ig6j4"))))
1532 (build-system python-build-system)
1533 (arguments
1534 `(#:tests? #f)) ;; Tests require a copy of the maxmind database
1535 (inputs
1536 `(("libmaxminddb" ,libmaxminddb)))
13b09bfc 1537 (home-page "https://www.maxmind.com/")
b1414a81
HG
1538 (synopsis "Reader for the MaxMind DB format")
1539 (description "MaxMind DB is a binary file format that stores data indexed
1540by IP address subnets (IPv4 or IPv6). This is a Python module for reading
1541MaxMind DB files.")
1542 (license license:asl2.0)))
0a71e34e
HG
1543
1544(define-public python-geoip2
1545 (package
1546 (name "python-geoip2")
1547 (version "2.9.0")
1548 (source
1549 (origin
1550 (method url-fetch)
1551 (uri (pypi-uri "geoip2" version))
1552 (sha256
1553 (base32
1554 "1w7cay5q6zawjzivqbwz5cqx1qbdjw6kbriccb7l46p7b39fkzzp"))))
1555 (build-system python-build-system)
1556 (arguments
1557 `(#:tests? #f)) ;; Tests require a copy of the maxmind database
1558 (inputs
1559 `(("python-maxminddb" ,python-maxminddb)
1560 ("python-requests" ,python-requests)))
13b09bfc 1561 (home-page "https://www.maxmind.com/")
0a71e34e
HG
1562 (synopsis "MaxMind GeoIP2 API")
1563 (description "Provides an API for the GeoIP2 web services and databases.
1564The API also works with MaxMind’s free GeoLite2 databases.")
1565 (license license:asl2.0)))
30fa6b16
GLV
1566
1567(define-public routino
1568 (package
1569 (name "routino")
e2492f58 1570 (version "3.3.3")
30fa6b16
GLV
1571 (source
1572 (origin
1573 (method url-fetch)
1574 (uri (string-append "http://www.routino.org/download/routino-"
1575 version ".tgz"))
1576 (sha256
e2492f58 1577 (base32 "1xa7l2bjn832nk6bc7b481nv8hd2gj41jwhg0d2qy10lqdvjpn5b"))))
30fa6b16
GLV
1578 (build-system gnu-build-system)
1579 (native-inputs
1580 `(("perl" ,perl)))
1581 (inputs
1582 `(("bzip2" ,bzip2)
1583 ("xz" ,xz)
1584 ("zlib" ,zlib)))
1585 (arguments
1586 `(#:test-target "test"
1587 #:phases
1588 (modify-phases %standard-phases
1589 (replace 'configure
1590 (lambda* (#:key outputs #:allow-other-keys)
1591 (substitute* "Makefile.conf"
1592 (("prefix=/usr/local")
1593 (string-append "prefix=" (assoc-ref outputs "out")))
1594 (("LDFLAGS_LDSO=-Wl,-R\\.")
1595 "LDFLAGS_LDSO=-Wl,-R$(libdir)")
1596 (("#CFLAGS\\+=-DUSE_XZ")
1597 "CFLAGS+=-DUSE_XZ")
1598 (("#LDFLAGS\\+=-llzma")
1599 "LDFLAGS+=-llzma"))
1600 #t)))))
1601 (synopsis "Routing application for OpenStreetMap data")
1602 (description
1603 "Routino is an application for finding a route between two points
1604using the dataset of topographical information collected by
1605@url{https://www.OpenStreetMap.org}.")
1606 (home-page "https://www.routino.org/")
1607 (license license:agpl3+)))
bccbeece
GLV
1608
1609(define-public qmapshack
1610 (package
1611 (name "qmapshack")
fc594863 1612 (version "1.15.2")
bccbeece
GLV
1613 (source
1614 (origin
1615 (method git-fetch)
1616 (uri (git-reference
b0e7b699 1617 (url "https://github.com/Maproom/qmapshack")
bccbeece
GLV
1618 (commit (string-append "V_" version))))
1619 (file-name (git-file-name name version))
1620 (sha256
fc594863 1621 (base32 "1l1j2axf94pdqwirwwhwy3y6k8v1aix78ifqbv6j8sv131h2j7y7"))))
bccbeece
GLV
1622 (build-system qt-build-system)
1623 (native-inputs
1624 `(("pkg-config" ,pkg-config)
1625 ("qttools" ,qttools)))
1626 (inputs
1627 `(("gdal" ,gdal)
1628 ("libjpeg-turbo" ,libjpeg-turbo)
1629 ("proj" ,proj)
1630 ("qtbase" ,qtbase)
1631 ("qtdeclarative" ,qtdeclarative)
1632 ("qtlocation" ,qtlocation)
1633 ("qtwebchannel" ,qtwebchannel)
1634 ("qtwebengine" ,qtwebengine)
1635 ("quazip" ,quazip)
1636 ("routino" ,routino)
3cfe76be 1637 ("sqlite" ,sqlite) ; See wrap phase
bccbeece
GLV
1638 ("zlib" ,zlib)))
1639 (arguments
1640 `(#:tests? #f
1641 #:phases
1642 (modify-phases %standard-phases
1643 (add-after 'unpack 'fix-cmake-modules
1644 (lambda* (#:key inputs #:allow-other-keys)
1645 (substitute* "CMakeLists.txt"
1646 (("find_package\\(Qt5PrintSupport REQUIRED\\)" all)
1647 (string-append all "\nfind_package(Qt5Positioning REQUIRED)")))
1648 (substitute* "cmake/Modules/FindROUTINO.cmake"
1649 (("/usr/local")
1650 (assoc-ref inputs "routino")))
1651 ;; The following fixes are included as patches in the sources
1652 ;; of QMapShack, but they are not applied by default, for
1653 ;; some reason...
1654 (invoke "patch" "-p1" "-i" "FindPROJ4.patch")
1655 (invoke "patch" "-p1" "-i" "FindQuaZip5.patch")
1656 #t))
1657 (add-after 'install 'wrap
5fcc5b38 1658 ;; The program fails to find the QtWebEngineProcess program,
bccbeece
GLV
1659 ;; so we set QTWEBENGINEPROCESS_PATH to help it.
1660 (lambda* (#:key inputs outputs #:allow-other-keys)
1661 (let ((bin (string-append (assoc-ref outputs "out") "/bin"))
1662 (qtwebengineprocess (string-append
1663 (assoc-ref inputs "qtwebengine")
5fcc5b38 1664 "/lib/qt5/libexec/QtWebEngineProcess")))
bccbeece
GLV
1665 (for-each (lambda (program)
1666 (wrap-program program
bccbeece
GLV
1667 `("QTWEBENGINEPROCESS_PATH" =
1668 (,qtwebengineprocess))))
1669 (find-files bin ".*")))
1670 #t)))))
1671 (synopsis "GPS mapping application")
1672 (description
1673 "QMapShack can be used to plan your next outdoor trip or to visualize and
1674archive all the GPS recordings of your past trips. It is the successor of the
1675QLandkarte GT application.")
1676 (home-page "https://github.com/Maproom/qmapshack/wiki")
1677 (license license:gpl3+)))
133de9ab
GLV
1678
1679(define-public readosm
1680 (package
1681 (name "readosm")
86f8472b 1682 (version "1.1.0a")
133de9ab
GLV
1683 (source
1684 (origin
1685 (method url-fetch)
1686 (uri (string-append "https://www.gaia-gis.it/gaia-sins/"
1687 "readosm-" version ".tar.gz"))
1688 (sha256
b7ab88bc 1689 (base32 "0igif2bxf4dr82glxz9gyx5mmni0r2dsnx9p9k6pxv3c4lfhaz6v"))))
133de9ab
GLV
1690 (build-system gnu-build-system)
1691 (inputs
1692 `(("expat" ,expat)
1693 ("zlib" ,zlib)))
1694 (synopsis "Data extractor for OpenStreetMap files")
1695 (description
1696 "ReadOSM is a library to extract valid data from within an OpenStreetMap
1697input file (in @code{.osm} or @code{.osm.pbf} format).")
1698 (home-page "https://www.gaia-gis.it/fossil/readosm/index")
1699 (license (list license:gpl2+
1700 license:lgpl2.1+
1701 license:mpl1.1))))
0ccc1385 1702
6be69452
SH
1703(define-public shapelib
1704 (package
1705 (name "shapelib")
1706 (version "1.5.0")
1707 (source
1708 (origin
1709 (method git-fetch)
1710 (uri (git-reference
1711 (url "https://github.com/OSGeo/shapelib")
1712 (commit (string-append "v" version))))
1713 (file-name (git-file-name name version))
1714 (sha256
1715 (base32 "1lzch0jf6yqhw391phhafzw4ghmiz98zkf698h4fmq109fa2vhqd"))))
1716 (build-system gnu-build-system)
1717 (native-inputs
1718 `(("autoconf" ,autoconf)
1719 ("automake" ,automake)
1720 ("libtool" ,libtool)))
1721 (home-page "http://shapelib.maptools.org/")
1722 (synopsis "Provides C library to write and update ESRI Shapefiles")
1723 (description
1724 "The Shapefile C Library provides the ability to write simple C programs
1725for reading, writing and updating (to a limited extent) ESRI Shapefiles, and the
1726associated attribute file (@file{.dbf}).")
1727 (license license:gpl2+)))
1728
0ccc1385
GLV
1729(define-public spatialite-tools
1730 (package
1731 (name "spatialite-tools")
f33e773c 1732 (version "5.0.1")
0ccc1385
GLV
1733 (source
1734 (origin
1735 (method url-fetch)
1736 (uri (string-append "https://www.gaia-gis.it/gaia-sins/"
1737 "spatialite-tools-" version ".tar.gz"))
1738 (sha256
f33e773c 1739 (base32 "070p6pg541wvwb28wkn7k0z1qdyirik2qc2jpj4pf0vzx02w414n"))))
0ccc1385
GLV
1740 (build-system gnu-build-system)
1741 (native-inputs
1742 `(("pkg-config" ,pkg-config)))
1743 (inputs
1744 `(("expat" ,expat)
1745 ("freexl" ,freexl)
1746 ("geos" ,geos)
b202c702 1747 ("librttopo" ,librttopo)
0ccc1385
GLV
1748 ("libspatialite" ,libspatialite)
1749 ("libxml2" ,libxml2)
b202c702 1750 ("minizip" ,minizip)
0ccc1385
GLV
1751 ("proj.4" ,proj.4)
1752 ("readosm" ,readosm)
1753 ("sqlite" ,sqlite)
1754 ("zlib" ,zlib)))
1755 (synopsis "Collection of command line tools for SpatiaLite")
1756 (description
1757 "@code{spatialite-tools} is a collection of Command Line Interface (CLI)
1758tools supporting SpatiaLite.")
1759 (home-page "https://www.gaia-gis.it/fossil/spatialite-tools/index")
1760 (license license:gpl3+)))
ec73c90e
GLV
1761
1762(define-public virtualpg
1763 (package
1764 (name "virtualpg")
b2a94e59 1765 (version "2.0.1")
ec73c90e
GLV
1766 (source
1767 (origin
1768 (method url-fetch)
1769 (uri (string-append "https://www.gaia-gis.it/gaia-sins/"
1770 "virtualpg-" version ".tar.gz"))
1771 (sha256
b2a94e59 1772 (base32 "12z0l7368r4116ljzg7nljy5hf425r11vxc540w79wlzikmynamy"))))
ec73c90e
GLV
1773 (build-system gnu-build-system)
1774 (inputs
1775 `(("postgresql" ,postgresql)
1776 ("sqlite" ,sqlite)))
1777 (synopsis "Allow SQLite/SpatiaLite to access PostgreSQL/PostGIS tables")
1778 (description
1779 "VirtualPG is a dynamic extension for the SQLite DBMS. It implements
1780the VirtualPostgres driver, allowing to directly exchange data between SQLite
1781and PostgreSQL; if SpatiaLite is available even PostGIS geometries can be
1782exchanged form one Spatial DBMS and the other.")
1783 (home-page "https://www.gaia-gis.it/fossil/virtualpg/index")
1784 (license (list license:gpl2+
1785 license:lgpl2.1+
1786 license:mpl1.1))))
7b1fb40d
GLV
1787
1788(define-public opencpn
1789 (package
1790 (name "opencpn")
1791 (version "5.0.0")
1792 (source
1793 (origin
1794 (method git-fetch)
1795 (uri (git-reference
b0e7b699 1796 (url "https://github.com/OpenCPN/OpenCPN")
7b1fb40d
GLV
1797 (commit (string-append "v" version))))
1798 (file-name (git-file-name name version))
1799 (sha256
1800 (base32 "1xv3h6svw9aay5ixpql231md3pf00qxvhg62z88daraf18hlkfja"))))
1801 (build-system cmake-build-system)
1802 (native-inputs
1803 `(("gettext" ,gettext-minimal)
1804 ("pkg-config" ,pkg-config)))
1805 (inputs
1806 `(("bzip2" ,bzip2)
1807 ("cairo" ,cairo)
1808 ("curl" ,curl)
1809 ("glu" ,glu)
1810 ("gtk+" ,gtk+)
1811 ("libarchive" ,libarchive)
1812 ("libelf" ,libelf)
1813 ("libexif" ,libexif)
1814 ("libsndfile" ,libsndfile)
1815 ("lz4" ,lz4)
1816 ("mesa" ,mesa)
1817 ("pango" ,pango)
1818 ("portaudio" ,portaudio)
1819 ("sqlite" ,sqlite)
1820 ("tinyxml" ,tinyxml)
1821 ("wxsvg" ,wxsvg)
1822 ("wxwidgets" ,wxwidgets)
1823 ("xz" ,xz)
1824 ("zlib" ,zlib)))
1825 (arguments
1826 `(#:configure-flags '("-DENABLE_PORTAUDIO=ON"
1827 "-DENABLE_SNDFILE=ON"
1828 "-DBUNDLE_TCDATA=ON"
1829 "-DBUNDLE_GSHHS=CRUDE")
1830 #:tests? #f ; No tests defined
1831 #:phases
1832 (modify-phases %standard-phases
1833 (add-after 'unpack 'fix-build
1834 (lambda _
1835 (substitute* "CMakeLists.txt"
1836 (("set\\(wxWidgets_CONFIG_OPTIONS.*--toolkit=gtk3" all)
1837 (string-append all " --libs all")))
1838 #t)))))
1839 (synopsis "Chart plotter and marine GPS navigation software")
1840 (description
1841 "OpenCPN is a chart plotter and marine navigation software designed to be
1842used at the helm station of your boat while underway. Chart a course and
1843track your position right from your laptop.")
1844 (home-page "https://opencpn.org/")
1845 (license (list license:asl2.0
1846 license:cc0
1847 license:bsd-2
1848 license:bsd-3
1849 license:expat
1850 license:gpl3+
1851 license:lgpl2.1+
1852 license:lgpl3+
1853 license:sgifreeb2.0
1854 license:zlib))))
9fce5914
GLV
1855
1856(define-public grass
13e5d3b1 1857 (let* ((version "7.8.5")
9fce5914
GLV
1858 (majorminor (string-join (list-head (string-split version #\.) 2) ""))
1859 (grassxx (string-append "grass" majorminor)))
1860 (package
1861 (name "grass")
1862 (version version)
1863 (source
1864 (origin
1865 (method url-fetch)
1866 (uri (string-append "https://grass.osgeo.org/" grassxx
1867 "/source/grass-" version ".tar.gz"))
1868 (sha256
13e5d3b1 1869 (base32 "0dzzhgcsrszzinvjir50nvzq873b8gsp0p9k8fvcrv14amkbnnd3"))))
9fce5914
GLV
1870 (build-system gnu-build-system)
1871 (inputs
1628d57b 1872 `(("bzip2" ,bzip2)
9fce5914
GLV
1873 ("cairo" ,cairo)
1874 ("fftw" ,fftw)
1875 ("freetype" ,freetype)
1876 ("gdal" ,gdal)
1877 ("geos" ,geos)
1878 ("glu" ,glu)
1879 ("lapack" ,lapack)
1880 ("libpng" ,libpng)
1881 ("libtiff" ,libtiff)
1882 ("mesa" ,mesa)
1883 ("mariadb-dev" ,mariadb "dev")
1884 ("mariadb-lib" ,mariadb "lib")
1885 ("netcdf" ,netcdf)
1886 ("openblas" ,openblas)
1887 ("perl" ,perl)
1888 ("postgresql" ,postgresql)
1889 ("proj.4" ,proj.4)
1890 ("python" ,python)
1891 ("python-dateutil" ,python-dateutil)
1892 ("python-numpy" ,python-numpy)
1893 ("python-wxpython" ,python-wxpython)
1894 ("readline" ,readline)
1895 ("sqlite" ,sqlite)
1896 ("wxwidgets" ,wxwidgets)
1897 ("zlib" ,zlib)
1898 ("zstd" ,zstd "lib")))
1899 (native-inputs
1900 `(("bash" ,bash-minimal)
1901 ("bison" ,bison)
1902 ("flex" ,flex)
1903 ("pkg-config" ,pkg-config)))
1904 (arguments
1905 `(#:tests? #f ; No tests
1906 #:modules ((guix build gnu-build-system)
1907 ((guix build python-build-system) #:prefix python:)
1908 (guix build utils))
1909 #:imported-modules (,@%gnu-build-system-modules
1910 (guix build python-build-system))
1911 #:phases
1912 (modify-phases %standard-phases
1913 (replace 'configure
1914 (lambda* (#:key inputs outputs #:allow-other-keys)
1915 (let ((shell (string-append (assoc-ref inputs "bash")
1916 "/bin/bash")))
1917 (setenv "SHELL" shell)
1918 (setenv "CONFIG_SHELL" shell)
1919 (setenv "LDFLAGS" (string-append "-Wl,-rpath -Wl,"
1920 (assoc-ref outputs "out")
1921 "/" ,grassxx "/lib")))
1922 (invoke "./configure"
1923 (string-append "--prefix="
1924 (assoc-ref outputs "out"))
1925 "--with-blas"
1926 "--with-bzlib"
1927 (string-append "--with-freetype-includes="
1928 (assoc-ref inputs "freetype")
1929 "/include/freetype2")
1930 (string-append "--with-freetype-libs="
1931 (assoc-ref inputs "freetype")
1932 "/lib")
1933 "--with-geos"
1934 "--with-lapack"
1935 "--with-mysql"
1936 (string-append "--with-mysql-includes="
1937 (assoc-ref inputs "mariadb-dev")
1938 "/include/mysql")
1939 (string-append "--with-mysql-libs="
1940 (assoc-ref inputs "mariadb-lib")
1941 "/lib")
1942 "--with-netcdf"
1943 "--with-postgres"
1944 (string-append "--with-proj-share="
1945 (assoc-ref inputs "proj.4")
1946 "/share/proj")
1947 "--with-pthread"
1948 "--with-readline"
1949 "--with-sqlite"
1950 "--with-wxwidgets")))
1951 (add-after 'install 'install-links
1952 (lambda* (#:key outputs #:allow-other-keys)
1953 ;; Put links for includes and libraries in the standard places.
1954 (let* ((out (assoc-ref outputs "out"))
1955 (dir (string-append out "/" ,grassxx)))
1956 (symlink (string-append dir "/include")
1957 (string-append out "/include"))
1958 (symlink (string-append dir "/lib")
1959 (string-append out "/lib")))
1960 #t))
6c03d15d
TGR
1961 (add-after 'install-links 'python:wrap
1962 (assoc-ref python:%standard-phases 'wrap))
1963 (add-after 'python:wrap 'wrap-with-python-interpreter
1964 (lambda* (#:key outputs #:allow-other-keys)
1965 (let ((out (assoc-ref outputs "out")))
1966 (wrap-program (string-append out "/bin/" ,grassxx)
1967 `("GRASS_PYTHON" = (,(which "python3"))))
1968 #t))))))
9fce5914
GLV
1969 (synopsis "GRASS Geographic Information System")
1970 (description
1971 "GRASS (Geographic Resources Analysis Support System), is a Geographic
1972Information System (GIS) software suite used for geospatial data management and
1973analysis, image processing, graphics and maps production, spatial modeling, and
1974visualization.")
1975 (home-page "https://grass.osgeo.org/")
1976 (license license:gpl2+))))
f7ac2fe1
GLV
1977
1978(define-public saga
1979 (package
1980 (name "saga")
1981 (version "7.6.2")
1982 (source
1983 (origin
1984 (method url-fetch)
1985 (uri (string-append "mirror://sourceforge/saga-gis/SAGA%20-%20"
1986 (version-major version) "/SAGA%20-%20" version
1987 "/saga-" version ".tar.gz"))
1988 (sha256
1989 (base32 "09j5magmayq2y620kqa490mfd1kpdp3lng2ifcgbrmssc079ybm0"))))
1990 (build-system gnu-build-system)
1991 (native-inputs
1992 `(("pkg-config" ,pkg-config)
1993 ("swig" ,swig)))
1994 (inputs
1995 `(("curl" ,curl)
1996 ("fftw" ,fftw)
1997 ("gdal" ,gdal)
1998 ("hdf5" ,hdf5)
1999 ("jasper" ,jasper)
2000 ("libharu" ,libharu)
2001 ("libtiff" ,libtiff)
2002 ("opencv" ,opencv)
2003 ("postgresql" ,postgresql)
2004 ("proj.4" ,proj.4)
2005 ("python" ,python)
2006 ("qhull" ,qhull)
2007 ("unixodbc" ,unixodbc)
2008 ("vigra" ,vigra)
2009 ("wxwidgets" ,wxwidgets)))
2010 (arguments
2011 '(#:configure-flags '("--enable-python")))
2012 (synopsis "System for Automated Geoscientific Analyses")
2013 (description
2014 "SAGA (System for Automated Geoscientific Analyses) is a Geographic
2015Information System (GIS) software. It has been designed for an easy and
2016effective implementation of spatial algorithms and it offers a comprehensive,
2017growing set of geoscientific methods.")
2018 (home-page "http://www.saga-gis.org")
2019 (license (list license:gpl2+ license:lgpl2.1+))))
151f3d41
GLV
2020
2021(define-public qgis
2022 (package
2023 (name "qgis")
4cd8bab7 2024 (version "3.16.3")
151f3d41
GLV
2025 (source
2026 (origin
2027 (method url-fetch)
2028 (uri (string-append "https://qgis.org/downloads/qgis-"
2029 version ".tar.bz2"))
2030 (sha256
4cd8bab7 2031 (base32 "012dv8dcg7w4lf6k37i41wialwhi0kpkxw2dnq19yqqk35632mzx"))))
151f3d41
GLV
2032 (build-system cmake-build-system)
2033 (arguments
2034 `(#:modules ((guix build cmake-build-system)
2035 ((guix build python-build-system) #:prefix python:)
2036 (guix build qt-utils)
2037 (guix build utils))
2038 #:imported-modules (,@%cmake-build-system-modules
2039 (guix build python-build-system)
2040 (guix build qt-utils))
2041 #:phases
2042 (modify-phases %standard-phases
2043 ;; Configure correct path to PyQt5 SIP directory
2044 (add-after 'unpack 'configure-pyqt5-sip-path
2045 (lambda* (#:key inputs #:allow-other-keys)
4cd8bab7
GLV
2046 (substitute* "cmake/FindPyQt5.py"
2047 (("sip_dir = cfg.default_sip_dir")
2048 (string-append "sip_dir = \""
2049 (assoc-ref inputs "python-pyqt+qscintilla")
2050 "/share/sip\"")))
2051 (substitute* (list "scripts/prepare_commit.sh"
2052 "scripts/qstringfixup.sh"
2053 "scripts/release.pl"
2054 "scripts/runtests_local_travis_config.sh"
151f3d41
GLV
2055 "scripts/sip_include.sh"
2056 "scripts/sipdiff"
2057 "scripts/sipify_all.sh"
2058 "scripts/spell_check/check_spelling.sh"
2059 "scripts/spell_check/spell_test.sh"
4cd8bab7 2060 "scripts/verify_indentation.sh"
151f3d41
GLV
2061 "tests/code_layout/test_banned_keywords.sh"
2062 "tests/code_layout/test_licenses.sh"
2063 "tests/code_layout/test_shellcheck.sh"
2064 "tests/code_layout/test_sip_include.sh"
4cd8bab7 2065 "tests/code_layout/test_sipfiles.sh"
151f3d41
GLV
2066 "tests/code_layout/test_sipify.sh")
2067 (("\\$\\(git rev-parse --show-toplevel\\)")
2068 (getcwd)))
2069 (substitute* "tests/code_layout/test_sip_include.sh"
2070 (("^REV=.*") "REV=currentrev\n"))
2071 #t))
2072 (replace 'check
2073 (lambda* (#:key inputs #:allow-other-keys)
2074 (setenv "HOME" "/tmp")
2075 (system (string-append (assoc-ref inputs "xorg-server")
2076 "/bin/Xvfb :1 &"))
2077 (setenv "DISPLAY" ":1")
2078 (setenv "TRAVIS" "true")
2079 (setenv "CTEST_OUTPUT_ON_FAILURE" "1")
2080 (invoke "ctest"
2081 "-E" (string-join
2082 '(;; Disable tests that require network access
2083 "qgis_filedownloader"
2084 ;; TODO: Find why the following tests fail
151f3d41
GLV
2085 "ProcessingGdalAlgorithmsRasterTest"
2086 "ProcessingGdalAlgorithmsVectorTest"
2087 "ProcessingGrass7AlgorithmsImageryTest"
2088 "ProcessingGrass7AlgorithmsRasterTest"
2089 "ProcessingGrass7AlgorithmsVectorTest"
2090 "ProcessingOtbAlgorithmsTest"
4cd8bab7
GLV
2091 "ProcessingQgisAlgorithmsTestPt1"
2092 "ProcessingQgisAlgorithmsTestPt2"
2093 "ProcessingQgisAlgorithmsTestPt3"
2094 "ProcessingQgisAlgorithmsTestPt4"
151f3d41 2095 "PyCoreAdittions"
151f3d41 2096 "PyQgsAnnotation"
4cd8bab7 2097 "PyQgsAppStartup"
151f3d41 2098 "PyQgsAuthenticationSystem"
4cd8bab7
GLV
2099 "PyQgsAuxiliaryStorage"
2100 "PyQgsDBManagerGpkg"
2101 "PyQgsDBManagerSpatialite"
2102 "PyQgsDataItem"
2103 "PyQgsFieldValidator"
151f3d41
GLV
2104 "PyQgsFileUtils"
2105 "PyQgsGeometryTest"
2106 "PyQgsImageCache"
4cd8bab7
GLV
2107 "PyQgsImportIntoPostGIS"
2108 "PyQgsLayerDependencies"
0213f094
GLV
2109 "PyQgsLayerMetadata"
2110 "PyQgsLayout"
151f3d41 2111 "PyQgsLayoutExporter"
4cd8bab7 2112 "PyQgsLayoutHtml"
151f3d41 2113 "PyQgsLayoutLegend"
4cd8bab7 2114 "PyQgsLayoutMapGrid"
151f3d41 2115 "PyQgsMapLayer"
4cd8bab7
GLV
2116 "PyQgsMetadataBase"
2117 "PyQgsOGRProvider"
151f3d41 2118 "PyQgsOGRProviderGpkg"
4cd8bab7 2119 "PyQgsOapifProvider"
151f3d41 2120 "PyQgsPalLabelingLayout"
4cd8bab7 2121 "PyQgsProject"
151f3d41 2122 "PyQgsProviderConnectionGpkg"
4cd8bab7
GLV
2123 "PyQgsProviderConnectionPostgres"
2124 "PyQgsProviderConnectionSpatialite"
2125 "PyQgsPythonProvider"
2126 "PyQgsRasterLayer"
2127 "PyQgsRulebasedRenderer"
2128 "PyQgsSelectiveMasking"
2129 "PyQgsSettings"
151f3d41 2130 "PyQgsShapefileProvider"
4cd8bab7 2131 "PyQgsSpatialiteProvider"
151f3d41 2132 "PyQgsSvgCache"
4cd8bab7 2133 "PyQgsSymbolExpressionVariables"
151f3d41 2134 "PyQgsTextRenderer"
151f3d41
GLV
2135 "PyQgsVectorFileWriter"
2136 "PyQgsVectorLayer"
2137 "PyQgsVectorLayerUtils"
2138 "PyQgsVirtualLayerProvider"
2139 "PyQgsWFSProvider"
4cd8bab7
GLV
2140 "qgis_arcgisrestutilstest"
2141 "qgis_authmanagertest"
2142 "qgis_compositionconvertertest"
2143 "qgis_coordinatereferencesystemtest"
2144 "qgis_expressiontest"
2145 "qgis_fontmarkertest"
151f3d41 2146 "qgis_geometrycheckstest"
4cd8bab7
GLV
2147 "qgis_geometrytest"
2148 "qgis_gpsinformationwidget"
2149 "qgis_grassprovidertest7"
2150 "qgis_imagecachetest"
2151 "qgis_labelingenginetest"
2152 "qgis_layouthtmltest"
2153 "qgis_layoutmanualtabletest"
2154 "qgis_layoutmapgridtest"
2155 "qgis_layoutmaptest"
2156 "qgis_layoutpicturetest"
2157 "qgis_layouttabletest"
2158 "qgis_mapdevicepixelratiotest"
2159 "qgis_maprendererjobtest"
2160 "qgis_ogrproviderguitest"
2161 "qgis_painteffecttest"
2162 "qgis_pallabelingtest"
2163 "qgis_processingtest"
2164 "qgis_rasterlayertest"
151f3d41 2165 "qgis_shellcheck"
151f3d41 2166 "qgis_sip_include"
4cd8bab7
GLV
2167 "qgis_sip_uptodate"
2168 "qgis_sipify"
2169 "qgis_styletest"
2170 "qgis_svgmarkertest"
2171 "qgis_taskmanagertest"
2172 "qgis_wcsprovidertest"
2173 "qgis_ziplayertest")
151f3d41
GLV
2174 "|"))))
2175 (add-after 'install 'wrap-python
2176 (assoc-ref python:%standard-phases 'wrap))
2177 (add-after 'wrap-python 'wrap-qt
2178 (lambda* (#:key outputs #:allow-other-keys)
2179 (wrap-qt-program (assoc-ref outputs "out") "qgis")
5ef1b175
GLV
2180 #t))
2181 (add-after 'wrap-qt 'wrap-gis
2182 (lambda* (#:key inputs outputs #:allow-other-keys)
5e686e0a
GLV
2183 ;; TODO: Find if there is a way to get SAGA to work.
2184 ;; Currently QGIS says "version of SAGA not supported".
2185 ;; Disable it for now.
5ef1b175 2186 (let* ((out (assoc-ref outputs "out"))
5e686e0a 2187 ;;(saga (string-append (assoc-ref inputs "saga") "/bin"))
5ef1b175
GLV
2188 (grass-version ,(package-version grass))
2189 (grass-majorminor (string-join
2190 (list-head
2191 (string-split grass-version #\.) 2)
2192 ""))
2193 (grass (string-append (assoc-ref inputs "grass")
2194 "/grass" grass-majorminor)))
2195 (wrap-program (string-append out "/bin/qgis")
5e686e0a 2196 ;;`("PATH" ":" prefix (,saga))
5ef1b175
GLV
2197 `("QGIS_PREFIX_PATH" = (,out))
2198 `("GISBASE" = (,grass))))
151f3d41
GLV
2199 #t)))))
2200 (inputs
2201 `(("exiv2" ,exiv2)
2202 ("expat" ,expat)
2203 ("gdal" ,gdal)
2204 ("geos" ,geos)
2205 ("gpsbabel" ,gpsbabel)
2206 ("grass" ,grass)
2207 ("gsl" ,gsl)
2208 ("hdf5" ,hdf5)
2209 ("libspatialindex" ,libspatialindex)
2210 ("libspatialite" ,libspatialite)
2211 ("libxml2" ,libxml2)
2212 ("libzip" ,libzip)
2213 ("netcdf" ,netcdf)
2214 ("postgresql" ,postgresql)
2215 ("proj" ,proj)
4cd8bab7 2216 ("protobuf" ,protobuf)
151f3d41
GLV
2217 ("python" ,python)
2218 ("python-chardet" ,python-chardet)
2219 ("python-dateutil" ,python-dateutil)
542dc0ee 2220 ("python-future" ,python-future)
151f3d41
GLV
2221 ("python-gdal" ,python-gdal)
2222 ("python-jinja2" ,python-jinja2)
2223 ("python-numpy" ,python-numpy)
2224 ("python-owslib" ,python-owslib)
2225 ("python-psycopg2" ,python-psycopg2)
2226 ("python-pygments" ,python-pygments)
2227 ("python-pyqt+qscintilla" ,python-pyqt+qscintilla)
2228 ("python-pytz" ,python-pytz)
2229 ("python-pyyaml" ,python-pyyaml)
2230 ("python-requests" ,python-requests)
2231 ("python-sip" ,python-sip)
2232 ("python-six" ,python-six)
2233 ("python-urllib3" ,python-urllib3)
2234 ("qca" ,qca)
2235 ("qscintilla" ,qscintilla)
2236 ("qtbase" ,qtbase)
2237 ("qtdeclarative" ,qtdeclarative)
2238 ("qtkeychain" ,qtkeychain)
2239 ("qtlocation" ,qtlocation)
2240 ("qtserialport" ,qtserialport)
2241 ("qtsvg" ,qtsvg)
2242 ("qtwebkit" ,qtwebkit)
2243 ("qwt" ,qwt)
5e686e0a 2244 ;;("saga" ,saga)
83e6b064 2245 ("sqlite" ,sqlite)))
151f3d41
GLV
2246 (native-inputs
2247 `(("bison" ,bison)
2248 ("flex" ,flex)
2249 ("perl" ,perl)
2250 ("perl-yaml-tiny" ,perl-yaml-tiny)
2251 ("pkg-config" ,pkg-config)
2252 ("python-mock" ,python-mock)
2253 ("python-nose2" ,python-nose2)
2254 ("qttools" ,qttools)
2255 ("shellcheck" ,shellcheck)
2256 ("xorg-server" ,xorg-server-for-tests)))
2257 (home-page "https://qgis.org")
2258 (synopsis "Geographical information system")
2259 (description "QGIS is an easy to use Geographical Information
2260System (GIS). It is a GIS data viewer and editor. QGIS supports a number of
2261raster and vector data formats, with new support easily added using the plugin
2262architecture.")
2263 (license
2264 (list
2265 license:asl1.1
2266 license:asl2.0
2267 license:bsd-2
2268 license:bsd-3
2269 license:boost1.0
2270 license:cc-by3.0
2271 license:cc-by4.0
2272 license:cc-by-sa3.0
2273 license:cc-by-sa4.0
2274 (license:fsdg-compatible "https://www.deviantart.com/elvensword")
2275 (license:fsf-free "file://debian/copyright" "Go Squared")
2276 license:expat
2277 license:fdl1.2+
2278 (license:fsf-free
2279 "https://www.deviantart.com/webgoddess/art/Reddish-Inspired-Gradients-42208824")
2280 (license:fsf-free
2281 "file://debian/copyright"
2282 "QT-Commercial or LGPL-2.1 with Digia Qt LGPL Exception 1.1 or GPL-3")
2283 license:gpl2
2284 license:gpl2+
2285 license:gpl3
2286 license:gpl3+
2287 license:isc
2288 license:lgpl2.0+
2289 license:lgpl2.1
2290 license:lgpl2.1+
2291 license:lgpl3
2292 (license:non-copyleft "file://debian/copyright" "BSD-like-gist")
2293 (license:non-copyleft "file://debian/copyright" "Jim Mossman Attribution")
2294 (license:non-copyleft
2295 "https://www.ncl.ucar.edu/Download/NCL_source_license.shtml"
2296 "NCL Source Code License")
2297 license:ogl-psi1.0
2298 license:opl1.0+
2299 license:public-domain
2300 license:qwt1.0))))
ff1233d8
EF
2301
2302(define-public python-geographiclib
2303 (package
2304 (name "python-geographiclib")
2305 (version "1.50")
2306 (source
2307 (origin
2308 (method url-fetch)
2309 (uri (pypi-uri "geographiclib" version))
2310 (sha256
2311 (base32
2312 "0cn6ap5fkh3mkfa57l5b44z3gvz7j6lpmc9rl4g2jny2gvp4dg8j"))))
2313 (build-system python-build-system)
2314 (home-page "https://geographiclib.sourceforge.io/1.50/python/")
2315 (synopsis "Python geodesic routines from GeographicLib")
2316 (description
2317 "This is a python implementation of the geodesic routines in GeographicLib.")
2318 (license license:expat)))
481b0923
EF
2319
2320(define-public python-geopy
2321 (package
2322 (name "python-geopy")
2323 (version "2.0.0")
2324 (source
2325 (origin
2326 (method url-fetch)
2327 (uri (pypi-uri "geopy" version))
2328 (sha256
2329 (base32
2330 "0fx0cv0kgbvynpmjgsvq2fpsyngd5idiscdn8pd5201f1ngii3mq"))))
2331 (build-system python-build-system)
2332 (propagated-inputs
2333 `(("python-geographiclib" ,python-geographiclib)))
2334 (native-inputs
2335 `(("python-async-generator" ,python-async-generator)
2336 ("python-coverage" ,python-coverage)
2337 ("python-flake8" ,python-flake8)
2338 ("python-isort" ,python-isort)
2339 ("python-pytest" ,python-pytest)
2340 ("python-pytest-aiohttp" ,python-pytest-aiohttp)
2341 ("python-readme-renderer" ,python-readme-renderer)
2342 ("python-pytz" ,python-pytz)))
2343 (home-page "https://github.com/geopy/geopy")
2344 (synopsis "Geocoding library for Python")
2345 (description "@code{geopy} is a Python client for several popular geocoding
2346web services. @code{geopy} makes it easy for Python developers to locate the
2347coordinates of addresses, cities, countries, and landmarks across the globe
2348using third-party geocoders and other data sources.")
2349 (license license:expat)))