Commit | Line | Data |
---|---|---|
83aabfbc | 1 | ;;; GNU Guix --- Functional package management for GNU |
ce0614dd | 2 | ;;; Copyright © 2014, 2015 Ludovic Courtès <ludo@gnu.org> |
0f763db4 | 3 | ;;; Copyright © 2016, 2017, 2018, 2019 Efraim Flashner <efraim@flashner.co.il> |
7b6eabc7 | 4 | ;;; Copyright © 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr> |
53655964 | 5 | ;;; Copyright © 2018 Mathieu Othacehe <m.othacehe@gmail.com> |
74c65c9d | 6 | ;;; Copyright © 2020 Guillaume Le Vaillant <glv@posteo.net> |
83aabfbc LC |
7 | ;;; |
8 | ;;; This file is part of GNU Guix. | |
9 | ;;; | |
10 | ;;; GNU Guix is free software; you can redistribute it and/or modify it | |
11 | ;;; under the terms of the GNU General Public License as published by | |
12 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
13 | ;;; your option) any later version. | |
14 | ;;; | |
15 | ;;; GNU Guix is distributed in the hope that it will be useful, but | |
16 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of | |
17 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
18 | ;;; GNU General Public License for more details. | |
19 | ;;; | |
20 | ;;; You should have received a copy of the GNU General Public License | |
21 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. | |
22 | ||
23 | (define-module (gnu packages gps) | |
24 | #:use-module (guix packages) | |
25 | #:use-module (guix download) | |
3b239720 | 26 | #:use-module (guix git-download) |
83aabfbc | 27 | #:use-module (guix build-system gnu) |
74c65c9d | 28 | #:use-module (guix build-system scons) |
83aabfbc | 29 | #:use-module ((guix licenses) #:prefix license:) |
8ee8eb26 | 30 | #:use-module (guix utils) |
924b96db | 31 | #:use-module (gnu packages) |
8ee8eb26 | 32 | #:use-module (gnu packages algebra) |
ce0614dd | 33 | #:use-module (gnu packages base) |
83aabfbc | 34 | #:use-module (gnu packages compression) |
3b239720 | 35 | #:use-module (gnu packages docbook) |
74c65c9d | 36 | #:use-module (gnu packages glib) |
3b239720 | 37 | #:use-module (gnu packages gtk) |
74c65c9d GLV |
38 | #:use-module (gnu packages image) |
39 | #:use-module (gnu packages libusb) | |
40 | #:use-module (gnu packages linux) | |
41 | #:use-module (gnu packages ncurses) | |
42 | #:use-module (gnu packages pkg-config) | |
43 | #:use-module (gnu packages python) | |
8ee8eb26 | 44 | #:use-module (gnu packages python-xyz) |
cd0322a3 | 45 | #:use-module (gnu packages qt) |
74c65c9d GLV |
46 | #:use-module (gnu packages sqlite) |
47 | #:use-module (gnu packages xml)) | |
83aabfbc LC |
48 | |
49 | (define-public gpsbabel | |
50 | (package | |
51 | (name "gpsbabel") | |
924b96db | 52 | (version "1.5.4") |
83aabfbc LC |
53 | (source (origin |
54 | (method url-fetch) | |
55 | ;; XXX: Downloads from gpsbabel.org are hidden behind a POST, so | |
56 | ;; get it from elsewhere. | |
57 | (uri (string-append | |
58 | "mirror://debian/pool/main/g/gpsbabel/gpsbabel_" | |
59 | version ".orig.tar.gz")) | |
60 | (sha256 | |
61 | (base32 | |
924b96db MO |
62 | "19hykxhyl567gf8qcrl33qhv95w0g4vxw9r3h9b8d8plx9bnaf8l")) |
63 | (patches (search-patches | |
64 | "gpsbabel-minizip.patch" | |
65 | ;; XXX: Remove this patch on the next release. | |
66 | "gpsbabel-qstring.patch")) | |
03392caa | 67 | (modules '((guix build utils))) |
6d2ff645 TGR |
68 | (snippet |
69 | '(begin | |
70 | ;; Delete files under GPL-compatible licences but never used | |
71 | ;; on GNU systems, rather than bloating the LICENSE field. | |
924b96db MO |
72 | (delete-file "gui/serial_mac.cc") ; Apple MIT |
73 | (delete-file "mingw/include/ddk/hidsdi.h") ; public domain | |
6d2ff645 | 74 | #t)))) |
83aabfbc | 75 | (build-system gnu-build-system) |
924b96db | 76 | ;; TODO: "make doc" requires Docbook & co. |
83aabfbc | 77 | (arguments |
15354d86 | 78 | `(#:configure-flags |
cfad3def | 79 | '("--with-zlib=system") |
82350397 LC |
80 | ;; On i686, 'raymarine.test' fails because of a rounding error: |
81 | ;; <http://hydra.gnu.org/build/133040>. As a workaround, disable tests | |
82 | ;; on these platforms. | |
15354d86 DC |
83 | ;; FIXME: On x86_64 with -std=gnu++11 tests also fail due to rounding |
84 | ;; error. | |
85 | #:tests? #f)) | |
83aabfbc LC |
86 | (inputs |
87 | `(("expat" ,expat) | |
88 | ("zlib" ,zlib) | |
e2814984 EF |
89 | ("qtbase" ,qtbase) |
90 | ("qttools" ,qttools))) | |
83aabfbc LC |
91 | (native-inputs |
92 | `(("which" ,which) | |
93 | ("libxml2" ,libxml2))) ;'xmllint' needed for the KML tests | |
facee794 | 94 | (home-page "https://www.gpsbabel.org/") |
83aabfbc LC |
95 | (synopsis "Convert and exchange data with GPS and map programs") |
96 | (description | |
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 | |
101 | manipulate maps.") | |
6d2ff645 TGR |
102 | (license (list license:expat ; shapelib/*.[ch] |
103 | license:gpl2+)))) ; everything else | |
3b239720 LC |
104 | |
105 | (define-public gpscorrelate | |
106 | ;; This program is "lightly maintained", so to speak, so we end up taking it | |
107 | ;; directly from its Git repo. | |
108 | (let ((commit "365f6e1b3f")) | |
109 | (package | |
110 | (name "gpscorrelate") | |
111 | (version (string-append "1.6.1." commit)) | |
112 | (source (origin | |
113 | (method git-fetch) | |
114 | (uri (git-reference | |
2508b075 | 115 | (url "https://github.com/dfandrich/gpscorrelate") |
3b239720 | 116 | (commit commit))) |
87d868cc | 117 | (file-name (git-file-name name version)) |
3b239720 LC |
118 | (sha256 |
119 | (base32 | |
120 | "006a6l8p38a4h7y2959sqrmjjn29d8pd50zj9nypcp5ph18nybjb")))) | |
121 | (build-system gnu-build-system) | |
122 | (arguments | |
dc1d3cde KK |
123 | `(#:phases |
124 | (modify-phases %standard-phases | |
125 | (replace 'configure | |
126 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
127 | ;; This is a rudimentary build system. | |
128 | (substitute* "Makefile" | |
129 | (("prefix[[:blank:]]*=.*$") | |
130 | (string-append "prefix = " (assoc-ref outputs "out") | |
131 | "\n"))) | |
132 | #t))) | |
3b239720 LC |
133 | #:tests? #f)) |
134 | (inputs | |
135 | `(("gtk+" ,gtk+-2) | |
136 | ("libxml2" ,libxml2) | |
137 | ("exiv2" ,exiv2))) | |
138 | (native-inputs | |
139 | `(("pkg-config" ,pkg-config) | |
140 | ("docbook-xml" ,docbook-xml) | |
141 | ("docbook-xsl" ,docbook-xsl) | |
142 | ("libxslt" ,libxslt))) | |
2508b075 | 143 | (home-page "https://dfandrich.github.io/gpscorrelate/") |
3b239720 LC |
144 | (synopsis "GPS photo correlation tool to geo-localize images") |
145 | (description | |
146 | "GPS Correlate is a program to match a recorded GPS track with the EXIF | |
147 | tags in digital camera photos, and update the EXIF tags with the location that | |
148 | the photo was taken. It does this by using the timestamp in the photo and | |
149 | finding a data point in the GPS track that matches, or interpolating a point | |
150 | between two other data points.") | |
151 | (license license:gpl2+)))) | |
b200ecde EF |
152 | |
153 | (define-public gama | |
154 | (package | |
155 | (name "gama") | |
6b4ed9ad | 156 | (version "2.07") |
b200ecde EF |
157 | (source |
158 | (origin | |
159 | (method url-fetch) | |
160 | (uri (string-append "mirror://gnu/gama/gama-" | |
161 | version ".tar.gz")) | |
162 | (sha256 | |
163 | (base32 | |
6b4ed9ad | 164 | "0nmc6mkd55nryfffq5k9c09dhkbq6bfs06af8ammhbh5jzdn3s36")))) |
b200ecde EF |
165 | (build-system gnu-build-system) |
166 | (arguments '(#:parallel-tests? #f)) ; race condition | |
167 | (native-inputs | |
168 | `(("libxml2" ,libxml2))) | |
169 | (inputs | |
170 | `(("expat" ,expat) | |
171 | ("sqlite" ,sqlite))) | |
172 | (home-page "https://www.gnu.org/software/gama") | |
173 | (synopsis "Adjustment of geodetic networks") | |
174 | (description | |
175 | "GNU Gama is a program for the adjustment of geodetic networks. It is | |
176 | useful in measurements where Global Positioning System (GPS) is not available, | |
177 | such as underground. It features the ability to adjust in local Cartesian | |
178 | coordinates as well as partial support for adjustments in global coordinate systems.") | |
179 | (license license:gpl3+))) | |
53655964 MO |
180 | |
181 | (define-public gpxsee | |
182 | (package | |
183 | (name "gpxsee") | |
3437fe1f | 184 | (version "7.25") |
53655964 | 185 | (source (origin |
ed8a5516 LC |
186 | (method git-fetch) |
187 | (uri (git-reference | |
188 | (url "https://github.com/tumic0/GPXSee") | |
189 | (commit version))) | |
190 | (file-name (git-file-name name version)) | |
53655964 MO |
191 | (sha256 |
192 | (base32 | |
3437fe1f | 193 | "0lml3hz2zxljl9j5wnh7bn9bj8k9v3wf6bk3g77x9nnarsmw0fcx")))) |
53655964 MO |
194 | (build-system gnu-build-system) |
195 | (arguments | |
196 | '(#:phases | |
197 | (modify-phases %standard-phases | |
198 | (replace 'configure | |
199 | ;; Use lrelease to convert TS translation files into QM files. | |
200 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
201 | (for-each (lambda (file) | |
d64b79fa | 202 | (invoke "lrelease" file)) |
53655964 | 203 | (find-files "lang" "\\.ts")) |
53655964 MO |
204 | (invoke "qmake" |
205 | (string-append "PREFIX=" | |
286ef5d9 | 206 | (assoc-ref outputs "out")))))))) |
53655964 MO |
207 | (inputs |
208 | `(("qtbase" ,qtbase))) | |
209 | (native-inputs | |
210 | `(("qttools" ,qttools))) | |
286ef5d9 NK |
211 | (home-page "https://www.gpxsee.org") |
212 | (synopsis "GPS log file viewer and analyzer") | |
53655964 | 213 | (description |
cebfc269 TGR |
214 | "GPXSee is a Qt-based GPS log file viewer and analyzer that supports all |
215 | common GPS log file formats. It can display multiple tracks on various on- | |
216 | and off-line maps. You can easily add more maps and graph other captured data | |
217 | such as elevation, speed, heart rate, power, temperature, and gear shifts.") | |
53655964 | 218 | (license license:gpl3))) |
74c65c9d GLV |
219 | |
220 | (define-public gpsd | |
221 | (package | |
222 | (name "gpsd") | |
24f4263d | 223 | (version "3.20") |
74c65c9d GLV |
224 | (source |
225 | (origin | |
226 | (method url-fetch) | |
227 | (uri (string-append "https://download-mirror.savannah.gnu.org" | |
228 | "/releases/gpsd/gpsd-" version ".tar.gz")) | |
229 | (sha256 | |
24f4263d | 230 | (base32 "0l2yz0yw9sil82lh2l4swkkldgmhzhv588n5lcavib4f0q2phahp")))) |
74c65c9d GLV |
231 | (build-system scons-build-system) |
232 | (native-inputs | |
8ee8eb26 GLV |
233 | `(("bc" ,bc) |
234 | ("pkg-config" ,pkg-config))) | |
74c65c9d GLV |
235 | (inputs |
236 | `(("bluez" ,bluez) | |
237 | ("dbus" ,dbus) | |
24f4263d | 238 | ("gtk+" ,gtk+) |
74c65c9d GLV |
239 | ("libcap" ,libcap) |
240 | ("libusb" ,libusb) | |
8ee8eb26 GLV |
241 | ("ncurses" ,ncurses) |
242 | ("python" ,python) | |
243 | ("python-pycairo" ,python-pycairo) | |
244 | ("python-pygobject" ,python-pygobject) | |
245 | ("python-pyserial" ,python-pyserial) | |
246 | ("python-wrapper" ,python-wrapper) | |
247 | ("qtbase" ,qtbase))) | |
74c65c9d | 248 | (arguments |
8ee8eb26 GLV |
249 | `(#:scons-flags |
250 | (list (string-append "prefix=" %output) | |
251 | (let ((version ,(version-major+minor (package-version python)))) | |
252 | (string-append "python_libdir=" %output | |
253 | "/lib/python" version | |
254 | "/site-packages")) | |
255 | "qt_versioned=5") | |
74c65c9d GLV |
256 | #:phases |
257 | (modify-phases %standard-phases | |
8ee8eb26 GLV |
258 | (add-after 'unpack 'fix-build |
259 | (lambda* (#:key outputs #:allow-other-keys) | |
74c65c9d | 260 | (substitute* "SConstruct" |
8ee8eb26 GLV |
261 | (("envs = \\{\\}") |
262 | "envs = os.environ")) | |
263 | #t)) | |
264 | (add-after 'install 'wrap-python-scripts | |
265 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
266 | (let* ((out (assoc-ref outputs "out")) | |
267 | (pycairo (assoc-ref inputs "python-pycairo")) | |
268 | (pygobject (assoc-ref inputs "python-pygobject")) | |
269 | (pyserial (assoc-ref inputs "python-pyserial")) | |
270 | (sitedir (lambda (package) | |
271 | (string-append package | |
272 | "/lib/python" | |
273 | ,(version-major+minor | |
274 | (package-version python)) | |
275 | "/site-packages"))) | |
276 | (pythonpath (string-join (map sitedir | |
277 | (list out pycairo pygobject | |
278 | pyserial)) | |
279 | ":"))) | |
280 | (for-each (lambda (script) | |
281 | (wrap-program (string-append out "/bin/" script) | |
282 | `("PYTHONPATH" ":" prefix (,pythonpath)))) | |
283 | '("gegps" "gpscat" "gpsfake" "gpsprof" | |
284 | "ubxtool" "xgps" "xgpsspeed" "zerk"))) | |
74c65c9d GLV |
285 | #t))))) |
286 | (synopsis "GPS service daemon") | |
287 | (description | |
288 | "@code{gpsd} is a service daemon that monitors one or more GPSes or AIS | |
289 | receivers attached to a host computer through serial or USB ports, making all | |
290 | data on the location/course/velocity of the sensors available to be queried on | |
291 | TCP port 2947 of the host computer.") | |
292 | (home-page "https://gpsd.gitlab.io/gpsd/") | |
293 | (license license:bsd-2))) |