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