gnu: r-fourcseq: Move to (gnu packages bioconductor).
[jackhill/guix/guix.git] / gnu / packages / gps.scm
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>
9 ;;;
10 ;;; This file is part of GNU Guix.
11 ;;;
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.
16 ;;;
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.
21 ;;;
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/>.
24
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))
50
51 (define-public gpsbabel
52 (package
53 (name "gpsbabel")
54 (version "1.5.4")
55 (source (origin
56 (method url-fetch)
57 ;; XXX: Downloads from gpsbabel.org are hidden behind a POST, so
58 ;; get it from elsewhere.
59 (uri (string-append
60 "mirror://debian/pool/main/g/gpsbabel/gpsbabel_"
61 version ".orig.tar.gz"))
62 (sha256
63 (base32
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)))
70 (snippet
71 '(begin
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
76 #t))))
77 (build-system gnu-build-system)
78 ;; TODO: "make doc" requires Docbook & co.
79 (arguments
80 `(#:configure-flags
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
86 ;; error.
87 #:tests? #f))
88 (inputs
89 `(("expat" ,expat)
90 ("zlib" ,zlib)
91 ("qtbase" ,qtbase)))
92 (native-inputs
93 `(("which" ,which)
94 ("qttools" ,qttools)
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")
98 (description
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
103 manipulate maps.")
104 (license (list license:expat ; shapelib/*.[ch]
105 license:gpl2+)))) ; everything else
106
107 (define-public gpscorrelate
108 (package
109 (name "gpscorrelate")
110 (version "2.0")
111 (source (origin
112 (method git-fetch)
113 (uri (git-reference
114 (url "https://github.com/dfandrich/gpscorrelate")
115 (commit version)))
116 (file-name (git-file-name name version))
117 (sha256
118 (base32
119 "1kvybhfnygz79q3pgwc1q2x4ccmnsfscx2hzxnmzjbnc6arnqari"))))
120 (build-system gnu-build-system)
121 (arguments
122 `(#:phases
123 (modify-phases %standard-phases
124 (replace 'configure
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")
130 "\n")))
131 #t)))))
132 (inputs
133 `(("gtk+" ,gtk+)
134 ("libxml2" ,libxml2)
135 ("exiv2" ,exiv2)))
136 (native-inputs
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")
143 (description
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+)))
150
151 (define-public gama
152 (package
153 (name "gama")
154 (version "2.09")
155 (source
156 (origin
157 (method url-fetch)
158 (uri (string-append "mirror://gnu/gama/gama-"
159 version ".tar.gz"))
160 (sha256
161 (base32
162 "0c1b28frl6109arj09v4zr1xs859krn8871mkvis517g5pb55dc9"))))
163 (build-system gnu-build-system)
164 (arguments '(#:parallel-tests? #f)) ; race condition
165 (native-inputs
166 `(("libxml2" ,libxml2)))
167 (inputs
168 `(("expat" ,expat)
169 ("sqlite" ,sqlite)))
170 (home-page "https://www.gnu.org/software/gama")
171 (synopsis "Adjustment of geodetic networks")
172 (description
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+)))
178
179 (define-public gpxsee
180 (package
181 (name "gpxsee")
182 (version "7.30")
183 (source (origin
184 (method git-fetch)
185 (uri (git-reference
186 (url "https://github.com/tumic0/GPXSee")
187 (commit version)))
188 (file-name (git-file-name name version))
189 (sha256
190 (base32
191 "09gajwqc30r9a2sn972qdx3gx0gki9n0zafq986hn6zsr3z43mfs"))))
192 (build-system gnu-build-system)
193 (arguments
194 '(#:phases
195 (modify-phases %standard-phases
196 (replace 'configure
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"))
202 (invoke "qmake"
203 (string-append "PREFIX="
204 (assoc-ref outputs "out"))))))))
205 (inputs
206 `(("qtbase" ,qtbase)))
207 (native-inputs
208 `(("qttools" ,qttools)))
209 (home-page "https://www.gpxsee.org")
210 (synopsis "GPS log file viewer and analyzer")
211 (description
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)))
217
218 (define-public gpsd
219 (package
220 (name "gpsd")
221 (version "3.21")
222 (source
223 (origin
224 (method url-fetch)
225 (uri (string-append "https://download-mirror.savannah.gnu.org"
226 "/releases/gpsd/gpsd-" version ".tar.gz"))
227 (sha256
228 (base32 "14gyqrbrq6jz4y6x59rdpv9d4c3pbn0vh1blq3iwrc6kz0x4ql35"))))
229 (build-system scons-build-system)
230 (native-inputs
231 `(("bc" ,bc)
232 ("pkg-config" ,pkg-config)))
233 (inputs
234 `(("bluez" ,bluez)
235 ("dbus" ,dbus)
236 ("gtk+" ,gtk+)
237 ("libcap" ,libcap)
238 ("libusb" ,libusb)
239 ("ncurses" ,ncurses)
240 ("python" ,python)
241 ("python-pycairo" ,python-pycairo)
242 ("python-pygobject" ,python-pygobject)
243 ("python-pyserial" ,python-pyserial)
244 ("python-wrapper" ,python-wrapper)
245 ("qtbase" ,qtbase)))
246 (arguments
247 `(#:scons-flags
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
252 "/site-packages"))
253 "qt_versioned=5")
254 #:phases
255 (modify-phases %standard-phases
256 (add-after 'unpack 'fix-build
257 (lambda* (#:key outputs #:allow-other-keys)
258 (substitute* "SConstruct"
259 (("envs = \\{\\}")
260 "envs = os.environ"))
261 #t))
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
270 "/lib/python"
271 ,(version-major+minor
272 (package-version python))
273 "/site-packages")))
274 (pythonpath (string-join (map sitedir
275 (list out pycairo pygobject
276 pyserial))
277 ":")))
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")))
283 #t)))))
284 (synopsis "GPS service daemon")
285 (description
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)))