Commit | Line | Data |
---|---|---|
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> |
08326f3d | 9 | ;;; Copyright © 2018, 2019, 2020, 2021 Julien Lepiller <julien@lepiller.eu> |
b30caf19 | 10 | ;;; Copyright © 2019, 2020, 2021, 2022 Guillaume Le Vaillant <glv@posteo.net> |
40b3e9da | 11 | ;;; Copyright © 2019, 2020, 2021 Efraim Flashner <efraim@flashner.co.il> |
769326cf | 12 | ;;; Copyright © 2019, 2021 Wiktor Żelazny <wzelazny@vurv.cz> |
7e24e1e5 | 13 | ;;; Copyright © 2019, 2020 Hartmut Goebel <h.goebel@crazy-compilers.com> |
9f1713f2 | 14 | ;;; Copyright © 2020, 2022 Marius Bakke <marius@gnu.org> |
1192ae94 | 15 | ;;; Copyright © 2020 Christopher Baines <mail@cbaines.net> |
87238a0b | 16 | ;;; Copyright © 2020, 2021, 2022 Felix Gruber <felgru@posteo.net> |
6be69452 | 17 | ;;; Copyright © 2021 Sharlatan Hellseher <sharlatanus@gmail.com> |
ac8fb4b9 | 18 | ;;; Copyright © 2021 Vinicius Monego <monego@posteo.net> |
c9f6fe2c | 19 | ;;; Copyright © 2021 Clément Lassieur <clement@lassieur.org> |
0b69ed70 | 20 | ;;; Copyright © 2021, 2022 Nikolay Korotkiy <sikmir@disroot.org> |
8a697e5c | 21 | ;;; Copyright © 2022 Roman Scherer <roman.scherer@burningswell.com> |
05c5807e | 22 | ;;; Copyright © 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com> |
03c1662e LF |
23 | ;;; |
24 | ;;; This file is part of GNU Guix. | |
25 | ;;; | |
26 | ;;; GNU Guix is free software; you can redistribute it and/or modify it | |
27 | ;;; under the terms of the GNU General Public License as published by | |
28 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
29 | ;;; your option) any later version. | |
30 | ;;; | |
31 | ;;; GNU Guix is distributed in the hope that it will be useful, but | |
32 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of | |
33 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
34 | ;;; GNU General Public License for more details. | |
35 | ;;; | |
36 | ;;; You should have received a copy of the GNU General Public License | |
37 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. | |
38 | ||
39 | (define-module (gnu packages geo) | |
6dd0e41d | 40 | #:use-module (guix build-system ant) |
8fa3451c | 41 | #:use-module (guix build-system cmake) |
03c1662e | 42 | #:use-module (guix build-system glib-or-gtk) |
065d0125 | 43 | #:use-module (guix build-system gnu) |
be7c64ba | 44 | #:use-module (guix build-system go) |
5339d2bb | 45 | #:use-module (guix build-system meson) |
f25e1e24 | 46 | #:use-module (guix build-system python) |
bccbeece | 47 | #:use-module (guix build-system qt) |
f2b005f6 | 48 | #:use-module (guix build-system scons) |
3d60f426 | 49 | #:use-module (guix build-system r) |
b4815e57 | 50 | #:use-module (guix gexp) |
03c1662e | 51 | #:use-module (guix download) |
d56af1ff | 52 | #:use-module (guix git-download) |
f041db86 | 53 | #:use-module (guix svn-download) |
065d0125 | 54 | #:use-module ((guix licenses) #:prefix license:) |
03c1662e LF |
55 | #:use-module (guix packages) |
56 | #:use-module (guix utils) | |
f9d32883 | 57 | #:use-module (gnu packages) |
9fce5914 | 58 | #:use-module (gnu packages algebra) |
0f7b8a7f | 59 | #:use-module (gnu packages astronomy) |
7b1fb40d | 60 | #:use-module (gnu packages audio) |
ed72a133 | 61 | #:use-module (gnu packages autotools) |
7b1fb40d | 62 | #:use-module (gnu packages backup) |
9fce5914 GLV |
63 | #:use-module (gnu packages bash) |
64 | #:use-module (gnu packages bison) | |
f2b005f6 | 65 | #:use-module (gnu packages boost) |
e13b18b2 | 66 | #:use-module (gnu packages build-tools) |
f25e1e24 | 67 | #:use-module (gnu packages check) |
f7a12f92 | 68 | #:use-module (gnu packages cmake) |
1a39141d | 69 | #:use-module (gnu packages compression) |
02c9a069 NK |
70 | #:use-module (gnu packages cpp) |
71 | #:use-module (gnu packages cups) | |
7b1fb40d | 72 | #:use-module (gnu packages curl) |
f2b005f6 | 73 | #:use-module (gnu packages databases) |
889e94e3 | 74 | #:use-module (gnu packages datastructures) |
7295171e | 75 | #:use-module (gnu packages docbook) |
889e94e3 | 76 | #:use-module (gnu packages documentation) |
7b1fb40d | 77 | #:use-module (gnu packages elf) |
9fce5914 | 78 | #:use-module (gnu packages flex) |
0f7b8a7f | 79 | #:use-module (gnu packages fonts) |
f2b005f6 | 80 | #:use-module (gnu packages fontutils) |
7b1fb40d GLV |
81 | #:use-module (gnu packages gettext) |
82 | #:use-module (gnu packages gl) | |
03c1662e LF |
83 | #:use-module (gnu packages glib) |
84 | #:use-module (gnu packages gnome) | |
151f3d41 | 85 | #:use-module (gnu packages gps) |
08326f3d | 86 | #:use-module (gnu packages graphics) |
03c1662e | 87 | #:use-module (gnu packages gtk) |
151f3d41 | 88 | #:use-module (gnu packages haskell-apps) |
eeac33a3 | 89 | #:use-module (gnu packages haskell-xyz) |
1a39141d | 90 | #:use-module (gnu packages image) |
f7ac2fe1 | 91 | #:use-module (gnu packages image-processing) |
f2b005f6 | 92 | #:use-module (gnu packages icu4c) |
f041db86 | 93 | #:use-module (gnu packages java) |
151f3d41 | 94 | #:use-module (gnu packages kde) |
2da3c84a GLV |
95 | #:use-module (gnu packages libusb) |
96 | #:use-module (gnu packages linux) | |
b0e2299a | 97 | #:use-module (gnu packages lua) |
6cde0737 | 98 | #:use-module (gnu packages maths) |
08326f3d | 99 | #:use-module (gnu packages multiprecision) |
996e45cb | 100 | #:use-module (gnu packages pcre) |
f7ac2fe1 | 101 | #:use-module (gnu packages pdf) |
2b9be1a6 | 102 | #:use-module (gnu packages perl) |
7b1fb40d | 103 | #:use-module (gnu packages photo) |
03c1662e | 104 | #:use-module (gnu packages pkg-config) |
0b69ed70 | 105 | #:use-module (gnu packages pretty-print) |
dc8621a2 | 106 | #:use-module (gnu packages protobuf) |
7b1fb40d | 107 | #:use-module (gnu packages pulseaudio) |
f2b005f6 | 108 | #:use-module (gnu packages python) |
3288d6bf | 109 | #:use-module (gnu packages python-build) |
481b0923 | 110 | #:use-module (gnu packages python-check) |
1c27038a | 111 | #:use-module (gnu packages python-crypto) |
5ab7fbad | 112 | #:use-module (gnu packages python-science) |
0a71e34e | 113 | #:use-module (gnu packages python-web) |
44d10b1f | 114 | #:use-module (gnu packages python-xyz) |
0f7b8a7f | 115 | #:use-module (gnu packages qt) |
9fce5914 | 116 | #:use-module (gnu packages readline) |
f7ac2fe1 | 117 | #:use-module (gnu packages swig) |
cd0322a3 | 118 | #:use-module (gnu packages sqlite) |
7ba300ee | 119 | #:use-module (gnu packages textutils) |
9fce5914 | 120 | #:use-module (gnu packages time) |
d4c8e8b6 | 121 | #:use-module (gnu packages tls) |
5b19776e | 122 | #:use-module (gnu packages web) |
03c1662e | 123 | #:use-module (gnu packages webkit) |
a2a53274 | 124 | #:use-module (gnu packages wxwidgets) |
151f3d41 GLV |
125 | #:use-module (gnu packages xml) |
126 | #:use-module (gnu packages xorg)) | |
03c1662e | 127 | |
b4815e57 | 128 | (define-public cdo |
129 | (package | |
130 | (name "cdo") | |
131 | (version "2.0.5") | |
132 | (source (origin | |
133 | (method url-fetch) | |
134 | (uri (string-append | |
135 | "https://code.mpimet.mpg.de/attachments/download/26823/cdo-" | |
136 | version ".tar.gz")) | |
137 | (sha256 | |
138 | (base32 | |
139 | "1khdbd5cmnn7qm6hcqg4md5wbq14fs6brrns8b3g18diqgqvpvpd")))) | |
140 | (build-system gnu-build-system) | |
141 | (arguments | |
142 | (list #:configure-flags | |
143 | #~(list (string-append "--with-netcdf=" | |
144 | #$(this-package-input "netcdf"))))) | |
145 | (inputs | |
146 | (list netcdf)) | |
147 | (native-inputs | |
148 | (list pkg-config)) | |
149 | (home-page "https://code.mpimet.mpg.de/projects/cdo") | |
150 | (synopsis "Climate data operators") | |
151 | (description "@acronym{CDO, Climate Data Operators} is a collection of command-line | |
152 | operators to manipulate and analyse climate and NWP model data. Supported | |
153 | data formats are GRIB 1/2, netCDF 3/4, SERVICE, EXTRA and IEG. There are more | |
154 | than 600 operators available.") | |
155 | (license license:bsd-3))) | |
156 | ||
7295171e RG |
157 | (define-public memphis |
158 | (package | |
159 | (name "memphis") | |
160 | (version "0.2.3") | |
161 | (source | |
162 | (origin | |
163 | (method git-fetch) | |
164 | (uri | |
165 | (git-reference | |
8ed4c468 | 166 | (url "https://github.com/jiuka/memphis") |
7295171e RG |
167 | (commit version))) |
168 | (file-name (git-file-name name version)) | |
169 | (sha256 | |
170 | (base32 "068c3943pgbpfjq44pmvn5fmkh005ak5aa67vvrq3fn487c6w54q")))) | |
171 | (build-system glib-or-gtk-build-system) | |
172 | (outputs '("out" "doc")) | |
173 | (arguments | |
174 | `(#:configure-flags | |
175 | (list | |
176 | "--disable-static" | |
177 | "--enable-gtk-doc" | |
178 | "--enable-vala" | |
179 | (string-append "--with-html-dir=" | |
180 | (assoc-ref %outputs "doc") | |
181 | "/share/gtk-doc/html")) | |
182 | #:phases | |
183 | (modify-phases %standard-phases | |
184 | (add-after 'unpack 'patch-autogen | |
185 | (lambda _ | |
186 | (substitute* "autogen.sh" | |
187 | (("\\./configure \"\\$@\"") | |
188 | "")) | |
189 | #t)) | |
190 | (add-after 'patch-autogen 'patch-docbook-xml | |
191 | (lambda* (#:key inputs #:allow-other-keys) | |
192 | (with-directory-excursion "docs/reference" | |
193 | (substitute* "libmemphis-docs.sgml" | |
194 | (("http://www.oasis-open.org/docbook/xml/4.3/") | |
195 | (string-append (assoc-ref inputs "docbook-xml") | |
196 | "/xml/dtd/docbook/")))) | |
197 | #t))))) | |
198 | (native-inputs | |
199 | `(("autoconf" ,autoconf) | |
200 | ("automake" ,automake) | |
201 | ("docbook-xml" ,docbook-xml-4.3) | |
202 | ("gobject-introspection" ,gobject-introspection) | |
9dea1618 | 203 | ("gtk-doc" ,gtk-doc/stable) |
7295171e RG |
204 | ("libtool" ,libtool) |
205 | ("pkg-config" ,pkg-config) | |
206 | ("python" ,python-wrapper) | |
207 | ("seed" ,seed) | |
208 | ("vala" ,vala))) | |
209 | (inputs | |
8394619b | 210 | (list expat glib)) |
7295171e | 211 | (propagated-inputs |
8394619b | 212 | (list cairo)) |
7295171e RG |
213 | (synopsis "Map-rendering for OpenSteetMap") |
214 | (description "Memphis is a map-rendering application and a library for | |
215 | OpenStreetMap written in C using eXpat, Cairo and GLib.") | |
216 | (home-page "http://trac.openstreetmap.ch/trac/memphis/") | |
217 | (license license:lgpl2.1+))) | |
218 | ||
a7607572 BH |
219 | (define-public geos |
220 | (package | |
221 | (name "geos") | |
94528ffa | 222 | (version "3.11.0") |
a7607572 BH |
223 | (source (origin |
224 | (method url-fetch) | |
225 | (uri (string-append "http://download.osgeo.org/geos/geos-" | |
226 | version | |
227 | ".tar.bz2")) | |
228 | (sha256 | |
229 | (base32 | |
94528ffa | 230 | "12l59pxawyizmc4wn20dvjn7aifqwkim4ysmc78h91mayjmqravr")))) |
c493ecfa | 231 | (build-system cmake-build-system) |
a7607572 BH |
232 | (arguments `(#:phases |
233 | (modify-phases %standard-phases | |
234 | (add-after | |
235 | 'unpack 'patch-test-shebangs | |
236 | (lambda _ | |
237 | (substitute* '("tests/xmltester/testrunner.sh" | |
238 | "tests/geostest/testrunner.sh") | |
c493ecfa | 239 | (("/bin/sh") (which "sh")))))))) |
a7607572 | 240 | (inputs |
8394619b | 241 | (list glib)) |
c493ecfa | 242 | (home-page "https://libgeos.org/") |
a7607572 BH |
243 | (synopsis "Geometry Engine for Geographic Information Systems") |
244 | (description | |
245 | "GEOS provides a spatial object model and fundamental geometric | |
246 | functions. It is a C++ port of the Java Topology Suite (JTS). As such, | |
247 | it aims to contain the complete functionality of JTS in C++. This | |
248 | includes all the OpenGIS Simple Features for SQL spatial predicate | |
249 | functions and spatial operators, as well as specific JTS enhanced | |
250 | topology functions.") | |
251 | (license (list license:lgpl2.1+ ; Main distribution. | |
252 | license:zlib ; tests/xmltester/tinyxml/* | |
253 | license:public-domain)))) ; include/geos/timeval.h | |
254 | ||
03c1662e LF |
255 | (define-public gnome-maps |
256 | (package | |
257 | (name "gnome-maps") | |
028b60a9 | 258 | (version "43.rc") ;for libsoup 3 support |
03c1662e LF |
259 | (source (origin |
260 | (method url-fetch) | |
261 | (uri (string-append "mirror://gnome/sources/" name "/" | |
d0b09122 | 262 | (version-major version) "/" |
03c1662e LF |
263 | name "-" version ".tar.xz")) |
264 | (sha256 | |
265 | (base32 | |
028b60a9 | 266 | "16a3j896fwxgnvrmx27jnrvhxzh3v22paaq87ad57yp8wkq946il")))) |
5339d2bb | 267 | (build-system meson-build-system) |
03c1662e | 268 | (arguments |
028b60a9 MC |
269 | (list |
270 | #:glib-or-gtk? #t | |
271 | #:phases | |
272 | #~(modify-phases %standard-phases | |
273 | (add-after 'unpack 'skip-gtk-update-icon-cache | |
274 | ;; Don't create 'icon-theme.cache'. | |
275 | (lambda _ | |
276 | (substitute* "meson_post_install.py" | |
277 | (("gtk-update-icon-cache") "true")))) | |
278 | (add-after 'unpack 'patch-dbus-service | |
279 | (lambda _ | |
280 | (substitute* "data/org.gnome.Maps.service.in" | |
281 | (("@pkgdatadir@/org.gnome.Maps") | |
282 | (string-append #$output "/bin/gnome-maps"))))) | |
283 | (add-after 'install 'wrap | |
284 | (lambda _ | |
285 | (wrap-program (string-append #$output "/bin/gnome-maps") | |
286 | `("GI_TYPELIB_PATH" ":" prefix (,(getenv "GI_TYPELIB_PATH"))))))))) | |
03c1662e | 287 | (native-inputs |
028b60a9 MC |
288 | (list gettext-minimal |
289 | `(,glib "bin") | |
290 | gobject-introspection | |
291 | pkg-config)) | |
03c1662e | 292 | (inputs |
028b60a9 MC |
293 | (list folks |
294 | evolution-data-server | |
295 | geoclue | |
296 | geocode-glib | |
297 | gfbgraph | |
298 | gjs | |
299 | glib | |
300 | glib-networking | |
301 | gnome-online-accounts | |
302 | gsettings-desktop-schemas | |
303 | gtk+ | |
304 | libadwaita | |
305 | libgee | |
306 | libgweather4 | |
307 | libhandy | |
308 | librsvg | |
309 | libsecret | |
310 | libshumate | |
311 | libsoup | |
312 | libxml2 | |
313 | pango-next ;TODO: remove when it's the default | |
314 | rest-next | |
315 | webkitgtk)) | |
03c1662e LF |
316 | (synopsis "Graphical map viewer and wayfinding program") |
317 | (description "GNOME Maps is a graphical map viewer. It uses map data from | |
318 | the OpenStreetMap project. It can provide directions for walking, bicycling, | |
319 | and driving.") | |
320 | (home-page "https://wiki.gnome.org/Apps/Maps") | |
065d0125 BH |
321 | (license license:gpl2+))) |
322 | ||
1a39141d BH |
323 | (define-public libgeotiff |
324 | (package | |
325 | (name "libgeotiff") | |
17a8a097 | 326 | (version "1.7.1") |
1a39141d BH |
327 | (source |
328 | (origin | |
329 | (method url-fetch) | |
330 | (uri (string-append "http://download.osgeo.org/geotiff/libgeotiff/libgeotiff-" | |
331 | version ".tar.gz")) | |
332 | (sha256 | |
17a8a097 | 333 | (base32 "1mjmgv48x51ppax5dnb6lq7z600czxll53bx6jbzqwd4m93i7aq5")) |
1a39141d BH |
334 | (modules '((guix build utils))) |
335 | (snippet | |
336 | '(begin | |
337 | ;; Remove .csv files, distributed from EPSG under a restricted | |
338 | ;; license. See LICENSE for full license text. | |
339 | (for-each delete-file (find-files "." "\\.csv$")) | |
6cbee49d | 340 | #t)))) |
1a39141d BH |
341 | (build-system gnu-build-system) |
342 | (inputs | |
8394619b | 343 | (list libjpeg-turbo libtiff zlib)) |
517c5538 | 344 | (propagated-inputs |
8394619b LC |
345 | (list ;; libgeotiff headers include proj headers, so ensure those are available. |
346 | proj)) | |
1a39141d BH |
347 | (arguments |
348 | `(#:configure-flags | |
1ecadbfe MB |
349 | (list "--disable-static" |
350 | "--with-zlib" "--with-jpeg" | |
1a39141d BH |
351 | (string-append "--with-libtiff=" (assoc-ref %build-inputs "libtiff"))))) |
352 | (synopsis "Library for handling GeoTIFF (geographic enabled TIFF)") | |
353 | (description "libgeotiff is a library on top of libtiff for reading and | |
354 | writing GeoTIFF information tags.") | |
355 | (home-page "https://trac.osgeo.org/geotiff/") | |
356 | ;; This is a mixture of various contributions under different licenses. | |
357 | ;; Note that the EPSG database is NOT "free to use" as the LICENSE file | |
358 | ;; states, as its commercial redistribution is restricted. Hence, we have | |
359 | ;; removed it from the package. | |
360 | (license (list license:public-domain | |
361 | license:x11 | |
362 | license:bsd-3 | |
363 | (license:non-copyleft "file://LICENSE" | |
364 | "See LICENSE in the distribution."))))) | |
365 | ||
3eb14c28 FG |
366 | (define-public librasterlite2 |
367 | (package | |
368 | (name "librasterlite2") | |
369 | (version "1.1.0-beta1") | |
370 | (source | |
371 | (origin | |
372 | (method url-fetch) | |
373 | (uri (string-append | |
374 | "https://www.gaia-gis.it/gaia-sins/librasterlite2-sources/" | |
375 | "librasterlite2-" version ".tar.gz")) | |
376 | (sha256 | |
377 | (base32 | |
378 | "1x24gqp4hsq97c31ncwxblab0x0863q8v1z42jil7lvsq3glqa7p")))) | |
379 | (build-system gnu-build-system) | |
380 | (native-inputs | |
8394619b | 381 | (list pkg-config)) |
3eb14c28 | 382 | (inputs |
8394619b LC |
383 | (list cairo |
384 | curl | |
385 | freetype | |
386 | freexl | |
387 | giflib | |
388 | libgeotiff | |
389 | libjpeg-turbo | |
390 | libpng | |
391 | librttopo | |
392 | libspatialite | |
393 | libtiff | |
394 | libwebp | |
395 | libxml2 | |
396 | lz4 | |
397 | minizip | |
398 | openjpeg | |
399 | proj | |
400 | sqlite | |
401 | `(,zstd "lib"))) | |
3eb14c28 FG |
402 | (synopsis "Library to work with huge raster coverages using a SpatiaLite") |
403 | (description | |
404 | "librasterlite2 is a library that stores and retrieves huge raster | |
405 | coverages using a SpatiaLite DBMS.") | |
406 | (home-page "https://www.gaia-gis.it/fossil/librasterlite2/index") | |
407 | ;; For the genuine librasterlite-sources holds: | |
408 | ;; Any of the licenses MPL1.1, GPL2+ or LGPL2.1+ may be picked. | |
409 | ;; Files under src/control_points are from GRASS | |
410 | ;; and are licensed under GPL2+ only. | |
411 | ;; src/md5.[ch]: Placed into the public domain by Alexander Peslyak. | |
412 | ;; The tools supporting the library (both rl2tool and wmslite) are | |
413 | ;; licensed under the GPL v3 (or any subsequent version) terms. | |
414 | ;; The test/*.svg files are placed in the public domain, except for | |
415 | ;; test/Car_Yellow.svg which is licensed under the Free Art License 1.3. | |
416 | (license (list license:gpl2+ | |
417 | license:gpl3+ | |
418 | license:lal1.3 | |
419 | license:lgpl2.1+ | |
420 | license:mpl1.1 | |
421 | license:public-domain)))) | |
422 | ||
a051bf40 FG |
423 | (define-public librttopo |
424 | (package | |
425 | (name "librttopo") | |
426 | (version "1.1.0") | |
427 | (source | |
428 | (origin | |
429 | (method git-fetch) | |
430 | (uri (git-reference | |
431 | (url "https://git.osgeo.org/gitea/rttopo/librttopo") | |
432 | (commit (string-append "librttopo-" version)))) | |
433 | (file-name (git-file-name name version)) | |
434 | (sha256 | |
435 | (base32 "0h7lzlkn9g4xky6h81ndy0aa6dxz8wb6rnl8v3987jy1i6pr072p")))) | |
436 | (build-system gnu-build-system) | |
437 | (arguments | |
438 | `(#:phases | |
439 | (modify-phases %standard-phases | |
440 | (add-after 'unpack 'patch-autogen | |
441 | (lambda _ | |
442 | (let ((autoconf (which "autoconf")) | |
443 | (autoheader (which "autoheader")) | |
444 | (aclocal (which "aclocal")) | |
445 | (automake (which "automake")) | |
446 | (libtoolize (which "libtoolize"))) | |
447 | (substitute* "autogen.sh" | |
448 | (("`which autoconf 2>/dev/null`") autoconf) | |
449 | (("`which autoheader 2>/dev/null`") autoheader) | |
450 | (("ACLOCAL=.*$") | |
451 | (string-append "ACLOCAL=" aclocal "\n")) | |
452 | (("AUTOMAKE=.*$") | |
453 | (string-append "AUTOMAKE=" automake "\n")) | |
454 | (("LIBTOOLIZE=.*$") | |
455 | (string-append "LIBTOOLIZE=" libtoolize "\n")))) | |
456 | #t))))) | |
457 | (native-inputs | |
8394619b | 458 | (list autoconf automake libtool pkg-config)) |
a051bf40 | 459 | (inputs |
8394619b | 460 | (list geos)) |
a051bf40 FG |
461 | (synopsis "Library to handle SQL/MM topologies") |
462 | (description | |
463 | "The RT Topology Library exposes an API to create and manage standard | |
464 | (ISO 13249 aka SQL/MM) topologies using user-provided data stores.") | |
465 | (home-page "https://git.osgeo.org/gitea/rttopo/librttopo") | |
466 | (license license:gpl2+))) | |
467 | ||
f6c507e1 BH |
468 | (define-public libspatialite |
469 | (package | |
470 | (name "libspatialite") | |
f33e773c | 471 | (version "5.0.1") |
f6c507e1 BH |
472 | (source |
473 | (origin | |
474 | (method url-fetch) | |
475 | (uri (string-append "https://www.gaia-gis.it/gaia-sins/libspatialite-" | |
476 | version ".tar.gz")) | |
477 | (sha256 | |
478 | (base32 | |
f33e773c | 479 | "164y82rw2lrp5glfc0rkn7n6xvx5dvlgmh7bb7815067251wkjzf")))) |
f6c507e1 BH |
480 | (build-system gnu-build-system) |
481 | (native-inputs | |
8394619b | 482 | (list pkg-config)) |
f6c507e1 | 483 | (inputs |
8394619b LC |
484 | (list freexl |
485 | geos | |
486 | librttopo | |
487 | libxml2 | |
488 | minizip | |
489 | proj | |
490 | sqlite)) | |
f6c507e1 | 491 | (arguments |
b202c702 FG |
492 | `(#:configure-flags |
493 | '("--enable-rttopo=yes") | |
351201aa GLV |
494 | ;; FIXME: Several tests fail with Proj 9. |
495 | #:tests? #f | |
b202c702 | 496 | #:phases |
f6c507e1 | 497 | (modify-phases %standard-phases |
cd5b2cf5 | 498 | ;; 1 test is failing, ignore it: |
f6c507e1 BH |
499 | (add-after 'unpack 'ignore-broken-tests |
500 | (lambda _ | |
501 | (substitute* '("test/Makefile.in") | |
cd5b2cf5 GLV |
502 | (("check_wms\\$\\(EXEEXT\\) check_drop_rename\\$\\(EXEEXT\\) ") |
503 | "check_wms$(EXEEXT) "))))))) | |
f6c507e1 BH |
504 | (synopsis "Extend SQLite to support Spatial SQL capabilities") |
505 | (description | |
506 | "SpatiaLite is a library intended to extend the SQLite core to support | |
507 | fully fledged Spatial SQL capabilities.") | |
508 | (home-page "https://www.gaia-gis.it/fossil/libspatialite/index") | |
509 | ;; For the genuine libspatialite-sources holds: | |
510 | ;; Any of the licenses MPL1.1, GPL2+ or LGPL2.1+ may be picked. | |
511 | ;; Files under src/control_points are from GRASS | |
512 | ;; and are licensed under GPL2+ only. | |
513 | ;; src/md5.[ch]: Placed into the public domain by Alexander Peslyak. | |
514 | (license (list license:gpl2+ | |
515 | license:lgpl2.1+ | |
516 | license:mpl1.1 | |
517 | license:public-domain)))) | |
518 | ||
3500d7ad AI |
519 | (define-public proj |
520 | (package | |
521 | (name "proj") | |
05c5807e | 522 | (version "9.1.0") |
3500d7ad AI |
523 | (source |
524 | (origin | |
525 | (method url-fetch) | |
526 | (uri (string-append "http://download.osgeo.org/proj/proj-" | |
527 | version ".tar.gz")) | |
528 | (sha256 | |
529 | (base32 | |
05c5807e | 530 | "0593vd9sac0c98j1f4rammd90d4xnhygbr6d49i8il6ajjdj7cl1")))) |
2a312105 | 531 | (build-system cmake-build-system) |
05c5807e MC |
532 | (native-inputs (list googletest pkg-config)) |
533 | (propagated-inputs (list curl libtiff sqlite)) ;required by proj.pc | |
3500d7ad AI |
534 | (home-page "https://proj.org/") |
535 | (synopsis "Coordinate transformation software") | |
536 | (description | |
537 | "Proj is a generic coordinate transformation software that transforms | |
2a312105 FG |
538 | geospatial coordinates from one @acronym{CRS, coordinate reference system} |
539 | to another. This includes cartographic projections as well as geodetic | |
540 | transformations. Proj includes command line applications for easy | |
541 | conversion of coordinates from text files or directly from user input. | |
542 | In addition, Proj also exposes an application programming interface that | |
543 | lets developers use the functionality of Proj in their own software.") | |
3500d7ad AI |
544 | (license (list license:expat |
545 | ;; src/projections/patterson.cpp | |
546 | license:asl2.0 | |
547 | ;; src/geodesic.*, src/tests/geodtest.cpp | |
548 | license:x11)))) | |
549 | ||
3eeb67c5 FG |
550 | ; This is the last version of proj that provides the old proj.4 API. |
551 | (define-public proj-7 | |
552 | (package (inherit proj) | |
553 | (version "7.2.1") | |
554 | (source | |
555 | (origin | |
556 | (method url-fetch) | |
557 | (uri (string-append "http://download.osgeo.org/proj/proj-" | |
558 | version ".tar.gz")) | |
559 | (sha256 | |
560 | (base32 | |
561 | "050apzdn0isxpsblys1shrl9ccli5vd32kgswlgx1imrbwpg915k")))) | |
562 | (arguments | |
563 | `(#:configure-flags '("-DUSE_EXTERNAL_GTEST=ON") | |
564 | #:phases | |
565 | (modify-phases %standard-phases | |
566 | (add-after 'unpack 'fix-version | |
567 | (lambda _ | |
568 | (substitute* "CMakeLists.txt" | |
569 | (("MAJOR 7 MINOR 2 PATCH 0") "MAJOR 7 MINOR 2 PATCH 1"))))))))) | |
570 | ||
0a92a64e MC |
571 | (define-public proj.4 |
572 | (package | |
573 | (name "proj.4") | |
574 | (version "4.9.3") | |
575 | (source (origin | |
576 | (method url-fetch) | |
577 | (uri (string-append "http://download.osgeo.org/proj/proj-" | |
578 | version ".tar.gz")) | |
579 | (sha256 | |
580 | (base32 | |
581 | "1xw5f427xk9p2nbsj04j6m5zyjlyd66sbvl2bkg8hd1kx8pm9139")))) | |
582 | (build-system gnu-build-system) | |
583 | (arguments | |
584 | `(#:phases | |
585 | (modify-phases %standard-phases | |
586 | (add-after 'unpack 'patch-test-paths | |
587 | (lambda _ | |
588 | (substitute* '("nad/test27" | |
589 | "nad/test83" | |
590 | "nad/testvarious" | |
591 | "nad/testdatumfile" | |
592 | "nad/testflaky" | |
593 | "nad/testIGNF") | |
594 | (("/bin/rm") (which "rm"))) | |
595 | #t)) | |
596 | ;; Precision problems on i686 and other platforms. See: | |
597 | ;; https://web.archive.org/web/20151006134301/http://trac.osgeo.org/proj/ticket/255 | |
598 | ;; Disable failing test. | |
599 | (add-after 'patch-test-paths 'ignore-failing-tests | |
600 | (lambda _ | |
601 | (substitute* '("nad/Makefile.in") | |
602 | (("\tPROJ_LIB.*" all) (string-append "#" all))) | |
603 | #t))))) | |
604 | (inputs | |
605 | (list glib)) | |
606 | (home-page "https://proj.org/") | |
607 | (synopsis "Cartographic Projections Library") | |
608 | (description | |
609 | "Proj.4 is a library for converting coordinates between cartographic | |
610 | projections.") | |
611 | (license (list license:expat | |
612 | ;; src/PJ_patterson.c | |
613 | license:asl2.0 | |
614 | ;; src/geodesic.c/h | |
615 | license:x11 | |
616 | ;; Embedded EPSG database. | |
617 | (license:non-copyleft "http://www.epsg.org/TermsOfUse") | |
618 | ;; cmake/* | |
619 | license:boost1.0)))) | |
620 | ||
1c27038a FG |
621 | (define-public python-pyproj |
622 | (package | |
623 | (name "python-pyproj") | |
b7376b31 | 624 | (version "3.3.1") |
1c27038a FG |
625 | (source |
626 | (origin | |
627 | (method url-fetch) | |
628 | (uri (pypi-uri "pyproj" version)) | |
629 | (sha256 | |
630 | (base32 | |
b7376b31 | 631 | "1gjg63irs44djyqbp9gg7s02d0y5i9cd1a83phyzp5fcj56y3n5k")))) |
1c27038a FG |
632 | (build-system python-build-system) |
633 | (arguments | |
634 | `(#:phases | |
635 | (modify-phases %standard-phases | |
636 | (add-after 'unpack 'set-proj-path | |
637 | (lambda* (#:key inputs #:allow-other-keys) | |
638 | (let ((proj (assoc-ref inputs "proj"))) | |
639 | (setenv "PROJ_DIR" proj) | |
640 | (substitute* "pyproj/datadir.py" | |
641 | (("(internal_datadir = ).*$" all var) | |
642 | (string-append var "Path(\"" proj "/share/proj\")\n"))))))))) | |
643 | (inputs | |
8394619b | 644 | (list proj)) |
1c27038a | 645 | (propagated-inputs |
8394619b | 646 | (list python-certifi)) |
1c27038a | 647 | (native-inputs |
8394619b LC |
648 | (list python-cython python-numpy python-pandas python-pytest |
649 | python-xarray)) | |
1c27038a FG |
650 | (home-page "https://github.com/pyproj4/pyproj") |
651 | (synopsis | |
652 | "Python interface to PROJ") | |
653 | (description | |
654 | "This package provides a Python interface to PROJ, a cartographic | |
655 | projections and coordinate transformations library.") | |
656 | (license license:expat))) | |
657 | ||
e159047e FG |
658 | (define-public python-fiona |
659 | (package | |
660 | (name "python-fiona") | |
661 | (version "1.8.20") | |
662 | (source | |
663 | (origin | |
664 | (method url-fetch) | |
665 | (uri (pypi-uri "Fiona" version)) | |
666 | (sha256 | |
667 | (base32 | |
668 | "0fql7i7dg1xpbadmk8d26dwp91v7faixxc4wq14zg0kvhp9041d7")))) | |
669 | (build-system python-build-system) | |
670 | (arguments | |
671 | `(#:phases | |
672 | (modify-phases %standard-phases | |
673 | (add-before 'check 'remove-local-fiona | |
674 | (lambda _ | |
675 | ; This would otherwise interfere with finding the installed | |
676 | ; fiona when running tests. | |
677 | (delete-file-recursively "fiona"))) | |
678 | (replace 'check | |
679 | (lambda* (#:key tests? inputs outputs #:allow-other-keys) | |
680 | (add-installed-pythonpath inputs outputs) | |
b30caf19 | 681 | (setenv "GDAL_ENABLE_DEPRECATED_DRIVER_GTM" "YES") |
e159047e | 682 | (when tests? |
b30caf19 GLV |
683 | (invoke "pytest" |
684 | "-m" "not network and not wheel" | |
685 | ;; FIXME: Find why the | |
686 | ;; test_no_append_driver_cannot_append[PCIDSK] | |
687 | ;; test is failing. | |
688 | "-k" "not test_no_append_driver_cannot_append"))))))) | |
e159047e | 689 | (inputs |
8394619b | 690 | (list gdal)) |
e159047e | 691 | (propagated-inputs |
8394619b LC |
692 | (list python-attrs |
693 | python-certifi | |
694 | python-click | |
695 | python-click-plugins | |
696 | python-cligj | |
697 | python-munch | |
698 | python-setuptools | |
699 | python-six | |
700 | python-pytz)) | |
e159047e | 701 | (native-inputs |
8394619b LC |
702 | (list gdal ; for gdal-config |
703 | python-boto3 | |
704 | python-cython | |
705 | python-pytest | |
706 | python-pytest-cov)) | |
e159047e FG |
707 | (home-page "https://github.com/Toblerity/Fiona") |
708 | (synopsis | |
709 | "Fiona reads and writes spatial data files") | |
710 | (description | |
711 | "Fiona is GDAL’s neat and nimble vector API for Python programmers. | |
712 | Fiona is designed to be simple and dependable. It focuses on reading | |
713 | and writing data in standard Python IO style and relies upon familiar | |
714 | Python types and protocols such as files, dictionaries, mappings, and | |
715 | iterators instead of classes specific to OGR. Fiona can read and write | |
716 | real-world data using multi-layered GIS formats and zipped virtual file | |
717 | systems and integrates readily with other Python GIS packages such as | |
718 | pyproj, Rtree, and Shapely.") | |
719 | (license license:bsd-3))) | |
720 | ||
371aa577 FG |
721 | (define-public python-geopandas |
722 | (package | |
723 | (name "python-geopandas") | |
f777c156 | 724 | (version "0.10.2") |
371aa577 FG |
725 | (source |
726 | (origin | |
727 | (method url-fetch) | |
728 | (uri (pypi-uri "geopandas" version)) | |
729 | (sha256 | |
730 | (base32 | |
f777c156 | 731 | "1nvim2i47ap1zdwy6kxydskf1cir5g4ij8124wvmrqij0zklggzg")))) |
371aa577 FG |
732 | (build-system python-build-system) |
733 | (arguments | |
734 | '(#:phases | |
735 | (modify-phases %standard-phases | |
736 | (replace 'check | |
737 | (lambda* (#:key tests? #:allow-other-keys) | |
738 | (when tests? | |
739 | (invoke "pytest" | |
09d0d0f6 FG |
740 | ; Disable tests that fail due to incompatibilities |
741 | ; with our pandas version. | |
742 | "-k" | |
743 | (string-append | |
744 | "not test_getitem_invalid" | |
745 | " and not test_value_counts" | |
746 | " and not test_setitem_invalid" | |
747 | " and not test_insert_invalid") | |
371aa577 FG |
748 | ; Disable tests that require internet access. |
749 | "-m" "not web"))))))) | |
750 | (propagated-inputs | |
8394619b | 751 | (list python-fiona python-pandas python-pyproj python-shapely)) |
371aa577 | 752 | (native-inputs |
8394619b | 753 | (list python-pytest)) |
371aa577 FG |
754 | (home-page "http://geopandas.org") |
755 | (synopsis "Geographic pandas extensions") | |
756 | (description "The goal of GeoPandas is to make working with | |
757 | geospatial data in Python easier. It combines the capabilities of | |
758 | Pandas and Shapely, providing geospatial operations in Pandas and a | |
759 | high-level interface to multiple geometries to Shapely. GeoPandas | |
760 | enables you to easily do operations in Python that would otherwise | |
761 | require a spatial database such as PostGIS.") | |
762 | (license license:bsd-3))) | |
763 | ||
e5c5ba74 FG |
764 | (define-public python-osmnx |
765 | (package | |
766 | (name "python-osmnx") | |
767 | (version "1.1.2") | |
768 | (source | |
769 | (origin | |
770 | ; Fetch from github as the pypi package is missing the tests dir. | |
771 | (method git-fetch) | |
772 | (uri (git-reference | |
773 | (url "https://github.com/gboeing/osmnx") | |
774 | (commit (string-append "v" version)))) | |
775 | (file-name (git-file-name name version)) | |
776 | (sha256 | |
777 | (base32 "1n8qjn184p5a2s3j6x6iyc1i7p3l3xnbqqxm6ajwgwv6j5fw1d5a")))) | |
778 | (build-system python-build-system) | |
779 | (arguments | |
780 | '(#:phases | |
781 | (modify-phases %standard-phases | |
782 | (replace 'check | |
783 | (lambda* (#:key tests? inputs outputs #:allow-other-keys) | |
784 | (when tests? | |
785 | (add-installed-pythonpath inputs outputs) | |
786 | ; TODO: Disable network tests | |
787 | (invoke "pytest" "tests" | |
788 | "-k" | |
789 | (string-append | |
790 | ;; The following tests require network access. | |
791 | "not test_geocode_to_gdf" | |
792 | " and not test_stats" | |
793 | " and not test_osm_xml" | |
794 | " and not test_elevation" | |
795 | " and not test_routing" | |
796 | " and not test_plots" | |
797 | " and not test_find_nearest" | |
798 | " and not test_api_endpoints" | |
799 | " and not test_graph_save_load" | |
800 | " and not test_graph_from_functions" | |
801 | " and not test_geometries")))))))) | |
802 | (propagated-inputs | |
803 | (list python-folium | |
804 | python-geopandas | |
805 | python-matplotlib | |
806 | python-networkx | |
807 | python-numpy | |
808 | python-pandas | |
809 | python-pyproj | |
810 | python-requests | |
811 | python-rtree | |
812 | python-shapely)) | |
813 | (native-inputs | |
814 | (list python-numpy python-pytest)) | |
815 | (home-page "https://github.com/gboeing/osmnx") | |
816 | (synopsis | |
817 | "Retrieve, model, analyze, and visualize OpenStreetMap street networks") | |
818 | (description | |
819 | "OSMnx is a Python library that lets you download geospatial data | |
820 | from OpenStreetMap and model, project, visualize, and analyze real-world | |
821 | street networks and any other geospatial geometries. You can download | |
822 | and model walkable, drivable, or bikeable urban networks with a single | |
823 | line of Python code then easily analyze and visualize them. You can | |
824 | just as easily download and work with other infrastructure types, | |
825 | amenities/points of interest, building footprints, elevation data, | |
826 | street bearings/orientations, and speed/travel time.") | |
827 | (license license:expat))) | |
828 | ||
f2b005f6 | 829 | (define-public mapnik |
f7a12f92 MC |
830 | ;; There hasn't been a release since early 2021, and it fails to build with |
831 | ;; Boost 1.77+. | |
832 | (let ((commit "81103491b467e17218140f50bc0bb9dc8c1f0317") | |
833 | (revision "0")) | |
834 | (package | |
835 | (name "mapnik") | |
836 | (version (git-version "3.1.0" revision commit)) | |
837 | (source | |
838 | (origin | |
839 | (method git-fetch) | |
840 | (uri (git-reference | |
841 | (url "https://github.com/mapnik/mapnik") | |
842 | (commit commit) | |
843 | ;; TODO: Un-bundle mapbox dependencies (not yet packaged). | |
844 | (recursive? #t))) ;for mapbox dependencies and test data | |
845 | (file-name (git-file-name name version)) | |
846 | (sha256 | |
847 | (base32 "094nam57bdd5nak88qy33z2p3kjahk3vk2nk56m5jkcr5d3hlnx2")))) | |
848 | (build-system qt-build-system) | |
849 | (arguments | |
850 | (list | |
851 | #:cmake cmake ;for FIND_PACKAGE_ARGS | |
852 | #:configure-flags | |
853 | #~(list (string-append "-DCMAKE_CXX_FLAGS=-I" | |
854 | #$(this-package-native-input "catch2") | |
855 | "/include/catch2")) | |
856 | #:phases | |
857 | #~(modify-phases %standard-phases | |
858 | (add-after 'unpack 'use-system-catch2 | |
859 | (lambda _ | |
860 | (substitute* "test/CMakeLists.txt" | |
861 | (("GIT_TAG.*v2.13.7" all) | |
862 | (string-append all "\n" | |
863 | " FIND_PACKAGE_ARGS NAMES Catch2")) | |
864 | (("^include.*Catch2_SOURCE_DIR.*contrib/Catch.cmake.*") | |
865 | "include(Catch)\n")))) | |
866 | (add-after 'unpack 'disable-problematic-tests | |
867 | (lambda _ | |
868 | ;; The 'ogr' test fails for unknown reasons. Mark it as | |
869 | ;; expected to fail (see: | |
870 | ;; https://github.com/mapnik/mapnik/issues/4329). | |
ca42eeeb | 871 | (substitute* "test/unit/datasource/ogr.cpp" |
f7a12f92 MC |
872 | (("TEST_CASE\\(\"ogr\"" all) |
873 | (string-append all ", \"[!shouldfail]\"")))))))) | |
874 | (native-inputs | |
b736af18 | 875 | (list catch2 |
f7a12f92 MC |
876 | pkg-config |
877 | postgresql)) | |
878 | (inputs | |
879 | (list boost | |
880 | cairo | |
881 | freetype | |
882 | gdal | |
883 | harfbuzz | |
884 | icu4c | |
885 | libjpeg-turbo | |
886 | libpng | |
887 | libtiff | |
888 | libwebp | |
889 | libxml2 | |
890 | proj | |
891 | sqlite | |
892 | zlib)) | |
893 | (home-page "https://mapnik.org/") | |
894 | (synopsis "Toolkit for developing mapping applications") | |
895 | (description "Mapnik is a toolkit for developing mapping applications. It | |
f2b005f6 AI |
896 | is basically a collection of geographic objects like maps, layers, |
897 | datasources, features, and geometries. At its core is a C++ shared library | |
898 | providing algorithms and patterns for spatial data access and visualization. | |
899 | The library does not rely on any specific windowing system and can be deployed | |
900 | to any server environment. It is intended to play fair in a multi-threaded | |
901 | environment and is aimed primarily, but not exclusively, at web-based | |
902 | development.") | |
f7a12f92 MC |
903 | (license (list license:lgpl2.1+ |
904 | ;; demo/viewer, demo/python/rundemo.py | |
905 | license:gpl2+ | |
906 | ;; deps/boost, deps/mapbox, deps/agg/include/agg_conv_offset.h | |
907 | license:boost1.0 | |
908 | ;; deps/mapnik/sparsehash | |
909 | license:bsd-3 | |
910 | ;; deps/agg | |
911 | (license:non-copyleft "file://deps/agg/copying")))))) | |
f2b005f6 | 912 | |
a2a53274 BH |
913 | (define-public spatialite-gui |
914 | (package | |
915 | (name "spatialite-gui") | |
9bd2478e | 916 | (version "2.1.0-beta1") |
a2a53274 BH |
917 | (source |
918 | (origin | |
919 | (method url-fetch) | |
9bd2478e FG |
920 | (uri (string-append |
921 | "https://www.gaia-gis.it/gaia-sins/spatialite-gui-sources/" | |
922 | "spatialite_gui-" version ".tar.gz")) | |
a2a53274 | 923 | (sha256 |
9bd2478e | 924 | (base32 "0cyv4cycl073p9lnnnglcb72qn71g8h9g5zn4gzw7swcy5nxjj5s")))) |
a2a53274 BH |
925 | (build-system gnu-build-system) |
926 | (native-inputs | |
8394619b | 927 | (list pkg-config)) |
a2a53274 | 928 | (inputs |
8394619b LC |
929 | (list curl |
930 | freexl | |
931 | geos | |
932 | giflib | |
933 | libjpeg-turbo | |
934 | librasterlite2 | |
935 | librttopo | |
936 | libspatialite | |
937 | libwebp | |
938 | libxlsxwriter | |
939 | libxml2 | |
940 | lz4 | |
941 | minizip | |
942 | openjpeg | |
943 | postgresql | |
944 | proj | |
945 | sqlite | |
946 | virtualpg | |
947 | wxwidgets | |
948 | `(,zstd "lib"))) | |
f7f67495 GLV |
949 | (arguments |
950 | `(#:phases (modify-phases %standard-phases | |
951 | (add-after 'unpack 'fix-gui | |
952 | (lambda _ | |
953 | ;; Fix for the GUI not showing up. | |
954 | (substitute* "Main.cpp" | |
955 | (("Hide\\(\\);") "")) | |
956 | #t))))) | |
a2a53274 BH |
957 | (synopsis "Graphical user interface for SpatiaLite") |
958 | (description "Spatialite-gui provides a visual interface for viewing and | |
959 | maintaining a spatialite database. You can easily see the structure of the | |
960 | tables and data contents using point and click functions, many of which | |
961 | construct common SQL queries, or craft your own SQL queries.") | |
962 | (home-page "https://www.gaia-gis.it/fossil/spatialite_gui/index") | |
963 | (license license:gpl3+))) | |
3d60f426 | 964 | |
996e45cb JL |
965 | (define-public gdal |
966 | (package | |
967 | (name "gdal") | |
800393bf | 968 | (version "3.5.1") |
996e45cb JL |
969 | (source (origin |
970 | (method url-fetch) | |
971 | (uri (string-append | |
972 | "http://download.osgeo.org/gdal/" version "/gdal-" | |
973 | version ".tar.gz")) | |
974 | (sha256 | |
975 | (base32 | |
800393bf | 976 | "1l93q7xf6qx9ck5axfkf3ygmvclxkvrjd8x00ckn7j0d0750ci3w")) |
996e45cb JL |
977 | (modules '((guix build utils))) |
978 | (snippet | |
979 | `(begin | |
980 | ;; TODO: frmts contains a lot more bundled code. | |
981 | (for-each delete-file-recursively | |
982 | ;; bundled code | |
983 | '("frmts/png/libpng" | |
984 | "frmts/gif/giflib" | |
985 | "frmts/jpeg/libjpeg" | |
986 | "frmts/jpeg/libjpeg12" | |
987 | "frmts/gtiff/libtiff" | |
988 | "frmts/gtiff/libgeotiff" | |
989 | "frmts/zlib" | |
990 | "ogr/ogrsf_frmts/geojson/libjson")))))) | |
6f909b37 | 991 | (build-system cmake-build-system) |
996e45cb JL |
992 | (arguments |
993 | `(#:tests? #f | |
994 | #:configure-flags | |
6f909b37 FG |
995 | (list "-DGDAL_USE_INTERNAL_LIBS=WHEN_NO_EXTERNAL" |
996 | "-DGDAL_USE_JPEG12_INTERNAL=OFF"))) | |
996e45cb | 997 | (inputs |
d4c8e8b6 RS |
998 | (list curl |
999 | expat | |
8394619b LC |
1000 | freexl |
1001 | geos | |
1002 | giflib | |
1003 | json-c | |
1004 | libgeotiff | |
1005 | libjpeg-turbo | |
1006 | libpng | |
1007 | libtiff | |
1008 | libwebp | |
1009 | netcdf | |
d4c8e8b6 | 1010 | openssl |
6f909b37 | 1011 | pcre2 |
8394619b LC |
1012 | postgresql ; libpq |
1013 | proj | |
6f909b37 | 1014 | qhull |
8394619b LC |
1015 | sqlite |
1016 | zlib)) | |
1ee58405 | 1017 | (native-inputs |
8394619b | 1018 | (list pkg-config)) |
e7453b3c | 1019 | (home-page "https://gdal.org/") |
996e45cb JL |
1020 | (synopsis "Raster and vector geospatial data format library") |
1021 | (description "GDAL is a translator library for raster and vector geospatial | |
1022 | data formats. As a library, it presents a single raster abstract data model | |
1023 | and single vector abstract data model to the calling application for all | |
1024 | supported formats. It also comes with a variety of useful command line | |
1025 | utilities for data translation and processing.") | |
1026 | (license (list | |
1027 | ;; general license | |
1028 | license:expat | |
1029 | ;; frmts/gtiff/tif_float.c, frmts/pcraster/libcsf, | |
1030 | ;; ogr/ogrsf_frmts/dxf/intronurbs.cpp, frmts/pdf/pdfdataset.cpp | |
1031 | ;; frmts/mrf/ | |
1032 | license:bsd-3 | |
1033 | ;; frmts/hdf4/hdf-eos/* | |
1034 | ;; similar to the expat license, but without guarantee exclusion | |
1035 | (license:non-copyleft "file://frmts/hdf4/hdf-eos/README") | |
1036 | ;; frmts/grib/degrib/ | |
1037 | license:public-domain ; with guarantee exclusion | |
1038 | ;; port/cpl_minizip* | |
1039 | ;; Some bsd-inspired license | |
1040 | (license:non-copyleft "file://port/LICENCE_minizip") | |
1041 | ;; alg/internal_libqhull | |
1042 | ;; Some 5-clause license | |
1043 | (license:non-copyleft "file://alg/internal_libqhull/COPYING.txt") | |
1044 | ;; frmts/mrf/libLERC | |
1045 | license:asl2.0)))) | |
2b9be1a6 | 1046 | |
a18a27be SB |
1047 | (define-public python-gdal |
1048 | (package (inherit gdal) | |
1049 | (name "python-gdal") | |
1050 | (build-system python-build-system) | |
1051 | (arguments | |
1052 | '(#:tests? #f ; no tests | |
1053 | #:phases | |
1054 | (modify-phases %standard-phases | |
1055 | (add-before 'build 'chdir | |
1056 | (lambda _ | |
1057 | (chdir "swig/python") | |
1058 | #t))))) | |
1059 | (native-inputs '()) | |
1060 | (propagated-inputs | |
8394619b | 1061 | (list python-numpy)) |
a18a27be | 1062 | (inputs |
8394619b | 1063 | (list gdal)) |
a18a27be SB |
1064 | (synopsis "GDAL (Geospatial Data Abstraction Library) python bindings"))) |
1065 | ||
ac8fb4b9 VM |
1066 | (define-public python-pyshp |
1067 | (package | |
1068 | (name "python-pyshp") | |
1069 | (version "2.1.3") | |
1070 | (source | |
1071 | (origin | |
1072 | (method git-fetch) | |
1073 | (uri (git-reference | |
1074 | (url "https://github.com/GeospatialPython/pyshp") | |
1075 | (commit version))) | |
1076 | (file-name (git-file-name name version)) | |
1077 | (sha256 | |
1078 | (base32 "0jsraqzq82pw19wvx84x7w5cs8agr44a9b5y0jjw540wim4xa73r")))) | |
1079 | (build-system python-build-system) | |
1080 | (arguments | |
1081 | `(#:phases | |
1082 | (modify-phases %standard-phases | |
1083 | (replace 'check | |
1084 | (lambda* (#:key tests? #:allow-other-keys) | |
1085 | (when tests? | |
1086 | ;; This is the only test file. | |
1087 | (invoke "python" "-m" "pytest" "test_shapefile.py"))))))) | |
1088 | (native-inputs | |
8394619b | 1089 | (list python-pytest python-pytest-runner)) |
ac8fb4b9 VM |
1090 | (home-page "https://github.com/GeospatialPython/pyshp") |
1091 | (synopsis "Read/write support for ESRI Shapefile format") | |
1092 | (description | |
1093 | "The Python Shapefile Library (PyShp) reads and writes ESRI Shapefiles.") | |
1094 | (license license:expat))) | |
1095 | ||
5ab7fbad VM |
1096 | (define-public python-cartopy |
1097 | (package | |
1098 | (name "python-cartopy") | |
1099 | ;; This is a post-release fix that adds build_ext to setup.py. | |
8bb5bcf6 | 1100 | (version "0.20.3") |
5ab7fbad VM |
1101 | (source |
1102 | (origin | |
1103 | (method url-fetch) | |
1104 | (uri (pypi-uri "Cartopy" version)) | |
1105 | (sha256 | |
8bb5bcf6 | 1106 | (base32 "01lhnkhw22jp6hnrs5qvgkq4fqcni2sx7ydiyv8w8xxx5wpglq0d")))) |
5ab7fbad VM |
1107 | (build-system python-build-system) |
1108 | (arguments | |
1109 | `(#:phases | |
1110 | (modify-phases %standard-phases | |
1111 | (replace 'check | |
1112 | (lambda* (#:key inputs outputs tests? #:allow-other-keys) | |
1113 | (when tests? | |
1114 | (add-installed-pythonpath inputs outputs) | |
1115 | (invoke "python" "-m" "pytest" "--pyargs" "cartopy" | |
1116 | ;; These tests require online data. | |
1117 | "-m" "not natural_earth and not network" | |
1118 | ;; This one too but it's not marked as such. | |
1119 | "-k" "not test_gridliner_labels_bbox_style"))))))) | |
1120 | (propagated-inputs | |
8394619b LC |
1121 | (list python-matplotlib |
1122 | python-numpy | |
1123 | python-pykdtree | |
8bb5bcf6 | 1124 | python-pyproj |
8394619b LC |
1125 | python-pyshp |
1126 | python-scipy | |
1127 | python-shapely)) | |
5ab7fbad | 1128 | (inputs |
8bb5bcf6 FG |
1129 | (list geos |
1130 | ;; cartopy's setup.py looks for the proj executable. | |
1131 | ;; Not sure if it actually makes use of it since it | |
1132 | ;; probably uses proj only through pyproj. | |
1133 | proj)) | |
5ab7fbad | 1134 | (native-inputs |
8394619b | 1135 | (list python-cython python-flufl-lock python-pytest)) |
5ab7fbad VM |
1136 | (home-page "https://scitools.org.uk/cartopy/docs/latest/") |
1137 | (synopsis "Cartographic library for visualisation") | |
1138 | (description | |
1139 | "Cartopy is a Python package designed to make drawing maps for data | |
1140 | analysis and visualisation easy. | |
1141 | ||
1142 | It features: | |
1143 | ||
1144 | @itemize | |
1145 | @item object oriented projection definitions | |
1146 | @item point, line, polygon and image transformations between projections | |
1147 | @item integration to expose advanced mapping in Matplotlib with a simple and | |
1148 | intuitive interface | |
1149 | @item powerful vector data handling by integrating shapefile reading with | |
1150 | Shapely capabilities | |
1151 | @end itemize") | |
1152 | (license license:lgpl3+))) | |
1153 | ||
2b9be1a6 JL |
1154 | (define-public postgis |
1155 | (package | |
1156 | (name "postgis") | |
87238a0b | 1157 | (version "3.2.1") |
2b9be1a6 JL |
1158 | (source (origin |
1159 | (method url-fetch) | |
1160 | (uri (string-append "https://download.osgeo.org/postgis/source/postgis-" | |
1161 | version ".tar.gz")) | |
1162 | (sha256 | |
1163 | (base32 | |
87238a0b | 1164 | "0gl9d6xy2an82ldb9sixz5blyngjryq8m3509fr38ffawvfniazv")))) |
2b9be1a6 JL |
1165 | (build-system gnu-build-system) |
1166 | (arguments | |
1167 | `(#:tests? #f | |
1168 | #:make-flags | |
1169 | (list (string-append "datadir=" (assoc-ref %outputs "out") "/share") | |
1170 | (string-append "docdir="(assoc-ref %outputs "out") "/share/doc") | |
1171 | (string-append "pkglibdir="(assoc-ref %outputs "out") "/lib") | |
1172 | (string-append "bindir=" (assoc-ref %outputs "out") "/bin")) | |
1173 | #:phases | |
1174 | (modify-phases %standard-phases | |
1175 | (add-before 'build 'fix-install-path | |
1176 | (lambda* (#:key outputs #:allow-other-keys) | |
1177 | (substitute* '("raster/loader/Makefile" "raster/scripts/python/Makefile") | |
1178 | (("\\$\\(DESTDIR\\)\\$\\(PGSQL_BINDIR\\)") | |
1179 | (string-append (assoc-ref outputs "out") "/bin")))))))) | |
1180 | (inputs | |
2495582e FG |
1181 | (list gdal |
1182 | geos | |
1183 | giflib | |
1184 | json-c | |
1185 | libjpeg-turbo | |
1186 | libxml2 | |
f853f075 | 1187 | openssl |
2495582e FG |
1188 | pcre |
1189 | postgresql | |
1190 | protobuf-c | |
1191 | proj)) | |
2b9be1a6 | 1192 | (native-inputs |
8394619b | 1193 | (list perl pkg-config)) |
2b9be1a6 JL |
1194 | (home-page "https://postgis.net") |
1195 | (synopsis "Spatial database extender for PostgreSQL") | |
1196 | (description "PostGIS is a spatial database extender for PostgreSQL | |
1197 | object-relational database. It adds support for geographic objects allowing | |
8e3f06c9 JL |
1198 | location queries to be run in SQL. This package provides a PostgreSQL |
1199 | extension.") | |
2b9be1a6 JL |
1200 | (license (list |
1201 | ;; General license | |
1202 | license:gpl2+ | |
1203 | ;; loader/dbfopen, safileio.*, shapefil.h, shpopen.c | |
1204 | license:expat | |
1205 | ;; loader/getopt.* | |
1206 | license:public-domain | |
1207 | ;; doc/xsl | |
1208 | license:bsd-3 ; files only say "BSD" | |
1209 | ;; doc | |
1210 | license:cc-by-sa3.0)))) | |
be7c64ba JL |
1211 | |
1212 | (define-public tegola | |
1213 | (package | |
1214 | (name "tegola") | |
1215 | (version "0.7.0") | |
1216 | (source (origin | |
1217 | (method url-fetch) | |
1218 | (uri (string-append | |
1219 | "https://github.com/go-spatial/tegola/archive/v" | |
1220 | version ".tar.gz")) | |
1221 | (file-name (string-append name "-" version ".tar.gz")) | |
1222 | (sha256 | |
1223 | (base32 | |
1224 | "09vnzxfn0r70kmd776kcdfqxhzdj11syxa0b27z4ci1k367v7viw")))) | |
1225 | (build-system go-build-system) | |
1226 | (arguments | |
1227 | `(#:import-path "github.com/go-spatial/tegola/cmd/tegola" | |
d9ef50b3 | 1228 | #:unpack-path "github.com/go-spatial/tegola" |
be7c64ba JL |
1229 | #:phases |
1230 | (modify-phases %standard-phases | |
1231 | (add-before 'build 'set-version | |
1232 | (lambda _ | |
d9ef50b3 | 1233 | (with-directory-excursion "src/github.com/go-spatial/tegola" |
be7c64ba JL |
1234 | (substitute* '("cmd/tegola/cmd/root.go" |
1235 | "cmd/tegola_lambda/main.go") | |
1236 | (("version not set") ,version))) | |
be7c64ba | 1237 | #t))))) |
0d49a4bb | 1238 | (home-page "https://tegola.io") |
be7c64ba JL |
1239 | (synopsis "Vector tile server for maps") |
1240 | (description "Tegola is a free vector tile server written in Go. Tegola | |
1241 | takes geospatial data and slices it into vector tiles that can be efficiently | |
1242 | delivered to any client.") | |
1243 | (license (list | |
1244 | license:expat | |
1245 | ;; Some packages in vendor have other licenses | |
1246 | license:asl2.0 | |
1247 | license:bsd-2 | |
1248 | license:bsd-3 | |
1249 | license:wtfpl2)))) | |
3bd7611e JL |
1250 | |
1251 | (define-public imposm3 | |
1252 | (package | |
1253 | (name "imposm3") | |
c3684310 | 1254 | (version "0.11.1") |
3bd7611e JL |
1255 | (source |
1256 | (origin | |
1257 | (method url-fetch) | |
1258 | (uri (string-append "https://github.com/omniscale/imposm3/archive/v" | |
1259 | version ".tar.gz")) | |
1260 | (file-name (string-append name "-" version ".tar.gz")) | |
1261 | (sha256 | |
1262 | (base32 | |
c3684310 | 1263 | "1w7b221z5k9254zn01imycxkyw62xigqizhwvrgxqmq1m9r5410l")))) |
3bd7611e JL |
1264 | (build-system go-build-system) |
1265 | (arguments | |
1266 | `(#:import-path "github.com/omniscale/imposm3/cmd/imposm" | |
bdc0c20c | 1267 | #:unpack-path "github.com/omniscale/imposm3" |
3bd7611e JL |
1268 | #:phases |
1269 | (modify-phases %standard-phases | |
3bd7611e JL |
1270 | (add-before 'build 'set-version |
1271 | (lambda _ | |
1272 | (substitute* "src/github.com/omniscale/imposm3/version.go" | |
1273 | (("0.0.0-dev") ,version)) | |
1274 | #t))))) | |
1275 | (inputs | |
8394619b | 1276 | (list geos leveldb)) |
3bd7611e JL |
1277 | (home-page "https://imposm.org/") |
1278 | (synopsis "OpenStreetMap importer for PostGIS") | |
1279 | (description "Imposm is an importer for OpenStreetMap data. It reads PBF | |
1280 | files and imports the data into PostgreSQL/PostGIS databases. It is designed | |
1281 | to create databases that are optimized for rendering/tile/map-services.") | |
1282 | (license (list | |
1283 | license:asl2.0 | |
1284 | ;; Some dependencies in vendor have different licenses | |
1285 | license:expat | |
1286 | license:bsd-2 | |
1287 | license:bsd-3)))) | |
8fa3451c | 1288 | |
889e94e3 JL |
1289 | (define-public libosmium |
1290 | (package | |
1291 | (name "libosmium") | |
30daa0d9 | 1292 | (version "2.18.0") |
889e94e3 | 1293 | (source |
f4daf250 TGR |
1294 | (origin |
1295 | (method git-fetch) | |
1296 | (uri (git-reference | |
b0e7b699 | 1297 | (url "https://github.com/osmcode/libosmium") |
f4daf250 TGR |
1298 | (commit (string-append "v" version)))) |
1299 | (file-name (git-file-name name version)) | |
1300 | (sha256 | |
30daa0d9 | 1301 | (base32 "0fh57mpii1ksacwfx5rz213j896aklib53jbybld2i517q2mmxr0")))) |
889e94e3 JL |
1302 | (build-system cmake-build-system) |
1303 | (propagated-inputs | |
8394619b LC |
1304 | (list boost |
1305 | bzip2 | |
1306 | expat | |
1307 | gdal | |
1308 | geos | |
aa4b555e | 1309 | lz4 |
8394619b LC |
1310 | proj |
1311 | protozero | |
1312 | sparsehash | |
1313 | utfcpp | |
1314 | zlib)) | |
889e94e3 | 1315 | (native-inputs |
8394619b | 1316 | (list doxygen)) |
889e94e3 JL |
1317 | (home-page "https://osmcode.org/libosmium/") |
1318 | (synopsis "C++ library for working with OpenStreetMap data") | |
1319 | (description "Libosmium is a fast and flexible C++ library for working with | |
1320 | OpenStreetMap data.") | |
1321 | (license license:boost1.0))) | |
b0e2299a | 1322 | |
eeac33a3 NK |
1323 | (define-public osmium-tool |
1324 | (package | |
1325 | (name "osmium-tool") | |
1326 | (version "1.14.0") | |
1327 | (source | |
1328 | (origin | |
1329 | (method git-fetch) | |
1330 | (uri (git-reference | |
1331 | (url "https://github.com/osmcode/osmium-tool") | |
1332 | (commit (string-append "v" version)))) | |
1333 | (file-name (git-file-name name version)) | |
1334 | (sha256 | |
1335 | (base32 "0zgyqyrs89vch0qnkh9m5xq079sr2wmydy5zz4l8xbysbjf6xry5")) | |
1336 | (modules '((guix build utils))) | |
1337 | (snippet | |
1338 | ;; Remove bundled libraries. | |
1339 | '(delete-file-recursively "include/rapidjson")))) | |
1340 | (build-system cmake-build-system) | |
1341 | (inputs | |
1342 | (list libosmium | |
1343 | rapidjson)) | |
1344 | (native-inputs | |
1345 | (list pandoc)) | |
1346 | (home-page "https://osmcode.org/osmium-tool/") | |
1347 | (synopsis "Osmium command-line tool") | |
1348 | (description "Command line tool for working with OpenStreetMap data | |
1349 | based on the Osmium library.") | |
1350 | (license license:gpl3+))) | |
1351 | ||
b0e2299a JL |
1352 | (define-public osm2pgsql |
1353 | (package | |
1354 | (name "osm2pgsql") | |
0b69ed70 | 1355 | (version "1.7.0") |
82b47fd9 TGR |
1356 | (source |
1357 | (origin | |
1358 | (method git-fetch) | |
1359 | (uri (git-reference | |
b0e7b699 | 1360 | (url "https://github.com/openstreetmap/osm2pgsql") |
82b47fd9 TGR |
1361 | (commit version))) |
1362 | (file-name (git-file-name name version)) | |
1363 | (sha256 | |
0b69ed70 | 1364 | (base32 "15fxr4xq7siy237763l7nswx7v0swr3qzs2h3zkjzgvajw4p6qii")) |
82b47fd9 TGR |
1365 | (modules '((guix build utils))) |
1366 | (snippet | |
0b69ed70 NK |
1367 | ;; Remove bundled libraries. |
1368 | '(delete-file-recursively "contrib")))) | |
b0e2299a JL |
1369 | (build-system cmake-build-system) |
1370 | (arguments | |
1371 | `(#:tests? #f; tests fail because we need to setup a database | |
1372 | #:configure-flags | |
0b69ed70 NK |
1373 | (list "-DEXTERNAL_LIBOSMIUM=ON" |
1374 | "-DEXTERNAL_PROTOZERO=ON" | |
1375 | "-DEXTERNAL_FMT=ON" | |
1376 | "-DEXTERNAL_RAPIDJSON=ON"))) | |
b0e2299a | 1377 | (inputs |
8394619b LC |
1378 | (list boost |
1379 | bzip2 | |
1380 | expat | |
0b69ed70 | 1381 | fmt |
8394619b LC |
1382 | libosmium |
1383 | lua | |
1384 | postgresql | |
1385 | proj | |
1386 | protozero | |
0b69ed70 | 1387 | rapidjson |
8394619b | 1388 | zlib)) |
b0e2299a | 1389 | (native-inputs |
8394619b | 1390 | (list python python-psycopg2)) |
b0e2299a JL |
1391 | (home-page "https://github.com/openstreetmap/osm2pgsql") |
1392 | (synopsis "OSM data importer to postgresql") | |
1393 | (description "Osm2pgsql is a tool for loading OpenStreetMap data into a | |
1394 | PostgreSQL / PostGIS database suitable for applications like rendering into a | |
1395 | map, geocoding with Nominatim, or general analysis.") | |
1396 | (license license:gpl2+))) | |
6f91223f JL |
1397 | |
1398 | (define-public tippecanoe | |
1399 | (package | |
1400 | (name "tippecanoe") | |
f4b78c22 | 1401 | (version "1.36.0") |
8f33d05e TGR |
1402 | (source |
1403 | (origin | |
1404 | (method git-fetch) | |
1405 | (uri (git-reference | |
b0e7b699 | 1406 | (url "https://github.com/mapbox/tippecanoe") |
8f33d05e TGR |
1407 | (commit version))) |
1408 | (file-name (git-file-name name version)) | |
1409 | (sha256 | |
f4b78c22 | 1410 | (base32 "0lbmhly4ivnqc6qk1k3sdqvsg6x3nfd8gnjx846bhqj4wag3f88m")))) |
6f91223f JL |
1411 | (build-system gnu-build-system) |
1412 | (arguments | |
1413 | `(#:phases | |
1414 | (modify-phases %standard-phases (delete 'configure)) | |
1415 | #:test-target "test" | |
1416 | #:make-flags | |
f4b78c22 | 1417 | (list (string-append "CC=" ,(cc-for-target)) |
6f91223f JL |
1418 | (string-append "PREFIX=" (assoc-ref %outputs "out"))))) |
1419 | (inputs | |
8394619b | 1420 | (list perl sqlite zlib)) |
6f91223f JL |
1421 | (home-page "https://github.com/mapbox/tippecanoe") |
1422 | (synopsis "Vector tile server for maps") | |
1423 | (description "Tippecanoe creates scale-independent view of data, so that | |
1424 | the texture and density of features is visible at every zoom level, instead of | |
1425 | dropping features at lower levels.") | |
1426 | (license license:bsd-2))) | |
ed72a133 GLV |
1427 | |
1428 | (define-public osmctools | |
1429 | (package | |
1430 | (name "osmctools") | |
1431 | (version "0.9") | |
1432 | (source | |
1433 | (origin | |
1434 | (method git-fetch) | |
1435 | (uri (git-reference | |
1436 | (url "https://gitlab.com/osm-c-tools/osmctools") | |
1437 | (commit version))) | |
1438 | (file-name (git-file-name name version)) | |
1439 | (sha256 | |
1440 | (base32 | |
1441 | "1m8d3r1q1v05pkr8k9czrmb4xjszw6hvgsf3kn9pf0v14gpn4r8f")))) | |
1442 | (build-system gnu-build-system) | |
1443 | (native-inputs | |
8394619b | 1444 | (list autoconf automake)) |
ed72a133 | 1445 | (inputs |
8394619b | 1446 | (list zlib)) |
ed72a133 GLV |
1447 | (home-page "https://gitlab.com/osm-c-tools/osmctools") |
1448 | (synopsis "Tools to convert, filter and update OpenStreetMap data files") | |
1449 | (description "This project contains a few tools which are used in the | |
1450 | OpenStreetMap project. They can be used to convert, filter and update | |
1451 | OpenStreetMap data files.") | |
1452 | (license license:agpl3))) | |
ee34be73 GLV |
1453 | |
1454 | (define-public osm-gps-map | |
1455 | (package | |
1456 | (name "osm-gps-map") | |
1457 | (version "1.1.0") | |
1458 | (source | |
1459 | (origin | |
1460 | (method url-fetch) | |
1461 | (uri (string-append | |
1462 | "https://github.com/nzjrs/osm-gps-map/releases/download/" | |
1463 | version "/osm-gps-map-" version ".tar.gz")) | |
1464 | (sha256 | |
1465 | (base32 | |
1466 | "11imsf4cz1dpxdjh178k2s29axmq86rkfg1pqmn7incyxmjzhbwg")))) | |
1467 | (build-system gnu-build-system) | |
1468 | (native-inputs | |
8394619b | 1469 | (list gnome-common gtk-doc/stable pkg-config)) |
ee34be73 | 1470 | (inputs |
e3196755 | 1471 | (list cairo glib gobject-introspection gtk+ libsoup-minimal-2)) |
ee34be73 GLV |
1472 | (home-page "https://nzjrs.github.io/osm-gps-map/") |
1473 | (synopsis "GTK+ widget for displaying OpenStreetMap tiles") | |
1474 | (description | |
1475 | "This package provides a GTK+ widget (and Python bindings) that when | |
1476 | given GPS coordinates,draws a GPS track, and points of interest on a moving | |
1477 | map display. Downloads map data from a number of websites, including | |
1478 | @url{https://www.openstreetmap.org}.") | |
1479 | (license license:gpl2+))) | |
0f7b8a7f EF |
1480 | |
1481 | (define-public xygrib | |
1482 | (package | |
1483 | (name "xygrib") | |
29bdabb6 | 1484 | (version "1.2.6.1") |
0f7b8a7f EF |
1485 | (source (origin |
1486 | (method git-fetch) | |
1487 | (uri (git-reference | |
b0e7b699 | 1488 | (url "https://github.com/opengribs/XyGrib") |
0f7b8a7f EF |
1489 | (commit (string-append "v" version)))) |
1490 | (file-name (git-file-name name version)) | |
b3ee04cd | 1491 | (patches (search-patches "xygrib-fix-finding-data.patch")) |
0f7b8a7f EF |
1492 | (sha256 |
1493 | (base32 | |
29bdabb6 | 1494 | "0xzsm8pr0zjk3f8j880fg5n82jyxn8xf1330qmmq1fqv7rsrg9ia")) |
0f7b8a7f EF |
1495 | (modules '((guix build utils))) |
1496 | (snippet | |
40b3e9da EF |
1497 | '(begin |
1498 | (delete-file-recursively "data/fonts") | |
1499 | ;; Fixes compilation, can be removed with the next release. | |
1500 | ;; Upstream link: https://github.com/opengribs/XyGrib/pull/255 | |
1501 | (substitute* "src/SkewT.h" | |
1502 | (("QMessageBox>") "QMessageBox>\n#include <QPainterPath>")) | |
1503 | #t)))) | |
0f7b8a7f EF |
1504 | (build-system cmake-build-system) |
1505 | (arguments | |
b3ee04cd TJBG |
1506 | `(#:configure-flags (list "-DGNU_PACKAGE=ON") |
1507 | ||
1508 | #:phases | |
0f7b8a7f EF |
1509 | (modify-phases %standard-phases |
1510 | (add-after 'unpack 'patch-directories | |
1511 | (lambda* (#:key inputs #:allow-other-keys) | |
1512 | (let ((jpeg (assoc-ref inputs "openjpeg")) | |
1513 | (font (assoc-ref inputs "font-liberation"))) | |
1514 | (substitute* "CMakeLists.txt" | |
0f7b8a7f EF |
1515 | ;; Skip looking for the static library. |
1516 | (("\"libnova.a\"") "")) | |
1517 | ;; Don't use the bundled font-liberation. | |
1518 | (substitute* "src/util/Font.cpp" | |
1519 | (("Util::pathFonts\\(\\)\\+\"liberation-fonts/\"") | |
1520 | (string-append "\"" font "/share/fonts/truetype/\""))) | |
1521 | (substitute* "src/util/Util.h" | |
1522 | (("pathData\\(\\)\\+\"data/fonts/\"") | |
b3ee04cd | 1523 | (string-append "\"" font "/share/fonts/\""))))))) |
0f7b8a7f EF |
1524 | #:tests? #f)) ; no tests |
1525 | (native-inputs | |
eef8e2ec | 1526 | (list qttools-5)) |
0f7b8a7f | 1527 | (inputs |
8394619b LC |
1528 | (list bzip2 |
1529 | font-liberation | |
1530 | libnova | |
1531 | libpng | |
1532 | openjpeg | |
c9f19871 | 1533 | proj-7 |
8394619b LC |
1534 | qtbase-5 |
1535 | zlib)) | |
b3ee04cd TJBG |
1536 | (native-search-paths |
1537 | (list (search-path-specification | |
1538 | (variable "XDG_DATA_DIRS") | |
1539 | (files '("share"))))) | |
0f7b8a7f EF |
1540 | (synopsis "Weather Forecast Visualization") |
1541 | (description | |
1542 | "XyGrib is a Grib file reader and visualizes meteorological data providing | |
1543 | an off-line capability to analyse weather forecasts or hindcasts. It is | |
1544 | intended to be used as a capable weather work station for anyone with a serious | |
1545 | interest in examining weather. This would include members of the sailing | |
1546 | community, private and sport aviators, farmers, weather buffs and many more. | |
1547 | XyGrib is the continuation of the zyGrib software package with a new team of | |
1548 | volunteers.") | |
1549 | (home-page "https://opengribs.org") | |
1550 | (license license:gpl3+))) | |
41b4b713 WŻ |
1551 | |
1552 | (define-public libspatialindex | |
1553 | (package | |
1554 | (name "libspatialindex") | |
1cbe7a3e | 1555 | (version "1.9.3") |
41b4b713 WŻ |
1556 | (source |
1557 | (origin | |
1558 | (method url-fetch) | |
1cbe7a3e AI |
1559 | (uri (string-append "https://github.com/libspatialindex/libspatialindex/" |
1560 | "releases/download/" version "/spatialindex-src-" | |
1561 | version ".tar.bz2")) | |
41b4b713 WŻ |
1562 | (sha256 |
1563 | (base32 | |
1cbe7a3e AI |
1564 | "02n5vjcyk04w0djidyp21hfbxfpbbara8ifd9nml6158rwqr8lja")))) |
1565 | (build-system cmake-build-system) | |
41b4b713 WŻ |
1566 | (home-page "https://libspatialindex.org") |
1567 | (synopsis "Spatial indexing library") | |
1568 | (description "The purpose of this library is to provide: | |
1569 | ||
1570 | @itemize | |
1571 | @item An extensible framework that will support robust spatial indexing | |
1572 | methods. | |
1573 | @item Support for sophisticated spatial queries. Range, point location, | |
1574 | nearest neighbor and k-nearest neighbor as well as parametric queries (defined | |
1575 | by spatial constraints) should be easy to deploy and run. | |
1576 | @item Easy to use interfaces for inserting, deleting and updating information. | |
1577 | @item Wide variety of customization capabilities. Basic index and storage | |
1578 | characteristics like the page size, node capacity, minimum fan-out, splitting | |
1579 | algorithm, etc. should be easy to customize. | |
1580 | @item Index persistence. Internal memory and external memory structures | |
1581 | should be supported. Clustered and non-clustered indices should be easy to be | |
1582 | persisted. | |
1583 | @end itemize | |
1584 | ") | |
1585 | (license license:expat))) | |
6dd0e41d | 1586 | |
3288d6bf VM |
1587 | (define-public python-rtree |
1588 | (package | |
1589 | (name "python-rtree") | |
41ab2f0d | 1590 | (version "1.0.0") |
3288d6bf VM |
1591 | (source |
1592 | (origin | |
1593 | (method url-fetch) | |
1594 | (uri (pypi-uri "Rtree" version)) | |
1595 | (sha256 | |
41ab2f0d | 1596 | (base32 "10lnhf67c9pb0yisxdqmb52dy6lj1za1h9d4p69v0ihk2a138j6h")))) |
3288d6bf VM |
1597 | (build-system python-build-system) |
1598 | (arguments | |
1599 | `(#:phases | |
1600 | (modify-phases %standard-phases | |
1601 | (add-after 'unpack 'find-libspatialindex | |
1602 | (lambda* (#:key inputs #:allow-other-keys) | |
41ab2f0d FG |
1603 | (let ((libspatialindex (assoc-ref inputs "libspatialindex"))) |
1604 | (substitute* "rtree/finder.py" | |
1605 | (("find_library\\(\"spatialindex_c\"\\)") | |
1606 | (string-append "\"" libspatialindex | |
1607 | "/lib/libspatialindex_c.so\"")))))) | |
3288d6bf | 1608 | (replace 'check |
41ab2f0d | 1609 | (lambda* (#:key outputs tests? #:allow-other-keys) |
3288d6bf | 1610 | (when tests? |
41ab2f0d | 1611 | (invoke "pytest"))))))) |
3288d6bf | 1612 | (native-inputs |
8394619b | 1613 | (list python-numpy python-pytest python-wheel)) |
3288d6bf | 1614 | (inputs |
8394619b | 1615 | (list libspatialindex)) |
3288d6bf VM |
1616 | (home-page "https://github.com/Toblerity/rtree") |
1617 | (synopsis "R-Tree spatial index for Python GIS") | |
1618 | (description | |
1619 | "RTree is a Python package with bindings for @code{libspatialindex}.") | |
1620 | (license license:expat))) | |
1621 | ||
6dd0e41d JL |
1622 | (define-public java-jmapviewer |
1623 | (package | |
1624 | (name "java-jmapviewer") | |
8c8c0c63 | 1625 | (version "2.13") |
6dd0e41d JL |
1626 | (source (origin |
1627 | (method url-fetch) | |
1628 | (uri (string-append "https://svn.openstreetmap.org/applications/" | |
1629 | "viewer/jmapviewer/releases/" version | |
1630 | "/JMapViewer-" version "-Source.zip")) | |
1631 | (sha256 | |
1632 | (base32 | |
8c8c0c63 | 1633 | "0sy6r5fkbb9bclw0is6gwnbzz627m7pjfnsqydxz58pbndakkhrv")))) |
6dd0e41d JL |
1634 | (build-system ant-build-system) |
1635 | (native-inputs | |
8394619b | 1636 | (list unzip)) |
6dd0e41d JL |
1637 | (arguments |
1638 | `(#:build-target "pack" | |
1639 | #:tests? #f; No tests | |
1640 | #:phases | |
1641 | (modify-phases %standard-phases | |
1642 | (add-before 'build 'clean | |
1643 | (lambda* _ | |
1644 | (invoke "ant" "clean"))) | |
1645 | (replace 'install | |
1646 | (lambda* (#:key outputs #:allow-other-keys) | |
1647 | (let ((dir (string-append (assoc-ref outputs "out") "/share/java/"))) | |
1648 | (mkdir-p dir) | |
54cc2b4e BH |
1649 | (copy-file "JMapViewer.jar" (string-append dir "JMapViewer.jar")) |
1650 | #t)))))) | |
6dd0e41d JL |
1651 | (home-page "https://wiki.openstreetmap.org/wiki/JMapViewer") |
1652 | (synopsis "OSM map integration in Java") | |
4042f7f8 VC |
1653 | (description "JMapViewer is a Java component which easily |
1654 | integrates an OSM map view into your Java application. It is maintained as | |
6dd0e41d JL |
1655 | an independent project by the JOSM team.") |
1656 | (license license:gpl2))) | |
f041db86 | 1657 | |
f1abc566 JL |
1658 | (define-public java-opening-hours-parser |
1659 | (package | |
1660 | (name "java-opening-hours-parser") | |
c9f6fe2c | 1661 | (version "0.23.0") |
f1abc566 JL |
1662 | (source (origin |
1663 | (method git-fetch) | |
1664 | (uri (git-reference | |
1665 | (url "https://github.com/simonpoole/OpeningHoursParser") | |
1666 | (commit version))) | |
1667 | (file-name (git-file-name name version)) | |
1668 | (sha256 | |
1669 | (base32 | |
c9f6fe2c | 1670 | "0yhbd2ix6h506aljh0jkrnp28m4xcqdcdpnqm30fn08kawdgxgsh")))) |
f1abc566 JL |
1671 | (build-system ant-build-system) |
1672 | (arguments | |
1673 | `(#:jar-name "java-opening-hours-parser.jar" | |
1674 | #:source-dir "src/main/java" | |
1675 | #:phases | |
1676 | (modify-phases %standard-phases | |
1677 | (add-before 'build 'copy-resources | |
1678 | (lambda _ | |
1679 | (copy-recursively "src/main/resources" "build/classes") | |
1680 | #t)) | |
1681 | (add-before 'build 'generate-parser | |
1682 | (lambda* _ | |
1683 | (let* ((dir "src/main/java/ch/poole/openinghoursparser") | |
1684 | (file (string-append dir "/OpeningHoursParser.jj"))) | |
1685 | (invoke "javacc" "-DEBUG_PARSER=false" | |
1686 | "-DEBUG_TOKEN_MANAGER=false" "-JDK_VERSION=1.8" | |
1687 | "-GRAMMAR_ENCODING=UTF-8" | |
1688 | (string-append "-OUTPUT_DIRECTORY=" dir) | |
1689 | file)) | |
1690 | #t))))) | |
1691 | (inputs | |
8394619b | 1692 | (list java-jetbrains-annotations)) |
f1abc566 | 1693 | (native-inputs |
8394619b | 1694 | (list javacc java-junit java-hamcrest-core)) |
f1abc566 JL |
1695 | (home-page "https://github.com/simonpoole/OpeningHoursParser") |
1696 | (synopsis "Java parser for the OpenStreetMap opening hour format") | |
1697 | (description "This is a very simplistic parser for string values according | |
1698 | to the OSM opening hours specification.") | |
1699 | (license license:expat))) | |
1700 | ||
f041db86 JL |
1701 | (define-public josm |
1702 | (package | |
1703 | (name "josm") | |
81ab2016 | 1704 | (version "18360") |
f041db86 JL |
1705 | (source (origin |
1706 | (method svn-fetch) | |
1707 | (uri (svn-reference | |
1708 | (url "https://josm.openstreetmap.de/svn/trunk") | |
1709 | (revision (string->number version)) | |
1710 | (recursive? #f))) | |
1711 | (sha256 | |
1712 | (base32 | |
81ab2016 | 1713 | "0j7fhzh6hs2b5r1a3d1xpy6f5r6q1kh79bck28raang8ldd754c6")) |
f041db86 JL |
1714 | (file-name (string-append name "-" version "-checkout")) |
1715 | (modules '((guix build utils))) | |
1716 | (snippet | |
1717 | '(begin | |
1192ae94 | 1718 | (for-each delete-file (find-files "." ".*.jar$")) |
f041db86 JL |
1719 | #t)))) |
1720 | (build-system ant-build-system) | |
1721 | (native-inputs | |
8394619b | 1722 | (list javacc)) |
f041db86 | 1723 | (inputs |
8394619b LC |
1724 | (list java-commons-jcs |
1725 | java-commons-compress | |
1726 | java-jmapviewer | |
1727 | java-jsonp-api | |
1728 | java-jsonp-impl ; runtime dependency | |
1729 | java-jsr305 | |
1730 | java-metadata-extractor | |
1731 | java-opening-hours-parser | |
1732 | java-openjfx-media | |
1733 | java-signpost-core | |
1734 | java-svg-salamander)) | |
f041db86 JL |
1735 | (arguments |
1736 | `(#:tests? #f | |
1737 | #:jar-name "josm.jar" | |
1738 | #:phases | |
1739 | (modify-phases %standard-phases | |
1740 | (add-after 'unpack 'rm-build.xml | |
1741 | (lambda* _ | |
1742 | (delete-file "build.xml") | |
1743 | #t)) | |
1744 | (add-before 'build 'fix-revision | |
1745 | (lambda* _ | |
1746 | (with-output-to-file "REVISION.XML" | |
1747 | (lambda _ | |
1748 | (display | |
1749 | (string-append "<info><entry><commit revision=\"" ,version "\">" | |
1750 | "<date>1970-01-01 00:00:00 +0000</date>" | |
1751 | "</commit></entry></info>")))) | |
1752 | #t)) | |
cfdb6770 JL |
1753 | (add-before 'build 'fix-jcs |
1754 | (lambda _ | |
1755 | ;; This version of JOSM uses an unreleased version of commons-jcs, | |
1756 | ;; which has renamed its classes to another namespace. Rename them | |
1757 | ;; back so they can be used with our version of jcs. | |
1758 | (substitute* (find-files "." ".*.java$") | |
7125b0d8 CL |
1759 | (("jcs3") "jcs") |
1760 | (("ICache.NAME_COMPONENT_DELIMITER") "\":\"")) | |
cfdb6770 | 1761 | #t)) |
f041db86 JL |
1762 | (add-before 'build 'fix-classpath |
1763 | (lambda* (#:key inputs #:allow-other-keys) | |
1764 | (setenv "CLASSPATH" | |
1765 | (string-join | |
1766 | (filter | |
1767 | (lambda (s) | |
1768 | (let ((source (assoc-ref inputs "source"))) | |
1192ae94 CB |
1769 | (not (equal? (substring s 0 (string-length source)) |
1770 | source)))) | |
f041db86 JL |
1771 | (string-split (getenv "CLASSPATH") #\:)) |
1772 | ":")) | |
1773 | #t)) | |
1774 | (add-before 'build 'generate-parser | |
1775 | (lambda* _ | |
1776 | (let* ((dir "src/org/openstreetmap/josm/gui/mappaint/mapcss") | |
1777 | (out (string-append dir "/parsergen")) | |
1778 | (file (string-append dir "/MapCSSParser.jj"))) | |
1779 | (mkdir-p "src/org/openstreetmap/josm/gui/mappaint/mapcss/parsergen") | |
1780 | (invoke "javacc" "-DEBUG_PARSER=false" | |
1781 | "-DEBUG_TOKEN_MANAGER=false" "-JDK_VERSION=1.8" | |
1782 | "-GRAMMAR_ENCODING=UTF-8" | |
1783 | (string-append "-OUTPUT_DIRECTORY=" out) | |
1784 | file)) | |
1785 | #t)) | |
1786 | (add-after 'build 'generate-epsg | |
1787 | (lambda _ | |
1788 | (system* "javac" "scripts/BuildProjectionDefinitions.java" | |
1789 | "-cp" "build/classes") | |
1790 | (mkdir-p "data/projection") | |
1791 | (with-output-to-file "data/projection/custom-epsg" | |
1792 | (lambda _ (display ""))) | |
1793 | (invoke "java" "-cp" "build/classes:scripts:." | |
1794 | "BuildProjectionDefinitions" ".") | |
1795 | #t)) | |
cfdb6770 | 1796 | (add-after 'generate-epsg 'copy-resources |
f041db86 | 1797 | (lambda _ |
cfdb6770 | 1798 | (copy-recursively "resources" "build/classes") |
f041db86 JL |
1799 | #t)) |
1800 | (add-before 'install 'regenerate-jar | |
1801 | (lambda _ | |
1802 | ;; We need to regenerate the jar file to add data. | |
1803 | (delete-file "build/jar/josm.jar") | |
1804 | (invoke "jar" "-cf" "build/jar/josm.jar" "-C" | |
1805 | "build/classes" ".") | |
1806 | #t)) | |
f041db86 JL |
1807 | (add-before 'build 'copy-revision |
1808 | (lambda _ | |
1809 | (mkdir-p "build/classes") | |
1810 | (with-output-to-file "build/classes/REVISION" | |
1811 | (lambda _ | |
1812 | (display | |
1813 | (string-append "Revision: " ,version "\n" | |
1814 | "Is-Local-Build: true\n" | |
1815 | "Build-Date: 1970-01-01 00:00:00 +0000\n")))) | |
1816 | #t)) | |
1192ae94 CB |
1817 | (add-after 'install 'install-share-directories |
1818 | (lambda* (#:key outputs #:allow-other-keys) | |
1819 | (let ((out (assoc-ref outputs "out")) | |
1820 | (share-directories '("applications" "icons" "man" "menu" | |
f9fd3752 CL |
1821 | "metainfo" "mime" "pixmaps")) |
1822 | (desktop "org.openstreetmap.josm.desktop")) | |
1192ae94 CB |
1823 | (for-each (lambda (directory) |
1824 | (copy-recursively (string-append | |
1825 | "native/linux/tested/usr/share/" | |
1826 | directory) | |
1827 | (string-append | |
1828 | out "/share/" directory))) | |
f9fd3752 CL |
1829 | share-directories) |
1830 | (substitute* (string-append out "/share/applications/" desktop) | |
1831 | (("josm-MainApplication") "josm-gui-MainApplication"))) | |
1192ae94 | 1832 | #t)) |
f041db86 JL |
1833 | (add-after 'install 'install-bin |
1834 | (lambda* (#:key outputs inputs #:allow-other-keys) | |
1835 | (let* ((out (assoc-ref outputs "out")) | |
1836 | (bin (string-append out "/bin"))) | |
1837 | (mkdir-p bin) | |
1838 | (with-output-to-file (string-append bin "/josm") | |
1839 | (lambda _ | |
1840 | (display | |
1841 | (string-append "#!/bin/sh\n" | |
1842 | (assoc-ref inputs "jdk") "/bin/java" | |
1843 | " -cp " out "/share/java/josm.jar:" | |
1844 | (getenv "CLASSPATH") | |
1845 | " org.openstreetmap.josm.gui.MainApplication")))) | |
1846 | (chmod (string-append bin "/josm") #o755)) | |
1847 | #t))))) | |
1848 | (home-page "https://josm.openstreetmap.de") | |
1849 | (synopsis "OSM editor") | |
1850 | (description "JOSM is an extensible editor for OpenStreetMap (OSM). It | |
1851 | supports loading GPX tracks, background imagery and OSM data from local | |
9df26b02 | 1852 | sources as well as from online sources and allows editing the OSM data (nodes, |
f041db86 JL |
1853 | ways, and relations) and their metadata tags.") |
1854 | (license license:gpl2+))) | |
53c9b398 HG |
1855 | |
1856 | (define-public libmaxminddb | |
1857 | (package | |
1858 | (name "libmaxminddb") | |
2eba49db | 1859 | (version "1.6.0") |
53c9b398 HG |
1860 | (source |
1861 | (origin | |
1862 | (method url-fetch) | |
1863 | (uri (string-append "https://github.com/maxmind/libmaxminddb" | |
1864 | "/releases/download/" version "/" | |
1865 | "/libmaxminddb-" version ".tar.gz")) | |
1866 | (sha256 | |
2eba49db | 1867 | (base32 "0rw2z7rx8jzgdcgqlmc4wqrsjmiwd8vm5wvvrldy472rghcaq83n")))) |
53c9b398 HG |
1868 | (build-system gnu-build-system) |
1869 | (arguments | |
2113ddb7 TGR |
1870 | `(#:make-flags |
1871 | (list ,(string-append "CC=" (cc-for-target))))) | |
53c9b398 | 1872 | (native-inputs |
8394619b | 1873 | (list perl)) |
53c9b398 HG |
1874 | (home-page "https://maxmind.github.io/libmaxminddb/") |
1875 | (synopsis "C library for the MaxMind DB file format") | |
1876 | (description "The libmaxminddb library provides a C library for reading | |
1877 | MaxMind DB files, including the GeoIP2 databases from MaxMind. The MaxMind DB | |
1878 | format is a custom, but open, binary format designed to facilitate fast | |
1879 | lookups of IP addresses while allowing flexibility in the type of data | |
1880 | associated with an address.") | |
1881 | (license license:asl2.0))) | |
b1414a81 HG |
1882 | |
1883 | (define-public python-maxminddb | |
1884 | (package | |
1885 | (name "python-maxminddb") | |
359fd26f | 1886 | (version "2.2.0") |
b1414a81 HG |
1887 | (source |
1888 | (origin | |
1889 | (method url-fetch) | |
1890 | (uri (pypi-uri "maxminddb" version)) | |
1891 | (sha256 | |
1892 | (base32 | |
359fd26f | 1893 | "1rc4a403r3b4vhmhb03gidd0fmsbvfpbf3qfcw25h4db9zn0fxz3")))) |
b1414a81 HG |
1894 | (build-system python-build-system) |
1895 | (arguments | |
1896 | `(#:tests? #f)) ;; Tests require a copy of the maxmind database | |
1897 | (inputs | |
8394619b | 1898 | (list libmaxminddb)) |
13b09bfc | 1899 | (home-page "https://www.maxmind.com/") |
b1414a81 HG |
1900 | (synopsis "Reader for the MaxMind DB format") |
1901 | (description "MaxMind DB is a binary file format that stores data indexed | |
1902 | by IP address subnets (IPv4 or IPv6). This is a Python module for reading | |
1903 | MaxMind DB files.") | |
1904 | (license license:asl2.0))) | |
0a71e34e HG |
1905 | |
1906 | (define-public python-geoip2 | |
1907 | (package | |
1908 | (name "python-geoip2") | |
1909 | (version "2.9.0") | |
1910 | (source | |
1911 | (origin | |
1912 | (method url-fetch) | |
1913 | (uri (pypi-uri "geoip2" version)) | |
1914 | (sha256 | |
1915 | (base32 | |
1916 | "1w7cay5q6zawjzivqbwz5cqx1qbdjw6kbriccb7l46p7b39fkzzp")))) | |
1917 | (build-system python-build-system) | |
1918 | (arguments | |
1919 | `(#:tests? #f)) ;; Tests require a copy of the maxmind database | |
1920 | (inputs | |
8394619b | 1921 | (list python-maxminddb python-requests)) |
13b09bfc | 1922 | (home-page "https://www.maxmind.com/") |
0a71e34e HG |
1923 | (synopsis "MaxMind GeoIP2 API") |
1924 | (description "Provides an API for the GeoIP2 web services and databases. | |
1925 | The API also works with MaxMind’s free GeoLite2 databases.") | |
1926 | (license license:asl2.0))) | |
30fa6b16 GLV |
1927 | |
1928 | (define-public routino | |
1929 | (package | |
1930 | (name "routino") | |
e2492f58 | 1931 | (version "3.3.3") |
30fa6b16 GLV |
1932 | (source |
1933 | (origin | |
1934 | (method url-fetch) | |
1935 | (uri (string-append "http://www.routino.org/download/routino-" | |
1936 | version ".tgz")) | |
1937 | (sha256 | |
e2492f58 | 1938 | (base32 "1xa7l2bjn832nk6bc7b481nv8hd2gj41jwhg0d2qy10lqdvjpn5b")))) |
30fa6b16 GLV |
1939 | (build-system gnu-build-system) |
1940 | (native-inputs | |
8394619b | 1941 | (list perl)) |
30fa6b16 | 1942 | (inputs |
8394619b | 1943 | (list bzip2 xz zlib)) |
30fa6b16 GLV |
1944 | (arguments |
1945 | `(#:test-target "test" | |
1946 | #:phases | |
1947 | (modify-phases %standard-phases | |
1948 | (replace 'configure | |
1949 | (lambda* (#:key outputs #:allow-other-keys) | |
1950 | (substitute* "Makefile.conf" | |
1951 | (("prefix=/usr/local") | |
1952 | (string-append "prefix=" (assoc-ref outputs "out"))) | |
1953 | (("LDFLAGS_LDSO=-Wl,-R\\.") | |
1954 | "LDFLAGS_LDSO=-Wl,-R$(libdir)") | |
1955 | (("#CFLAGS\\+=-DUSE_XZ") | |
1956 | "CFLAGS+=-DUSE_XZ") | |
1957 | (("#LDFLAGS\\+=-llzma") | |
1958 | "LDFLAGS+=-llzma")) | |
1959 | #t))))) | |
1960 | (synopsis "Routing application for OpenStreetMap data") | |
1961 | (description | |
1962 | "Routino is an application for finding a route between two points | |
1963 | using the dataset of topographical information collected by | |
1964 | @url{https://www.OpenStreetMap.org}.") | |
1965 | (home-page "https://www.routino.org/") | |
1966 | (license license:agpl3+))) | |
bccbeece GLV |
1967 | |
1968 | (define-public qmapshack | |
1969 | (package | |
1970 | (name "qmapshack") | |
4db16b9c | 1971 | (version "1.16.1") |
bccbeece GLV |
1972 | (source |
1973 | (origin | |
1974 | (method git-fetch) | |
1975 | (uri (git-reference | |
b0e7b699 | 1976 | (url "https://github.com/Maproom/qmapshack") |
bccbeece GLV |
1977 | (commit (string-append "V_" version)))) |
1978 | (file-name (git-file-name name version)) | |
1979 | (sha256 | |
4db16b9c | 1980 | (base32 "184fqmsfzr3b333ssizjk6gvv7mncmygq8dj5r7rsvs5md26z2ys")))) |
bccbeece GLV |
1981 | (build-system qt-build-system) |
1982 | (native-inputs | |
eef8e2ec | 1983 | (list pkg-config qttools-5)) |
bccbeece | 1984 | (inputs |
d9f0ec68 GLV |
1985 | (list curl |
1986 | gdal | |
8394619b LC |
1987 | libjpeg-turbo |
1988 | proj | |
1989 | qtbase-5 | |
735d340a | 1990 | qtdeclarative-5 |
8394619b | 1991 | qtlocation |
0938c3e3 | 1992 | qtwebchannel-5 |
a0beb297 | 1993 | qtwebengine-5 |
4db16b9c | 1994 | quazip |
8394619b LC |
1995 | routino |
1996 | sqlite ; See wrap phase | |
1997 | zlib)) | |
bccbeece GLV |
1998 | (arguments |
1999 | `(#:tests? #f | |
2000 | #:phases | |
2001 | (modify-phases %standard-phases | |
2002 | (add-after 'unpack 'fix-cmake-modules | |
2003 | (lambda* (#:key inputs #:allow-other-keys) | |
2004 | (substitute* "CMakeLists.txt" | |
2005 | (("find_package\\(Qt5PrintSupport REQUIRED\\)" all) | |
2006 | (string-append all "\nfind_package(Qt5Positioning REQUIRED)"))) | |
2007 | (substitute* "cmake/Modules/FindROUTINO.cmake" | |
2008 | (("/usr/local") | |
4db16b9c | 2009 | (assoc-ref inputs "routino")))))))) |
bccbeece GLV |
2010 | (synopsis "GPS mapping application") |
2011 | (description | |
2012 | "QMapShack can be used to plan your next outdoor trip or to visualize and | |
2013 | archive all the GPS recordings of your past trips. It is the successor of the | |
2014 | QLandkarte GT application.") | |
2015 | (home-page "https://github.com/Maproom/qmapshack/wiki") | |
2016 | (license license:gpl3+))) | |
133de9ab GLV |
2017 | |
2018 | (define-public readosm | |
2019 | (package | |
2020 | (name "readosm") | |
86f8472b | 2021 | (version "1.1.0a") |
133de9ab GLV |
2022 | (source |
2023 | (origin | |
2024 | (method url-fetch) | |
2025 | (uri (string-append "https://www.gaia-gis.it/gaia-sins/" | |
2026 | "readosm-" version ".tar.gz")) | |
2027 | (sha256 | |
b7ab88bc | 2028 | (base32 "0igif2bxf4dr82glxz9gyx5mmni0r2dsnx9p9k6pxv3c4lfhaz6v")))) |
133de9ab GLV |
2029 | (build-system gnu-build-system) |
2030 | (inputs | |
8394619b | 2031 | (list expat zlib)) |
133de9ab GLV |
2032 | (synopsis "Data extractor for OpenStreetMap files") |
2033 | (description | |
2034 | "ReadOSM is a library to extract valid data from within an OpenStreetMap | |
2035 | input file (in @code{.osm} or @code{.osm.pbf} format).") | |
2036 | (home-page "https://www.gaia-gis.it/fossil/readosm/index") | |
2037 | (license (list license:gpl2+ | |
2038 | license:lgpl2.1+ | |
2039 | license:mpl1.1)))) | |
0ccc1385 | 2040 | |
6be69452 SH |
2041 | (define-public shapelib |
2042 | (package | |
2043 | (name "shapelib") | |
2044 | (version "1.5.0") | |
2045 | (source | |
2046 | (origin | |
2047 | (method git-fetch) | |
2048 | (uri (git-reference | |
2049 | (url "https://github.com/OSGeo/shapelib") | |
2050 | (commit (string-append "v" version)))) | |
2051 | (file-name (git-file-name name version)) | |
2052 | (sha256 | |
2053 | (base32 "1lzch0jf6yqhw391phhafzw4ghmiz98zkf698h4fmq109fa2vhqd")))) | |
2054 | (build-system gnu-build-system) | |
2055 | (native-inputs | |
8394619b | 2056 | (list autoconf automake libtool)) |
6be69452 SH |
2057 | (home-page "http://shapelib.maptools.org/") |
2058 | (synopsis "Provides C library to write and update ESRI Shapefiles") | |
2059 | (description | |
2060 | "The Shapefile C Library provides the ability to write simple C programs | |
2061 | for reading, writing and updating (to a limited extent) ESRI Shapefiles, and the | |
2062 | associated attribute file (@file{.dbf}).") | |
2063 | (license license:gpl2+))) | |
2064 | ||
0ccc1385 GLV |
2065 | (define-public spatialite-tools |
2066 | (package | |
2067 | (name "spatialite-tools") | |
f33e773c | 2068 | (version "5.0.1") |
0ccc1385 GLV |
2069 | (source |
2070 | (origin | |
2071 | (method url-fetch) | |
2072 | (uri (string-append "https://www.gaia-gis.it/gaia-sins/" | |
2073 | "spatialite-tools-" version ".tar.gz")) | |
2074 | (sha256 | |
f33e773c | 2075 | (base32 "070p6pg541wvwb28wkn7k0z1qdyirik2qc2jpj4pf0vzx02w414n")))) |
0ccc1385 GLV |
2076 | (build-system gnu-build-system) |
2077 | (native-inputs | |
8394619b | 2078 | (list pkg-config)) |
0ccc1385 | 2079 | (inputs |
8394619b LC |
2080 | (list expat |
2081 | freexl | |
2082 | geos | |
2083 | librttopo | |
2084 | libspatialite | |
2085 | libxml2 | |
2086 | minizip | |
2087 | proj | |
2088 | readosm | |
2089 | sqlite)) | |
0ccc1385 GLV |
2090 | (synopsis "Collection of command line tools for SpatiaLite") |
2091 | (description | |
2092 | "@code{spatialite-tools} is a collection of Command Line Interface (CLI) | |
2093 | tools supporting SpatiaLite.") | |
2094 | (home-page "https://www.gaia-gis.it/fossil/spatialite-tools/index") | |
2095 | (license license:gpl3+))) | |
ec73c90e GLV |
2096 | |
2097 | (define-public virtualpg | |
2098 | (package | |
2099 | (name "virtualpg") | |
b2a94e59 | 2100 | (version "2.0.1") |
ec73c90e GLV |
2101 | (source |
2102 | (origin | |
2103 | (method url-fetch) | |
2104 | (uri (string-append "https://www.gaia-gis.it/gaia-sins/" | |
2105 | "virtualpg-" version ".tar.gz")) | |
2106 | (sha256 | |
b2a94e59 | 2107 | (base32 "12z0l7368r4116ljzg7nljy5hf425r11vxc540w79wlzikmynamy")))) |
ec73c90e GLV |
2108 | (build-system gnu-build-system) |
2109 | (inputs | |
8394619b | 2110 | (list postgresql sqlite)) |
ec73c90e GLV |
2111 | (synopsis "Allow SQLite/SpatiaLite to access PostgreSQL/PostGIS tables") |
2112 | (description | |
2113 | "VirtualPG is a dynamic extension for the SQLite DBMS. It implements | |
2114 | the VirtualPostgres driver, allowing to directly exchange data between SQLite | |
2115 | and PostgreSQL; if SpatiaLite is available even PostGIS geometries can be | |
2116 | exchanged form one Spatial DBMS and the other.") | |
2117 | (home-page "https://www.gaia-gis.it/fossil/virtualpg/index") | |
2118 | (license (list license:gpl2+ | |
2119 | license:lgpl2.1+ | |
2120 | license:mpl1.1)))) | |
7b1fb40d GLV |
2121 | |
2122 | (define-public opencpn | |
2123 | (package | |
2124 | (name "opencpn") | |
2da3c84a | 2125 | (version "5.6.0") |
7b1fb40d GLV |
2126 | (source |
2127 | (origin | |
2128 | (method git-fetch) | |
2129 | (uri (git-reference | |
b0e7b699 | 2130 | (url "https://github.com/OpenCPN/OpenCPN") |
2da3c84a | 2131 | (commit (string-append "Release_" version)))) |
7b1fb40d GLV |
2132 | (file-name (git-file-name name version)) |
2133 | (sha256 | |
2da3c84a | 2134 | (base32 "0g5x45wv3djfjmigk6kgs0i63yp8rs1fbmm4pb15wb3z6dml624y")))) |
7b1fb40d GLV |
2135 | (build-system cmake-build-system) |
2136 | (native-inputs | |
2137 | `(("gettext" ,gettext-minimal) | |
2138 | ("pkg-config" ,pkg-config))) | |
2139 | (inputs | |
2da3c84a GLV |
2140 | (list alsa-utils |
2141 | bzip2 | |
8394619b LC |
2142 | cairo |
2143 | curl | |
2da3c84a | 2144 | eudev |
8394619b LC |
2145 | glu |
2146 | gtk+ | |
2da3c84a | 2147 | jasper |
8394619b LC |
2148 | libarchive |
2149 | libelf | |
2150 | libexif | |
2da3c84a | 2151 | libjpeg-turbo |
8394619b | 2152 | libsndfile |
2da3c84a | 2153 | libusb |
8394619b LC |
2154 | lz4 |
2155 | mesa | |
2156 | pango | |
2157 | portaudio | |
2158 | sqlite | |
2159 | tinyxml | |
2160 | wxsvg | |
2161 | wxwidgets | |
2162 | xz | |
2163 | zlib)) | |
7b1fb40d | 2164 | (arguments |
4d021659 GLV |
2165 | `(#:configure-flags '("-DOCPN_USE_BUNDLED_LIBS=OFF" |
2166 | "-DOCPN_ENABLE_PORTAUDIO=ON" | |
2167 | "-DOCPN_ENABLE_SNDFILE=ON" | |
2168 | "-DOCPN_BUNDLE_TCDATA=ON" | |
2169 | "-DOCPN_BUNDLE_GSHHS=ON") | |
7b1fb40d GLV |
2170 | #:tests? #f ; No tests defined |
2171 | #:phases | |
2172 | (modify-phases %standard-phases | |
2173 | (add-after 'unpack 'fix-build | |
4d021659 | 2174 | (lambda* (#:key inputs #:allow-other-keys) |
7b1fb40d | 2175 | (substitute* "CMakeLists.txt" |
4d021659 GLV |
2176 | (("wx-32.c; cc") |
2177 | "wx-32.c; gcc") | |
2178 | (("\"/bin/sh\" \"-c\"") | |
2179 | (string-append "\"" (which "bash") "\" \"-c\"")) | |
2180 | (("include\\(TargetSetup\\)") | |
2181 | "set(PKG_TARGET \"guix\")\nset(PKG_TARGET_VERSION 1)"))))))) | |
7b1fb40d GLV |
2182 | (synopsis "Chart plotter and marine GPS navigation software") |
2183 | (description | |
2184 | "OpenCPN is a chart plotter and marine navigation software designed to be | |
2185 | used at the helm station of your boat while underway. Chart a course and | |
2186 | track your position right from your laptop.") | |
2187 | (home-page "https://opencpn.org/") | |
2188 | (license (list license:asl2.0 | |
2189 | license:cc0 | |
2190 | license:bsd-2 | |
2191 | license:bsd-3 | |
2192 | license:expat | |
2193 | license:gpl3+ | |
2194 | license:lgpl2.1+ | |
2195 | license:lgpl3+ | |
2196 | license:sgifreeb2.0 | |
2197 | license:zlib)))) | |
9fce5914 | 2198 | |
02c9a069 NK |
2199 | (define-public openorienteering-mapper |
2200 | (package | |
2201 | (name "openorienteering-mapper") | |
2202 | (version "0.9.5") | |
2203 | (source (origin | |
2204 | (method git-fetch) | |
2205 | (uri (git-reference | |
2206 | (url "https://github.com/OpenOrienteering/mapper") | |
2207 | (commit (string-append "v" version)))) | |
2208 | (file-name (git-file-name name version)) | |
2209 | (sha256 | |
2210 | (base32 | |
2211 | "11b578h8f3q9yvphbjhqmy2w1cfc9skslzawypqmc3k44v24aj0s")))) | |
2212 | (build-system cmake-build-system) | |
2213 | (arguments | |
2214 | `(#:tests? #f | |
2215 | #:configure-flags | |
2216 | (list | |
2217 | "-DLICENSING_PROVIDER:BOOL=OFF" | |
2218 | "-DMapper_MANUAL_QTHELP:BOOL=OFF"))) | |
2219 | (inputs | |
2220 | `(("clipper" ,clipper) | |
2221 | ("cups" ,cups) | |
3b14615b | 2222 | ("curl" ,curl) |
02c9a069 NK |
2223 | ("gdal" ,gdal) |
2224 | ("proj" ,proj) | |
2225 | ("qtbase" ,qtbase-5) | |
2226 | ("qtimageformats" ,qtimageformats) | |
2227 | ("qtlocation" ,qtlocation) | |
2228 | ("qtsensors" ,qtsensors) | |
2229 | ("zlib" ,zlib))) | |
2230 | (native-inputs | |
2231 | `(("doxygen" ,doxygen) | |
eef8e2ec | 2232 | ("qttools-5" ,qttools-5))) |
02c9a069 NK |
2233 | (home-page "https://www.openorienteering.org/apps/mapper/") |
2234 | (synopsis "OpenOrienteering Mapper (OOM)") | |
2235 | (description | |
2236 | "OpenOrienteering Mapper is a software for creating maps for the | |
2237 | orienteering sport.") | |
2238 | (license license:gpl3+))) | |
2239 | ||
9fce5914 | 2240 | (define-public grass |
df70fd33 | 2241 | (let* ((version "7.8.7") |
9fce5914 GLV |
2242 | (majorminor (string-join (list-head (string-split version #\.) 2) "")) |
2243 | (grassxx (string-append "grass" majorminor))) | |
2244 | (package | |
2245 | (name "grass") | |
2246 | (version version) | |
2247 | (source | |
2248 | (origin | |
2249 | (method url-fetch) | |
2250 | (uri (string-append "https://grass.osgeo.org/" grassxx | |
2251 | "/source/grass-" version ".tar.gz")) | |
2252 | (sha256 | |
df70fd33 | 2253 | (base32 "0sbz0ba9p963phvd0gmvfqq1fg4ixpipzcjbf20ys86qavjppzsg")))) |
9fce5914 GLV |
2254 | (build-system gnu-build-system) |
2255 | (inputs | |
1628d57b | 2256 | `(("bzip2" ,bzip2) |
9fce5914 GLV |
2257 | ("cairo" ,cairo) |
2258 | ("fftw" ,fftw) | |
2259 | ("freetype" ,freetype) | |
2260 | ("gdal" ,gdal) | |
2261 | ("geos" ,geos) | |
2262 | ("glu" ,glu) | |
2263 | ("lapack" ,lapack) | |
2264 | ("libpng" ,libpng) | |
2265 | ("libtiff" ,libtiff) | |
2266 | ("mesa" ,mesa) | |
2267 | ("mariadb-dev" ,mariadb "dev") | |
2268 | ("mariadb-lib" ,mariadb "lib") | |
2269 | ("netcdf" ,netcdf) | |
2270 | ("openblas" ,openblas) | |
2271 | ("perl" ,perl) | |
2272 | ("postgresql" ,postgresql) | |
552fde3b | 2273 | ("proj" ,proj) |
9fce5914 GLV |
2274 | ("python" ,python) |
2275 | ("python-dateutil" ,python-dateutil) | |
2276 | ("python-numpy" ,python-numpy) | |
2277 | ("python-wxpython" ,python-wxpython) | |
2278 | ("readline" ,readline) | |
2279 | ("sqlite" ,sqlite) | |
2280 | ("wxwidgets" ,wxwidgets) | |
2281 | ("zlib" ,zlib) | |
2282 | ("zstd" ,zstd "lib"))) | |
2283 | (native-inputs | |
2284 | `(("bash" ,bash-minimal) | |
2285 | ("bison" ,bison) | |
2286 | ("flex" ,flex) | |
2287 | ("pkg-config" ,pkg-config))) | |
2288 | (arguments | |
2289 | `(#:tests? #f ; No tests | |
2290 | #:modules ((guix build gnu-build-system) | |
2291 | ((guix build python-build-system) #:prefix python:) | |
2292 | (guix build utils)) | |
2293 | #:imported-modules (,@%gnu-build-system-modules | |
2294 | (guix build python-build-system)) | |
2295 | #:phases | |
2296 | (modify-phases %standard-phases | |
2297 | (replace 'configure | |
2298 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
bc64d955 | 2299 | (let ((shell (search-input-file inputs "/bin/bash"))) |
9fce5914 GLV |
2300 | (setenv "SHELL" shell) |
2301 | (setenv "CONFIG_SHELL" shell) | |
2302 | (setenv "LDFLAGS" (string-append "-Wl,-rpath -Wl," | |
2303 | (assoc-ref outputs "out") | |
2304 | "/" ,grassxx "/lib"))) | |
2305 | (invoke "./configure" | |
2306 | (string-append "--prefix=" | |
2307 | (assoc-ref outputs "out")) | |
2308 | "--with-blas" | |
2309 | "--with-bzlib" | |
2310 | (string-append "--with-freetype-includes=" | |
2311 | (assoc-ref inputs "freetype") | |
2312 | "/include/freetype2") | |
2313 | (string-append "--with-freetype-libs=" | |
2314 | (assoc-ref inputs "freetype") | |
2315 | "/lib") | |
2316 | "--with-geos" | |
2317 | "--with-lapack" | |
2318 | "--with-mysql" | |
2319 | (string-append "--with-mysql-includes=" | |
2320 | (assoc-ref inputs "mariadb-dev") | |
2321 | "/include/mysql") | |
2322 | (string-append "--with-mysql-libs=" | |
2323 | (assoc-ref inputs "mariadb-lib") | |
2324 | "/lib") | |
2325 | "--with-netcdf" | |
2326 | "--with-postgres" | |
2327 | (string-append "--with-proj-share=" | |
552fde3b | 2328 | (assoc-ref inputs "proj") |
9fce5914 GLV |
2329 | "/share/proj") |
2330 | "--with-pthread" | |
2331 | "--with-readline" | |
2332 | "--with-sqlite" | |
2333 | "--with-wxwidgets"))) | |
2334 | (add-after 'install 'install-links | |
2335 | (lambda* (#:key outputs #:allow-other-keys) | |
2336 | ;; Put links for includes and libraries in the standard places. | |
2337 | (let* ((out (assoc-ref outputs "out")) | |
2338 | (dir (string-append out "/" ,grassxx))) | |
2339 | (symlink (string-append dir "/include") | |
2340 | (string-append out "/include")) | |
2341 | (symlink (string-append dir "/lib") | |
2342 | (string-append out "/lib"))) | |
2343 | #t)) | |
6c03d15d TGR |
2344 | (add-after 'install-links 'python:wrap |
2345 | (assoc-ref python:%standard-phases 'wrap)) | |
2346 | (add-after 'python:wrap 'wrap-with-python-interpreter | |
2347 | (lambda* (#:key outputs #:allow-other-keys) | |
2348 | (let ((out (assoc-ref outputs "out"))) | |
2349 | (wrap-program (string-append out "/bin/" ,grassxx) | |
2350 | `("GRASS_PYTHON" = (,(which "python3")))) | |
2351 | #t)))))) | |
9fce5914 GLV |
2352 | (synopsis "GRASS Geographic Information System") |
2353 | (description | |
2354 | "GRASS (Geographic Resources Analysis Support System), is a Geographic | |
2355 | Information System (GIS) software suite used for geospatial data management and | |
2356 | analysis, image processing, graphics and maps production, spatial modeling, and | |
2357 | visualization.") | |
2358 | (home-page "https://grass.osgeo.org/") | |
2359 | (license license:gpl2+)))) | |
f7ac2fe1 GLV |
2360 | |
2361 | (define-public saga | |
2362 | (package | |
2363 | (name "saga") | |
4f5babf9 | 2364 | (version "8.2.1") |
f7ac2fe1 GLV |
2365 | (source |
2366 | (origin | |
2367 | (method url-fetch) | |
2368 | (uri (string-append "mirror://sourceforge/saga-gis/SAGA%20-%20" | |
2369 | (version-major version) "/SAGA%20-%20" version | |
2370 | "/saga-" version ".tar.gz")) | |
2371 | (sha256 | |
229425fa PP |
2372 | (base32 "008izjs6gvj09abxf16ssl1xy0ay3ljq4jswbggp6wiiq459minv")) |
2373 | (modules '((guix build utils))) | |
2374 | (snippet | |
2375 | '(substitute* "saga-gis/src/tools/docs/docs_pdf/doc_pdf.cpp" | |
2376 | (("^#include <hpdf\\.h>\n" all) | |
2377 | (string-append all "#include <hpdf_version.h>\n")) | |
2378 | (("\\bHPDF_PROJECTING_SCUARE_END\\b") | |
2379 | "HPDF_PROJECTING_SQUARE_END"))))) | |
4f5babf9 | 2380 | (build-system cmake-build-system) |
f7ac2fe1 | 2381 | (native-inputs |
8394619b | 2382 | (list pkg-config swig)) |
f7ac2fe1 | 2383 | (inputs |
8394619b LC |
2384 | (list curl |
2385 | fftw | |
2386 | gdal | |
2387 | hdf5 | |
2388 | jasper | |
2389 | libharu | |
2390 | libtiff | |
2391 | opencv | |
2392 | postgresql | |
2393 | proj | |
2394 | python | |
2395 | qhull | |
2396 | unixodbc | |
2397 | vigra | |
2398 | wxwidgets)) | |
f7ac2fe1 | 2399 | (arguments |
4f5babf9 FG |
2400 | '(#:tests? #f |
2401 | #:phases | |
2402 | (modify-phases %standard-phases | |
2403 | (add-before 'configure 'cd-to-source-dir | |
2404 | (lambda _ | |
2405 | (chdir "saga-gis")))))) | |
f7ac2fe1 GLV |
2406 | (synopsis "System for Automated Geoscientific Analyses") |
2407 | (description | |
2408 | "SAGA (System for Automated Geoscientific Analyses) is a Geographic | |
2409 | Information System (GIS) software. It has been designed for an easy and | |
2410 | effective implementation of spatial algorithms and it offers a comprehensive, | |
2411 | growing set of geoscientific methods.") | |
2412 | (home-page "http://www.saga-gis.org") | |
2413 | (license (list license:gpl2+ license:lgpl2.1+)))) | |
151f3d41 GLV |
2414 | |
2415 | (define-public qgis | |
2416 | (package | |
2417 | (name "qgis") | |
db2cd421 | 2418 | (version "3.26.2") |
151f3d41 GLV |
2419 | (source |
2420 | (origin | |
2421 | (method url-fetch) | |
2422 | (uri (string-append "https://qgis.org/downloads/qgis-" | |
2423 | version ".tar.bz2")) | |
2424 | (sha256 | |
db2cd421 | 2425 | (base32 "1hsq3wchsf7db7134fgg9xzzap35q1s4r6649d0krbw80xw5asca")))) |
151f3d41 GLV |
2426 | (build-system cmake-build-system) |
2427 | (arguments | |
2428 | `(#:modules ((guix build cmake-build-system) | |
2429 | ((guix build python-build-system) #:prefix python:) | |
2430 | (guix build qt-utils) | |
2431 | (guix build utils)) | |
2432 | #:imported-modules (,@%cmake-build-system-modules | |
2433 | (guix build python-build-system) | |
2434 | (guix build qt-utils)) | |
4235c6ee LF |
2435 | #:configure-flags |
2436 | '("-DWITH_QTWEBKIT=NO") | |
151f3d41 GLV |
2437 | #:phases |
2438 | (modify-phases %standard-phases | |
2439 | ;; Configure correct path to PyQt5 SIP directory | |
2440 | (add-after 'unpack 'configure-pyqt5-sip-path | |
2441 | (lambda* (#:key inputs #:allow-other-keys) | |
4cd8bab7 GLV |
2442 | (substitute* "cmake/FindPyQt5.py" |
2443 | (("sip_dir = cfg.default_sip_dir") | |
2444 | (string-append "sip_dir = \"" | |
2445 | (assoc-ref inputs "python-pyqt+qscintilla") | |
db2cd421 | 2446 | "/share/sip\""))) |
c990604c BT |
2447 | ;; Fix building with python-sip@5. |
2448 | ;; | |
2449 | ;; The reason for this is that python-sip@5 introduces some | |
2450 | ;; changes such as a new build system 'sip-build' as well as the | |
2451 | ;; use of the path "/lib/pythonX.X/site-packages/*/bindings/" | |
2452 | ;; instead of "/share/sip/" for .sip files. However, we do not | |
2453 | ;; actually use that those yet. QGIS detects SIP5 and assumes we | |
2454 | ;; are, messing up the build. The long term solution is to fully | |
2455 | ;; upgrade SIP, use sip-build and fix all failing packages, but | |
2456 | ;; for now I just want to get the build working. | |
db2cd421 GLV |
2457 | (substitute* "cmake/FindPyQt5.cmake" |
2458 | (("SET\\(PYQT5_SIP_DIR \"\\$\\{Python_SITEARCH\\}/PyQt5/bindings\"\\)") | |
2459 | (string-append "SET(PYQT5_SIP_DIR \"" | |
c990604c | 2460 | (assoc-ref inputs "python-pyqt+qscintilla") |
db2cd421 GLV |
2461 | "/share/sip\")"))) |
2462 | (substitute* (list "tests/code_layout/test_qt_imports.sh" | |
2463 | "tests/code_layout/test_qgsscrollarea.sh") | |
151f3d41 | 2464 | (("\\$\\(git rev-parse --show-toplevel\\)") |
db2cd421 | 2465 | (getcwd))))) |
151f3d41 | 2466 | (replace 'check |
4235c6ee LF |
2467 | (lambda* (#:key inputs tests? #:allow-other-keys) |
2468 | (when tests? | |
151f3d41 | 2469 | (setenv "HOME" "/tmp") |
07e98fb9 | 2470 | (system "Xvfb :1 &") |
151f3d41 GLV |
2471 | (setenv "DISPLAY" ":1") |
2472 | (setenv "TRAVIS" "true") | |
2473 | (setenv "CTEST_OUTPUT_ON_FAILURE" "1") | |
2474 | (invoke "ctest" | |
2475 | "-E" (string-join | |
2476 | '(;; Disable tests that require network access | |
2477 | "qgis_filedownloader" | |
2478 | ;; TODO: Find why the following tests fail | |
4cd8bab7 GLV |
2479 | "ProcessingQgisAlgorithmsTestPt1" |
2480 | "ProcessingQgisAlgorithmsTestPt2" | |
2481 | "ProcessingQgisAlgorithmsTestPt3" | |
2482 | "ProcessingQgisAlgorithmsTestPt4" | |
db2cd421 GLV |
2483 | "ProcessingGdalAlgorithmsVectorTest" |
2484 | "ProcessingGrass7AlgorithmsImageryTest" | |
2485 | "ProcessingGrass7AlgorithmsRasterTestPt1" | |
2486 | "ProcessingGrass7AlgorithmsRasterTestPt2" | |
2487 | "ProcessingGrass7AlgorithmsVectorTest" | |
2488 | "ProcessingOtbAlgorithmsTest" | |
2489 | "test_core_authmanager" | |
2490 | "test_core_compositionconverter" | |
834162dc | 2491 | "test_core_coordinatereferencesystem" |
db2cd421 GLV |
2492 | "test_core_gdalutils" |
2493 | "test_core_labelingengine" | |
2494 | "test_core_layout" | |
2495 | "test_core_layouthtml" | |
2496 | "test_core_layoutlabel" | |
2497 | "test_core_layoutmultiframe" | |
2498 | "test_core_layoutpicture" | |
2499 | "test_core_legendrenderer" | |
2500 | "test_core_networkaccessmanager" | |
834162dc | 2501 | "test_core_rasterfilewriter" |
db2cd421 GLV |
2502 | "test_core_tiledownloadmanager" |
2503 | "test_gui_dualview" | |
2504 | "test_gui_htmlwidgetwrapper" | |
2505 | "test_gui_filedownloader" | |
2506 | "test_gui_queryresultwidget" | |
2507 | "test_analysis_processingalgspt2" | |
2508 | "test_analysis_processing" | |
2509 | "test_provider_wcsprovider" | |
2510 | "qgis_grassprovidertest7" | |
2511 | "test_app_gpsinformationwidget" | |
151f3d41 | 2512 | "PyQgsAnnotation" |
db2cd421 | 2513 | "PyQgsAttributeTableModel" |
151f3d41 | 2514 | "PyQgsAuthenticationSystem" |
db2cd421 GLV |
2515 | "PyQgsExternalStorageWebDAV" |
2516 | "PyQgsFieldFormattersTest" | |
151f3d41 GLV |
2517 | "PyQgsFileUtils" |
2518 | "PyQgsGeometryTest" | |
db2cd421 GLV |
2519 | "PyQgsGoogleMapsGeocoder" |
2520 | "PyQgsHashLineSymbolLayer" | |
151f3d41 | 2521 | "PyQgsLayoutExporter" |
4cd8bab7 | 2522 | "PyQgsLayoutHtml" |
db2cd421 | 2523 | "PyQgsLineSymbolLayers" |
151f3d41 | 2524 | "PyQgsMapLayer" |
db2cd421 | 2525 | "PyQgsNetworkContentFetcherRegistry" |
151f3d41 | 2526 | "PyQgsOGRProviderGpkg" |
db2cd421 GLV |
2527 | "PyQgsOGRProviderSqlite" |
2528 | "PyQgsPalLabelingCanvas" | |
151f3d41 | 2529 | "PyQgsPalLabelingLayout" |
db2cd421 GLV |
2530 | "PyQgsPalLabelingPlacement" |
2531 | "PyQgsProcessExecutable" | |
151f3d41 | 2532 | "PyQgsProviderConnectionGpkg" |
4cd8bab7 | 2533 | "PyQgsProviderConnectionSpatialite" |
db2cd421 | 2534 | "PyQgsOGRProvider" |
4cd8bab7 | 2535 | "PyQgsSpatialiteProvider" |
151f3d41 | 2536 | "PyQgsVectorFileWriter" |
db2cd421 GLV |
2537 | "PyQgsVectorLayerEditBuffer" |
2538 | "PyQgsVectorLayerEditBufferGroup" | |
2539 | "PyQgsVectorLayerProfileGenerator" | |
151f3d41 GLV |
2540 | "PyQgsVirtualLayerProvider" |
2541 | "PyQgsWFSProvider" | |
db2cd421 GLV |
2542 | "PyQgsWFSProviderGUI" |
2543 | "PyQgsOapifProvider" | |
2544 | "PyQgsLayerDependencies" | |
2545 | "PyQgsDBManagerGpkg" | |
2546 | "PyQgsDBManagerSpatialite" | |
2547 | "PyQgsAuxiliaryStorage" | |
2548 | "PyQgsSelectiveMasking" | |
151f3d41 | 2549 | "qgis_shellcheck" |
4cd8bab7 | 2550 | "qgis_sipify" |
db2cd421 GLV |
2551 | "qgis_sip_include" |
2552 | "qgis_sip_uptodate") | |
4235c6ee | 2553 | "|"))))) |
151f3d41 GLV |
2554 | (add-after 'install 'wrap-python |
2555 | (assoc-ref python:%standard-phases 'wrap)) | |
2556 | (add-after 'wrap-python 'wrap-qt | |
7e24e1e5 HG |
2557 | (lambda* (#:key outputs inputs #:allow-other-keys) |
2558 | (let ((out (assoc-ref outputs "out"))) | |
db2cd421 | 2559 | (wrap-qt-program "qgis" #:output out #:inputs inputs)))) |
5ef1b175 GLV |
2560 | (add-after 'wrap-qt 'wrap-gis |
2561 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
5e686e0a GLV |
2562 | ;; TODO: Find if there is a way to get SAGA to work. |
2563 | ;; Currently QGIS says "version of SAGA not supported". | |
2564 | ;; Disable it for now. | |
5ef1b175 | 2565 | (let* ((out (assoc-ref outputs "out")) |
5e686e0a | 2566 | ;;(saga (string-append (assoc-ref inputs "saga") "/bin")) |
5ef1b175 GLV |
2567 | (grass-version ,(package-version grass)) |
2568 | (grass-majorminor (string-join | |
2569 | (list-head | |
2570 | (string-split grass-version #\.) 2) | |
2571 | "")) | |
2572 | (grass (string-append (assoc-ref inputs "grass") | |
2573 | "/grass" grass-majorminor))) | |
2574 | (wrap-program (string-append out "/bin/qgis") | |
5e686e0a | 2575 | ;;`("PATH" ":" prefix (,saga)) |
5ef1b175 | 2576 | `("QGIS_PREFIX_PATH" = (,out)) |
db2cd421 | 2577 | `("GISBASE" = (,grass))))))))) |
151f3d41 | 2578 | (inputs |
db2cd421 GLV |
2579 | (list bash-minimal |
2580 | exiv2 | |
8394619b LC |
2581 | expat |
2582 | gdal | |
2583 | geos | |
2584 | gpsbabel | |
2585 | grass | |
2586 | gsl | |
2587 | hdf5 | |
2588 | libspatialindex | |
2589 | libspatialite | |
2590 | libxml2 | |
2591 | libzip | |
2592 | netcdf | |
2593 | postgresql | |
2594 | proj | |
2595 | protobuf | |
2596 | python | |
2597 | python-chardet | |
2598 | python-dateutil | |
2599 | python-future | |
2600 | python-gdal | |
2601 | python-jinja2 | |
2602 | python-numpy | |
2603 | python-owslib | |
2604 | python-psycopg2 | |
2605 | python-pygments | |
2606 | python-pyqt+qscintilla | |
2607 | python-pytz | |
2608 | python-pyyaml | |
2609 | python-requests | |
2610 | python-sip | |
2611 | python-six | |
2612 | python-urllib3 | |
2613 | qca | |
2614 | qscintilla | |
2615 | qtbase-5 | |
735d340a | 2616 | qtdeclarative-5 |
8394619b LC |
2617 | qtkeychain |
2618 | qtlocation | |
2619 | qtserialport | |
1ef04fb2 | 2620 | qtsvg-5 |
8394619b | 2621 | qwt |
db2cd421 GLV |
2622 | ;; saga |
2623 | sqlite | |
2624 | (list zstd "lib"))) | |
151f3d41 | 2625 | (native-inputs |
8394619b LC |
2626 | (list bison |
2627 | flex | |
2628 | perl | |
2629 | perl-yaml-tiny | |
2630 | pkg-config | |
2631 | python-mock | |
2632 | python-nose2 | |
db2cd421 | 2633 | python-pyqt-builder |
eef8e2ec | 2634 | qttools-5 |
8394619b LC |
2635 | shellcheck |
2636 | xorg-server-for-tests)) | |
151f3d41 GLV |
2637 | (home-page "https://qgis.org") |
2638 | (synopsis "Geographical information system") | |
2639 | (description "QGIS is an easy to use Geographical Information | |
2640 | System (GIS). It is a GIS data viewer and editor. QGIS supports a number of | |
2641 | raster and vector data formats, with new support easily added using the plugin | |
2642 | architecture.") | |
2643 | (license | |
2644 | (list | |
2645 | license:asl1.1 | |
2646 | license:asl2.0 | |
2647 | license:bsd-2 | |
2648 | license:bsd-3 | |
2649 | license:boost1.0 | |
2650 | license:cc-by3.0 | |
2651 | license:cc-by4.0 | |
2652 | license:cc-by-sa3.0 | |
2653 | license:cc-by-sa4.0 | |
2654 | (license:fsdg-compatible "https://www.deviantart.com/elvensword") | |
2655 | (license:fsf-free "file://debian/copyright" "Go Squared") | |
2656 | license:expat | |
2657 | license:fdl1.2+ | |
2658 | (license:fsf-free | |
2659 | "https://www.deviantart.com/webgoddess/art/Reddish-Inspired-Gradients-42208824") | |
2660 | (license:fsf-free | |
2661 | "file://debian/copyright" | |
2662 | "QT-Commercial or LGPL-2.1 with Digia Qt LGPL Exception 1.1 or GPL-3") | |
2663 | license:gpl2 | |
2664 | license:gpl2+ | |
2665 | license:gpl3 | |
2666 | license:gpl3+ | |
2667 | license:isc | |
2668 | license:lgpl2.0+ | |
2669 | license:lgpl2.1 | |
2670 | license:lgpl2.1+ | |
2671 | license:lgpl3 | |
2672 | (license:non-copyleft "file://debian/copyright" "BSD-like-gist") | |
2673 | (license:non-copyleft "file://debian/copyright" "Jim Mossman Attribution") | |
2674 | (license:non-copyleft | |
2675 | "https://www.ncl.ucar.edu/Download/NCL_source_license.shtml" | |
2676 | "NCL Source Code License") | |
2677 | license:ogl-psi1.0 | |
2678 | license:opl1.0+ | |
2679 | license:public-domain | |
2680 | license:qwt1.0)))) | |
ff1233d8 EF |
2681 | |
2682 | (define-public python-geographiclib | |
2683 | (package | |
2684 | (name "python-geographiclib") | |
2685 | (version "1.50") | |
2686 | (source | |
2687 | (origin | |
2688 | (method url-fetch) | |
2689 | (uri (pypi-uri "geographiclib" version)) | |
2690 | (sha256 | |
2691 | (base32 | |
2692 | "0cn6ap5fkh3mkfa57l5b44z3gvz7j6lpmc9rl4g2jny2gvp4dg8j")))) | |
2693 | (build-system python-build-system) | |
2694 | (home-page "https://geographiclib.sourceforge.io/1.50/python/") | |
2695 | (synopsis "Python geodesic routines from GeographicLib") | |
2696 | (description | |
2697 | "This is a python implementation of the geodesic routines in GeographicLib.") | |
2698 | (license license:expat))) | |
481b0923 EF |
2699 | |
2700 | (define-public python-geopy | |
2701 | (package | |
2702 | (name "python-geopy") | |
2703 | (version "2.0.0") | |
2704 | (source | |
2705 | (origin | |
2706 | (method url-fetch) | |
2707 | (uri (pypi-uri "geopy" version)) | |
2708 | (sha256 | |
2709 | (base32 | |
2710 | "0fx0cv0kgbvynpmjgsvq2fpsyngd5idiscdn8pd5201f1ngii3mq")))) | |
2711 | (build-system python-build-system) | |
2712 | (propagated-inputs | |
8394619b | 2713 | (list python-geographiclib)) |
481b0923 | 2714 | (native-inputs |
8394619b LC |
2715 | (list python-async-generator |
2716 | python-coverage | |
2717 | python-flake8 | |
2718 | python-isort | |
2719 | python-pytest | |
2720 | python-pytest-aiohttp | |
2721 | python-readme-renderer | |
2722 | python-pytz)) | |
481b0923 EF |
2723 | (home-page "https://github.com/geopy/geopy") |
2724 | (synopsis "Geocoding library for Python") | |
2725 | (description "@code{geopy} is a Python client for several popular geocoding | |
2726 | web services. @code{geopy} makes it easy for Python developers to locate the | |
2727 | coordinates of addresses, cities, countries, and landmarks across the globe | |
2728 | using third-party geocoders and other data sources.") | |
2729 | (license license:expat))) | |
769326cf | 2730 | |
08326f3d JL |
2731 | (define-public gplates |
2732 | (package | |
2733 | (name "gplates") | |
9f1713f2 MB |
2734 | ;; Note: use a pre-release to cope with newer Boost, ref |
2735 | ;; https://discourse.gplates.org/t/compilation-error-with-boost-1-77/452/3 | |
2736 | (version "2.3.01-beta.3") | |
08326f3d JL |
2737 | (source (origin |
2738 | (method url-fetch) | |
9f1713f2 MB |
2739 | (uri "https://cloudstor.aarnet.edu.au/plus/s\ |
2740 | /ojsYNOyUYE3evNp/download?path=%2F&files=gplates_2.3.1-beta.3_src.zip") | |
2741 | (file-name (string-append name "-" version ".zip")) | |
08326f3d JL |
2742 | (sha256 |
2743 | (base32 | |
9f1713f2 | 2744 | "06i87dfab0cq9gdi5mh6sf9wigawpp0d05zbyslv910443i26gwv")))) |
08326f3d JL |
2745 | (build-system cmake-build-system) |
2746 | (arguments | |
2747 | `(#:configure-flags (list "-DBoost_NO_BOOST_CMAKE=ON") | |
9f1713f2 MB |
2748 | #:tests? #f)) ;no test target |
2749 | (native-inputs | |
2750 | (list unzip)) ;for the beta | |
08326f3d | 2751 | (inputs |
9f1713f2 MB |
2752 | (list boost |
2753 | cgal | |
59c6e235 | 2754 | curl |
9f1713f2 MB |
2755 | gdal |
2756 | glew | |
2757 | glu | |
2758 | gmp | |
2759 | mesa | |
2760 | mpfr | |
2761 | proj | |
2762 | python-3 | |
2763 | python-numpy | |
2764 | qtbase-5 | |
1ef04fb2 | 2765 | qtsvg-5 |
9f1713f2 MB |
2766 | qtxmlpatterns |
2767 | qwt | |
2768 | zlib)) | |
08326f3d JL |
2769 | (home-page "https://www.gplates.org") |
2770 | (synopsis "Plate tectonics simulation program") | |
2771 | (description "GPlates is a plate tectonics program. Manipulate | |
2772 | reconstructions of geological and paleogeographic features through geological | |
2773 | time. Interactively visualize vector, raster and volume data.") | |
2774 | (license license:gpl2+))) |