1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2014, 2015 Ludovic Courtès <ludo@gnu.org>
3 ;;; Copyright © 2016, 2017, 2018, 2019, 2020 Efraim Flashner <efraim@flashner.co.il>
4 ;;; Copyright © 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
5 ;;; Copyright © 2018 Mathieu Othacehe <m.othacehe@gmail.com>
6 ;;; Copyright © 2020 Guillaume Le Vaillant <glv@posteo.net>
7 ;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com>
8 ;;; Copyright © 2020 Marius Bakke <marius@gnu.org>
10 ;;; This file is part of GNU Guix.
12 ;;; GNU Guix is free software; you can redistribute it and/or modify it
13 ;;; under the terms of the GNU General Public License as published by
14 ;;; the Free Software Foundation; either version 3 of the License, or (at
15 ;;; your option) any later version.
17 ;;; GNU Guix is distributed in the hope that it will be useful, but
18 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
19 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 ;;; GNU General Public License for more details.
22 ;;; You should have received a copy of the GNU General Public License
23 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
25 (define-module (gnu packages gps)
26 #:use-module (guix packages)
27 #:use-module (guix download)
28 #:use-module (guix git-download)
29 #:use-module (guix build-system gnu)
30 #:use-module (guix build-system scons)
31 #:use-module ((guix licenses) #:prefix license:)
32 #:use-module (guix utils)
33 #:use-module (gnu packages)
34 #:use-module (gnu packages algebra)
35 #:use-module (gnu packages base)
36 #:use-module (gnu packages compression)
37 #:use-module (gnu packages docbook)
38 #:use-module (gnu packages glib)
39 #:use-module (gnu packages gtk)
40 #:use-module (gnu packages image)
41 #:use-module (gnu packages libusb)
42 #:use-module (gnu packages linux)
43 #:use-module (gnu packages ncurses)
44 #:use-module (gnu packages pkg-config)
45 #:use-module (gnu packages python)
46 #:use-module (gnu packages python-xyz)
47 #:use-module (gnu packages qt)
48 #:use-module (gnu packages sqlite)
49 #:use-module (gnu packages xml))
51 (define-public gpsbabel
57 ;; XXX: Downloads from gpsbabel.org are hidden behind a POST, so
58 ;; get it from elsewhere.
60 "mirror://debian/pool/main/g/gpsbabel/gpsbabel_"
61 version ".orig.tar.gz"))
64 "19hykxhyl567gf8qcrl33qhv95w0g4vxw9r3h9b8d8plx9bnaf8l"))
65 (patches (search-patches
66 "gpsbabel-minizip.patch"
67 ;; XXX: Remove this patch on the next release.
68 "gpsbabel-qstring.patch"))
69 (modules '((guix build utils)))
72 ;; Delete files under GPL-compatible licences but never used
73 ;; on GNU systems, rather than bloating the LICENSE field.
74 (delete-file "gui/serial_mac.cc") ; Apple MIT
75 (delete-file "mingw/include/ddk/hidsdi.h") ; public domain
77 (build-system gnu-build-system)
78 ;; TODO: "make doc" requires Docbook & co.
81 '("--with-zlib=system")
82 ;; On i686, 'raymarine.test' fails because of a rounding error:
83 ;; <http://hydra.gnu.org/build/133040>. As a workaround, disable tests
84 ;; on these platforms.
85 ;; FIXME: On x86_64 with -std=gnu++11 tests also fail due to rounding
95 ("libxml2" ,libxml2))) ;'xmllint' needed for the KML tests
96 (home-page "https://www.gpsbabel.org/")
97 (synopsis "Convert and exchange data with GPS and map programs")
99 "GPSBabel converts waypoints, tracks, and routes between hundreds of
100 popular GPS receivers and mapping programs. It contains extensive data
101 manipulation abilities making it a convenient for server-side processing or as
102 the back-end for other tools. It does not convert, transfer, send, or
104 (license (list license:expat ; shapelib/*.[ch]
105 license:gpl2+)))) ; everything else
107 (define-public gpscorrelate
109 (name "gpscorrelate")
114 (url "https://github.com/dfandrich/gpscorrelate")
116 (file-name (git-file-name name version))
119 "1kvybhfnygz79q3pgwc1q2x4ccmnsfscx2hzxnmzjbnc6arnqari"))))
120 (build-system gnu-build-system)
123 (modify-phases %standard-phases
125 (lambda* (#:key inputs outputs #:allow-other-keys)
126 ;; This is a rudimentary build system.
127 (substitute* "Makefile"
128 (("prefix[[:blank:]]*=.*$")
129 (string-append "prefix = " (assoc-ref outputs "out")
137 `(("pkg-config" ,pkg-config)
138 ("docbook-xml" ,docbook-xml)
139 ("docbook-xsl" ,docbook-xsl)
140 ("libxslt" ,libxslt)))
141 (home-page "https://dfandrich.github.io/gpscorrelate/")
142 (synopsis "GPS photo correlation tool to geo-localize images")
144 "GPS Correlate is a program to match a recorded GPS track with the EXIF
145 tags in digital camera photos, and update the EXIF tags with the location that
146 the photo was taken. It does this by using the timestamp in the photo and
147 finding a data point in the GPS track that matches, or interpolating a point
148 between two other data points.")
149 (license license:gpl2+)))
158 (uri (string-append "mirror://gnu/gama/gama-"
162 "0c1b28frl6109arj09v4zr1xs859krn8871mkvis517g5pb55dc9"))))
163 (build-system gnu-build-system)
164 (arguments '(#:parallel-tests? #f)) ; race condition
166 `(("libxml2" ,libxml2)))
170 (home-page "https://www.gnu.org/software/gama")
171 (synopsis "Adjustment of geodetic networks")
173 "GNU Gama is a program for the adjustment of geodetic networks. It is
174 useful in measurements where Global Positioning System (GPS) is not available,
175 such as underground. It features the ability to adjust in local Cartesian
176 coordinates as well as partial support for adjustments in global coordinate systems.")
177 (license license:gpl3+)))
179 (define-public gpxsee
186 (url "https://github.com/tumic0/GPXSee")
188 (file-name (git-file-name name version))
191 "09gajwqc30r9a2sn972qdx3gx0gki9n0zafq986hn6zsr3z43mfs"))))
192 (build-system gnu-build-system)
195 (modify-phases %standard-phases
197 ;; Use lrelease to convert TS translation files into QM files.
198 (lambda* (#:key inputs outputs #:allow-other-keys)
199 (for-each (lambda (file)
200 (invoke "lrelease" file))
201 (find-files "lang" "\\.ts"))
203 (string-append "PREFIX="
204 (assoc-ref outputs "out"))))))))
206 `(("qtbase" ,qtbase)))
208 `(("qttools" ,qttools)))
209 (home-page "https://www.gpxsee.org")
210 (synopsis "GPS log file viewer and analyzer")
212 "GPXSee is a Qt-based GPS log file viewer and analyzer that supports all
213 common GPS log file formats. It can display multiple tracks on various on-
214 and off-line maps. You can easily add more maps and graph other captured data
215 such as elevation, speed, heart rate, power, temperature, and gear shifts.")
216 (license license:gpl3)))
225 (uri (string-append "https://download-mirror.savannah.gnu.org"
226 "/releases/gpsd/gpsd-" version ".tar.gz"))
228 (base32 "14gyqrbrq6jz4y6x59rdpv9d4c3pbn0vh1blq3iwrc6kz0x4ql35"))))
229 (build-system scons-build-system)
232 ("pkg-config" ,pkg-config)))
241 ("python-pycairo" ,python-pycairo)
242 ("python-pygobject" ,python-pygobject)
243 ("python-pyserial" ,python-pyserial)
244 ("python-wrapper" ,python-wrapper)
248 (list (string-append "prefix=" %output)
249 (let ((version ,(version-major+minor (package-version python))))
250 (string-append "python_libdir=" %output
251 "/lib/python" version
255 (modify-phases %standard-phases
256 (add-after 'unpack 'fix-build
257 (lambda* (#:key outputs #:allow-other-keys)
258 (substitute* "SConstruct"
260 "envs = os.environ"))
262 (add-after 'install 'wrap-python-scripts
263 (lambda* (#:key inputs outputs #:allow-other-keys)
264 (let* ((out (assoc-ref outputs "out"))
265 (pycairo (assoc-ref inputs "python-pycairo"))
266 (pygobject (assoc-ref inputs "python-pygobject"))
267 (pyserial (assoc-ref inputs "python-pyserial"))
268 (sitedir (lambda (package)
269 (string-append package
271 ,(version-major+minor
272 (package-version python))
274 (pythonpath (string-join (map sitedir
275 (list out pycairo pygobject
278 (for-each (lambda (script)
279 (wrap-program (string-append out "/bin/" script)
280 `("PYTHONPATH" ":" prefix (,pythonpath))))
281 '("gegps" "gpscat" "gpsfake" "gpsprof"
282 "ubxtool" "xgps" "xgpsspeed" "zerk")))
284 (synopsis "GPS service daemon")
286 "@code{gpsd} is a service daemon that monitors one or more GPSes or AIS
287 receivers attached to a host computer through serial or USB ports, making all
288 data on the location/course/velocity of the sensors available to be queried on
289 TCP port 2947 of the host computer.")
290 (home-page "https://gpsd.gitlab.io/gpsd/")
291 (license license:bsd-2)))