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, 2021 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>
9 ;;; Copyright © 2021 Björn Höfling <bjoern.hoefling@bjoernhoefling.de>
10 ;;; Copyright © 2021 Efraim Flashner <efraim@flashner.co.il>
12 ;;; This file is part of GNU Guix.
14 ;;; GNU Guix is free software; you can redistribute it and/or modify it
15 ;;; under the terms of the GNU General Public License as published by
16 ;;; the Free Software Foundation; either version 3 of the License, or (at
17 ;;; your option) any later version.
19 ;;; GNU Guix is distributed in the hope that it will be useful, but
20 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
21 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 ;;; GNU General Public License for more details.
24 ;;; You should have received a copy of the GNU General Public License
25 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
27 (define-module (gnu packages gps)
28 #:use-module (guix packages)
29 #:use-module (guix download)
30 #:use-module (guix git-download)
31 #:use-module (guix build-system gnu)
32 #:use-module (guix build-system scons)
33 #:use-module ((guix licenses) #:prefix license:)
34 #:use-module (guix utils)
35 #:use-module (gnu packages)
36 #:use-module (gnu packages algebra)
37 #:use-module (gnu packages base)
38 #:use-module (gnu packages compression)
39 #:use-module (gnu packages docbook)
40 #:use-module (gnu packages glib)
41 #:use-module (gnu packages gtk)
42 #:use-module (gnu packages image)
43 #:use-module (gnu packages libusb)
44 #:use-module (gnu packages linux)
45 #:use-module (gnu packages ncurses)
46 #:use-module (gnu packages pkg-config)
47 #:use-module (gnu packages python)
48 #:use-module (gnu packages python-xyz)
49 #:use-module (gnu packages qt)
50 #:use-module (gnu packages sqlite)
51 #:use-module (gnu packages xml))
53 (define-public gpsbabel
60 (url "https://github.com/gpsbabel/gpsbabel")
61 (commit (string-append
63 (string-replace-substring version "." "_")))))
64 (file-name (git-file-name name version))
67 "010g0vd2f5knpq5p7qfnl31kv3r8m5sjdsafcinbj5gh02j2nzpy"))
68 (patches (search-patches "gpsbabel-fix-i686-test.patch"))
69 (modules '((guix build utils)))
72 (delete-file-recursively "zlib")
73 (substitute* "Makefile.in"
74 ((" zlib/z.*\\.h") ""))
75 ;; Delete files under GPL-compatible licences but never used
76 ;; on GNU systems, rather than bloating the LICENSE field.
77 (delete-file "gui/serial_mac.cc") ; Apple MIT
78 (delete-file "mingw/include/ddk/hidsdi.h") ; public domain
80 (build-system gnu-build-system)
81 ;; TODO: "make doc" requires Docbook & co.
84 '("--with-zlib=system")))
93 ("libxml2" ,libxml2))) ;'xmllint' needed for the KML tests
94 (home-page "https://www.gpsbabel.org/")
95 (synopsis "Convert and exchange data with GPS and map programs")
97 "GPSBabel converts waypoints, tracks, and routes between hundreds of
98 popular GPS receivers and mapping programs. It contains extensive data
99 manipulation abilities making it a convenient for server-side processing or as
100 the back-end for other tools. It does not convert, transfer, send, or
102 (license (list license:expat ; shapelib/*.[ch]
103 license:gpl2+)))) ; everything else
105 (define-public gpscorrelate
107 (name "gpscorrelate")
112 (url "https://github.com/dfandrich/gpscorrelate")
114 (file-name (git-file-name name version))
117 "1kvybhfnygz79q3pgwc1q2x4ccmnsfscx2hzxnmzjbnc6arnqari"))))
118 (build-system gnu-build-system)
121 (modify-phases %standard-phases
123 (lambda* (#:key inputs outputs #:allow-other-keys)
124 ;; This is a rudimentary build system.
125 (substitute* "Makefile"
126 (("prefix[[:blank:]]*=.*$")
127 (string-append "prefix = " (assoc-ref outputs "out")
135 `(("pkg-config" ,pkg-config)
136 ("docbook-xml" ,docbook-xml)
137 ("docbook-xsl" ,docbook-xsl)
138 ("libxslt" ,libxslt)))
139 (home-page "https://dfandrich.github.io/gpscorrelate/")
140 (synopsis "GPS photo correlation tool to geo-localize images")
142 "GPS Correlate is a program to match a recorded GPS track with the EXIF
143 tags in digital camera photos, and update the EXIF tags with the location that
144 the photo was taken. It does this by using the timestamp in the photo and
145 finding a data point in the GPS track that matches, or interpolating a point
146 between two other data points.")
147 (license license:gpl2+)))
156 (uri (string-append "mirror://gnu/gama/gama-"
160 "04mhbgpqbynnmm8ww4k2yk1w2j66c276dns9xwn8cvrq58kjimln"))
161 (modules '((guix build utils)))
164 (delete-file-recursively "lib/expat")
165 (for-each delete-file (find-files "doc/fig" "\\.pdf$"))
167 (build-system gnu-build-system)
168 (arguments '(#:parallel-tests? #f)) ; race condition
170 `(("libxml2" ,libxml2)))
174 (home-page "https://www.gnu.org/software/gama")
175 (synopsis "Adjustment of geodetic networks")
177 "GNU Gama is a program for the adjustment of geodetic networks. It is
178 useful in measurements where Global Positioning System (GPS) is not available,
179 such as underground. It features the ability to adjust in local Cartesian
180 coordinates as well as partial support for adjustments in global coordinate systems.")
181 (license license:gpl3+)))
183 (define-public gpxsee
190 (url "https://github.com/tumic0/GPXSee")
192 (file-name (git-file-name name version))
195 "0fpb43smh0kwic5pdxs46c0hkqj8g084h72pa024x1my6w12y9b8"))))
196 (build-system gnu-build-system)
199 (modify-phases %standard-phases
201 ;; Use lrelease to convert TS translation files into QM files.
202 (lambda* (#:key inputs outputs #:allow-other-keys)
203 (for-each (lambda (file)
204 (invoke "lrelease" file))
205 (find-files "lang" "\\.ts"))
207 (string-append "PREFIX="
208 (assoc-ref outputs "out"))))))))
210 `(("qtbase" ,qtbase)))
212 `(("qttools" ,qttools)))
213 (home-page "https://www.gpxsee.org")
214 (synopsis "GPS log file viewer and analyzer")
216 "GPXSee is a Qt-based GPS log file viewer and analyzer that supports all
217 common GPS log file formats. It can display multiple tracks on various on-
218 and off-line maps. You can easily add more maps and graph other captured data
219 such as elevation, speed, heart rate, power, temperature, and gear shifts.")
220 (license license:gpl3)))
229 (uri (string-append "https://download-mirror.savannah.gnu.org"
230 "/releases/gpsd/gpsd-" version ".tar.gz"))
232 (base32 "14gyqrbrq6jz4y6x59rdpv9d4c3pbn0vh1blq3iwrc6kz0x4ql35"))))
233 (build-system scons-build-system)
236 ("pkg-config" ,pkg-config)))
245 ("python-pycairo" ,python-pycairo)
246 ("python-pygobject" ,python-pygobject)
247 ("python-pyserial" ,python-pyserial)
248 ("python-wrapper" ,python-wrapper)
252 (list (string-append "prefix=" %output)
253 (let ((version ,(version-major+minor (package-version python))))
254 (string-append "python_libdir=" %output
255 "/lib/python" version
259 (modify-phases %standard-phases
260 (add-after 'unpack 'fix-build
261 (lambda* (#:key outputs #:allow-other-keys)
262 (substitute* "SConstruct"
264 "envs = os.environ"))
266 (add-after 'install 'wrap-python-scripts
267 (lambda* (#:key inputs outputs #:allow-other-keys)
268 (let* ((out (assoc-ref outputs "out"))
269 (pycairo (assoc-ref inputs "python-pycairo"))
270 (pygobject (assoc-ref inputs "python-pygobject"))
271 (pyserial (assoc-ref inputs "python-pyserial"))
272 (sitedir (lambda (package)
273 (string-append package
275 ,(version-major+minor
276 (package-version python))
278 (pythonpath (string-join (map sitedir
279 (list out pycairo pygobject
282 (for-each (lambda (script)
283 (wrap-program (string-append out "/bin/" script)
284 `("PYTHONPATH" ":" prefix (,pythonpath))))
285 '("gegps" "gpscat" "gpsfake" "gpsprof"
286 "ubxtool" "xgps" "xgpsspeed" "zerk")))
288 (synopsis "GPS service daemon")
290 "@code{gpsd} is a service daemon that monitors one or more GPSes or AIS
291 receivers attached to a host computer through serial or USB ports, making all
292 data on the location/course/velocity of the sensors available to be queried on
293 TCP port 2947 of the host computer.")
294 (home-page "https://gpsd.gitlab.io/gpsd/")
295 (license license:bsd-2)))