1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2014, 2015 Ludovic Courtès <ludo@gnu.org>
3 ;;; Copyright © 2016, 2017, 2018, 2019 Efraim Flashner <efraim@flashner.co.il>
4 ;;; Copyright © 2018, 2019 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>
9 ;;; This file is part of GNU Guix.
11 ;;; GNU Guix is free software; you can redistribute it and/or modify it
12 ;;; under the terms of the GNU General Public License as published by
13 ;;; the Free Software Foundation; either version 3 of the License, or (at
14 ;;; your option) any later version.
16 ;;; GNU Guix is distributed in the hope that it will be useful, but
17 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
18 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 ;;; GNU General Public License for more details.
21 ;;; You should have received a copy of the GNU General Public License
22 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
24 (define-module (gnu packages gps)
25 #:use-module (guix packages)
26 #:use-module (guix download)
27 #:use-module (guix git-download)
28 #:use-module (guix build-system gnu)
29 #:use-module (guix build-system scons)
30 #:use-module ((guix licenses) #:prefix license:)
31 #:use-module (guix utils)
32 #:use-module (gnu packages)
33 #:use-module (gnu packages algebra)
34 #:use-module (gnu packages base)
35 #:use-module (gnu packages compression)
36 #:use-module (gnu packages docbook)
37 #:use-module (gnu packages glib)
38 #:use-module (gnu packages gtk)
39 #:use-module (gnu packages image)
40 #:use-module (gnu packages libusb)
41 #:use-module (gnu packages linux)
42 #:use-module (gnu packages ncurses)
43 #:use-module (gnu packages pkg-config)
44 #:use-module (gnu packages python)
45 #:use-module (gnu packages python-xyz)
46 #:use-module (gnu packages qt)
47 #:use-module (gnu packages sqlite)
48 #:use-module (gnu packages xml))
50 (define-public gpsbabel
56 ;; XXX: Downloads from gpsbabel.org are hidden behind a POST, so
57 ;; get it from elsewhere.
59 "mirror://debian/pool/main/g/gpsbabel/gpsbabel_"
60 version ".orig.tar.gz"))
63 "19hykxhyl567gf8qcrl33qhv95w0g4vxw9r3h9b8d8plx9bnaf8l"))
64 (patches (search-patches
65 "gpsbabel-minizip.patch"
66 ;; XXX: Remove this patch on the next release.
67 "gpsbabel-qstring.patch"))
68 (modules '((guix build utils)))
71 ;; Delete files under GPL-compatible licences but never used
72 ;; on GNU systems, rather than bloating the LICENSE field.
73 (delete-file "gui/serial_mac.cc") ; Apple MIT
74 (delete-file "mingw/include/ddk/hidsdi.h") ; public domain
76 (build-system gnu-build-system)
77 ;; TODO: "make doc" requires Docbook & co.
80 '("--with-zlib=system")
81 ;; On i686, 'raymarine.test' fails because of a rounding error:
82 ;; <http://hydra.gnu.org/build/133040>. As a workaround, disable tests
83 ;; on these platforms.
84 ;; FIXME: On x86_64 with -std=gnu++11 tests also fail due to rounding
94 ("libxml2" ,libxml2))) ;'xmllint' needed for the KML tests
95 (home-page "https://www.gpsbabel.org/")
96 (synopsis "Convert and exchange data with GPS and map programs")
98 "GPSBabel converts waypoints, tracks, and routes between hundreds of
99 popular GPS receivers and mapping programs. It contains extensive data
100 manipulation abilities making it a convenient for server-side processing or as
101 the back-end for other tools. It does not convert, transfer, send, or
103 (license (list license:expat ; shapelib/*.[ch]
104 license:gpl2+)))) ; everything else
106 (define-public gpscorrelate
107 ;; This program is "lightly maintained", so to speak, so we end up taking it
108 ;; directly from its Git repo.
109 (let ((commit "365f6e1b3f"))
111 (name "gpscorrelate")
112 (version (string-append "1.6.1." commit))
116 (url "https://github.com/dfandrich/gpscorrelate")
118 (file-name (git-file-name name version))
121 "006a6l8p38a4h7y2959sqrmjjn29d8pd50zj9nypcp5ph18nybjb"))))
122 (build-system gnu-build-system)
125 (modify-phases %standard-phases
127 (lambda* (#:key inputs outputs #:allow-other-keys)
128 ;; This is a rudimentary build system.
129 (substitute* "Makefile"
130 (("prefix[[:blank:]]*=.*$")
131 (string-append "prefix = " (assoc-ref outputs "out")
140 `(("pkg-config" ,pkg-config)
141 ("docbook-xml" ,docbook-xml)
142 ("docbook-xsl" ,docbook-xsl)
143 ("libxslt" ,libxslt)))
144 (home-page "https://dfandrich.github.io/gpscorrelate/")
145 (synopsis "GPS photo correlation tool to geo-localize images")
147 "GPS Correlate is a program to match a recorded GPS track with the EXIF
148 tags in digital camera photos, and update the EXIF tags with the location that
149 the photo was taken. It does this by using the timestamp in the photo and
150 finding a data point in the GPS track that matches, or interpolating a point
151 between two other data points.")
152 (license license:gpl2+))))
161 (uri (string-append "mirror://gnu/gama/gama-"
165 "0nmc6mkd55nryfffq5k9c09dhkbq6bfs06af8ammhbh5jzdn3s36"))))
166 (build-system gnu-build-system)
167 (arguments '(#:parallel-tests? #f)) ; race condition
169 `(("libxml2" ,libxml2)))
173 (home-page "https://www.gnu.org/software/gama")
174 (synopsis "Adjustment of geodetic networks")
176 "GNU Gama is a program for the adjustment of geodetic networks. It is
177 useful in measurements where Global Positioning System (GPS) is not available,
178 such as underground. It features the ability to adjust in local Cartesian
179 coordinates as well as partial support for adjustments in global coordinate systems.")
180 (license license:gpl3+)))
182 (define-public gpxsee
189 (url "https://github.com/tumic0/GPXSee")
191 (file-name (git-file-name name version))
194 "0lml3hz2zxljl9j5wnh7bn9bj8k9v3wf6bk3g77x9nnarsmw0fcx"))))
195 (build-system gnu-build-system)
198 (modify-phases %standard-phases
200 ;; Use lrelease to convert TS translation files into QM files.
201 (lambda* (#:key inputs outputs #:allow-other-keys)
202 (for-each (lambda (file)
203 (invoke "lrelease" file))
204 (find-files "lang" "\\.ts"))
206 (string-append "PREFIX="
207 (assoc-ref outputs "out"))))))))
209 `(("qtbase" ,qtbase)))
211 `(("qttools" ,qttools)))
212 (home-page "https://www.gpxsee.org")
213 (synopsis "GPS log file viewer and analyzer")
215 "GPXSee is a Qt-based GPS log file viewer and analyzer that supports all
216 common GPS log file formats. It can display multiple tracks on various on-
217 and off-line maps. You can easily add more maps and graph other captured data
218 such as elevation, speed, heart rate, power, temperature, and gear shifts.")
219 (license license:gpl3)))
228 (uri (string-append "https://download-mirror.savannah.gnu.org"
229 "/releases/gpsd/gpsd-" version ".tar.gz"))
231 (base32 "0l2yz0yw9sil82lh2l4swkkldgmhzhv588n5lcavib4f0q2phahp"))))
232 (build-system scons-build-system)
235 ("pkg-config" ,pkg-config)))
244 ("python-pycairo" ,python-pycairo)
245 ("python-pygobject" ,python-pygobject)
246 ("python-pyserial" ,python-pyserial)
247 ("python-wrapper" ,python-wrapper)
251 (list (string-append "prefix=" %output)
252 (let ((version ,(version-major+minor (package-version python))))
253 (string-append "python_libdir=" %output
254 "/lib/python" version
258 (modify-phases %standard-phases
259 (add-after 'unpack 'fix-build
260 (lambda* (#:key outputs #:allow-other-keys)
261 (substitute* "SConstruct"
263 "envs = os.environ"))
265 (add-after 'install 'wrap-python-scripts
266 (lambda* (#:key inputs outputs #:allow-other-keys)
267 (let* ((out (assoc-ref outputs "out"))
268 (pycairo (assoc-ref inputs "python-pycairo"))
269 (pygobject (assoc-ref inputs "python-pygobject"))
270 (pyserial (assoc-ref inputs "python-pyserial"))
271 (sitedir (lambda (package)
272 (string-append package
274 ,(version-major+minor
275 (package-version python))
277 (pythonpath (string-join (map sitedir
278 (list out pycairo pygobject
281 (for-each (lambda (script)
282 (wrap-program (string-append out "/bin/" script)
283 `("PYTHONPATH" ":" prefix (,pythonpath))))
284 '("gegps" "gpscat" "gpsfake" "gpsprof"
285 "ubxtool" "xgps" "xgpsspeed" "zerk")))
287 (synopsis "GPS service daemon")
289 "@code{gpsd} is a service daemon that monitors one or more GPSes or AIS
290 receivers attached to a host computer through serial or USB ports, making all
291 data on the location/course/velocity of the sensors available to be queried on
292 TCP port 2947 of the host computer.")
293 (home-page "https://gpsd.gitlab.io/gpsd/")
294 (license license:bsd-2)))