gnu: LibreOffice: Fix "File > Open" crash on foreign distros.
[jackhill/guix/guix.git] / gnu / packages / syncthing.scm
CommitLineData
56a37713
LF
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2016 Petter <petter@mykolab.ch>
30335a29 3;;; Copyright © 2016, 2017, 2018 Leo Famulari <leo@famulari.name>
56a37713
LF
4;;;
5;;; This file is part of GNU Guix.
6;;;
7;;; GNU Guix is free software; you can redistribute it and/or modify it
8;;; under the terms of the GNU General Public License as published by
9;;; the Free Software Foundation; either version 3 of the License, or (at
10;;; your option) any later version.
11;;;
12;;; GNU Guix is distributed in the hope that it will be useful, but
13;;; WITHOUT ANY WARRANTY; without even the implied warranty of
14;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15;;; GNU General Public License for more details.
16;;;
17;;; You should have received a copy of the GNU General Public License
18;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
19
20(define-module (gnu packages syncthing)
21 #:use-module (guix build-system go)
cca22eb3 22 #:use-module (guix build-system trivial)
56a37713 23 #:use-module (guix packages)
947453a8 24 #:use-module (guix download)
56a37713 25 #:use-module (guix git-download)
269d0858 26 #:use-module (guix licenses)
fd115bee 27 #:use-module (gnu packages)
269d0858 28 #:use-module (gnu packages golang))
56a37713 29
947453a8
LF
30(define-public syncthing
31 (package
32 (name "syncthing")
b4ff75b5 33 (version "0.14.50")
947453a8
LF
34 (source (origin
35 (method url-fetch)
36 (uri (string-append "https://github.com/syncthing/syncthing"
37 "/releases/download/v" version
38 "/syncthing-source-v" version ".tar.gz"))
39 (sha256
40 (base32
b4ff75b5 41 "0yjj6zzivzw289bhwqjb4xcv8p39n5mcwwr5w6xf5ykzljc5pk55"))
30335a29
LF
42 (modules '((guix build utils)))
43 ;; Delete bundled ("vendored") free software source code.
6cbee49d
MW
44 (snippet '(begin
45 (delete-file-recursively "vendor")
46 #t))))
947453a8 47 (build-system go-build-system)
c330c27f
LF
48 ;; The primary Syncthing executable goes to "out", while the auxiliary
49 ;; server programs and utility tools go to "utils". This reduces the size
50 ;; of "out" by ~80 MiB.
51 (outputs '("out" "utils"))
947453a8
LF
52 (arguments
53 `(#:import-path "github.com/syncthing/syncthing"
54 #:unpack-path "github.com/syncthing"
1899ef0b
LF
55 ;; We don't need to install the source code for end-user applications.
56 #:install-source? #f
947453a8
LF
57 #:phases
58 (modify-phases %standard-phases
947453a8
LF
59 (add-before 'build 'increase-test-timeout
60 (lambda _
61 (substitute* "src/github.com/syncthing/syncthing/build.go"
62 (("60s") "999s"))
63 #t))
64
65 (replace 'build
66 (lambda* (#:key inputs #:allow-other-keys)
67 (with-directory-excursion "src/github.com/syncthing/syncthing"
1feaca62 68 (invoke "go" "run" "build.go" "-no-upgrade"))))
947453a8
LF
69
70 (replace 'check
71 (lambda _
72 (with-directory-excursion "src/github.com/syncthing/syncthing"
1feaca62 73 (invoke "go" "run" "build.go" "test"))))
947453a8
LF
74
75 (replace 'install
c330c27f
LF
76 (lambda* (#:key outputs #:allow-other-keys)
77 (let ((out (assoc-ref outputs "out"))
78 (utils (assoc-ref outputs "utils"))
79 (src "src/github.com/syncthing/syncthing/bin/"))
80 (install-file (string-append src "/syncthing")
81 (string-append out "/bin"))
82 (delete-file (string-append src "/syncthing"))
83 (copy-recursively "src/github.com/syncthing/syncthing/bin/"
84 (string-append utils "/bin"))
85 #t)))
947453a8
LF
86
87 (add-after 'install 'install-docs
88 (lambda* (#:key outputs #:allow-other-keys)
89 (let* ((out (assoc-ref outputs "out"))
c330c27f
LF
90 (utils (assoc-ref outputs "utils"))
91 (man "/share/man")
92 (man-section (string-append man "/man"))
947453a8 93 (src "src/github.com/syncthing/syncthing/man/"))
c330c27f 94 ;; Install all the man pages to "out".
947453a8
LF
95 (for-each
96 (lambda (file)
97 (install-file file
c330c27f
LF
98 (string-append out man-section
99 (string-take-right file 1))))
947453a8 100 (find-files src "\\.[1-9]"))
c330c27f
LF
101 ;; Copy all the man pages to "utils"
102 (copy-recursively (string-append out man)
103 (string-append utils man))
104 ;; Delete extraneous man pages from "out" and "utils",
105 ;; respectively.
106 (delete-file (string-append out man "/man1/stdiscosrv.1"))
107 (delete-file (string-append out man "/man1/strelaysrv.1"))
108 (delete-file (string-append utils man "/man1/syncthing.1"))
947453a8
LF
109 #t))))))
110 ;; When updating Syncthing, check 'vendor/manifest' in the source
111 ;; distribution to ensure we are using the correct versions of these
112 ;; dependencies.
113 (inputs
114 `(("go-github-com-audriusbutkevicius-cli"
115 ,go-github-com-audriusbutkevicius-cli)
947453a8
LF
116 ("go-github-com-audriusbutkevicius-go-nat-pmp"
117 ,go-github-com-audriusbutkevicius-go-nat-pmp)
118 ("go-github-com-audriusbutkevicius-pfilter"
119 ,go-github-com-audriusbutkevicius-pfilter)
120 ("go-github-com-bkaradzic-go-lz4" ,go-github-com-bkaradzic-go-lz4)
121 ("go-github-com-calmh-du" ,go-github-com-calmh-du)
122 ("go-github-com-calmh-xdr" ,go-github-com-calmh-xdr)
30335a29 123 ("go-github-com-prometheus-union" ,(go-github-com-prometheus-union))
947453a8
LF
124 ("go-github-com-chmduquesne-rollinghash-adler32"
125 ,go-github-com-chmduquesne-rollinghash-adler32)
947453a8
LF
126 ("go-github-com-gobwas-glob" ,go-github-com-gobwas-glob)
127 ("go-github-com-gogo-protobuf-union"
128 ,(go-github-com-gogo-protobuf-union))
129 ("go-github-com-golang-groupcache-lru"
130 ,go-github-com-golang-groupcache-lru)
131 ("go-github-com-jackpal-gateway" ,go-github-com-jackpal-gateway)
947453a8
LF
132 ("go-github-com-kballard-go-shellquote"
133 ,go-github-com-kballard-go-shellquote)
134 ("go-github-com-lib-pq" ,go-github-com-lib-pq)
135 ("go-github-com-minio-sha256-simd" ,go-github-com-minio-sha256-simd)
136 ("go-github-com-oschwald-geoip2-golang"
137 ,go-github-com-oschwald-geoip2-golang)
3b526286 138 ("go-github-com-pkg-errors" ,go-github-com-pkg-errors)
947453a8
LF
139 ("go-github-com-rcrowley-go-metrics" ,go-github-com-rcrowley-go-metrics)
140 ("go-github-com-sasha-s-go-deadlock" ,go-github-com-sasha-s-go-deadlock)
141 ("go-github-com-syndtr-goleveldb" ,go-github-com-syndtr-goleveldb)
142 ("go-github-com-thejerf-suture" ,go-github-com-thejerf-suture)
143 ("go-github-com-vitrun-qart" ,(go-github-com-vitrun-qart-union))
947453a8
LF
144 ("go-golang-org-x-crypto" ,(go-golang-org-x-crypto-union))
145 ("go-golang-org-x-net-union" ,(go-golang-org-x-net-union))
146 ("go-golang-org-x-text" ,(go-golang-org-x-text-union))
147 ("go-golang-org-x-time-rate" ,go-golang-org-x-time-rate)
2849c665 148 ("go-github-com-syncthing-notify" ,go-github-com-syncthing-notify)
d9a38cc2
LF
149 ;; For tests
150 ("go-github-com-d4l3k-messagediff" ,go-github-com-d4l3k-messagediff)))
162a1374 151 (synopsis "Decentralized continuous file system synchronization")
947453a8
LF
152 (description "Syncthing is a peer-to-peer file synchronization tool that
153supports a wide variety of computing platforms. It uses the Block Exchange
154Protocol.")
155 (home-page "https://github.com/syncthing/syncthing")
156 (license mpl2.0)))
157
56a37713
LF
158(define-public go-github-com-audriusbutkevicius-go-nat-pmp
159 (let ((commit "452c97607362b2ab5a7839b8d1704f0396b640ca")
160 (revision "0"))
161 (package
162 (name "go-github-com-audriusbutkevicius-go-nat-pmp")
163 (version (git-version "0.0.0" revision commit))
164 (source (origin
165 (method git-fetch)
166 (uri (git-reference
167 (url "https://github.com/AudriusButkevicius/go-nat-pmp")
168 (commit commit)))
169 (file-name (git-file-name name version))
170 (sha256
171 (base32 "1accmpl1llk16a19nlyy991fqrgfay6l53gb64hgmdfmqljdvbk7"))))
172 (build-system go-build-system)
173 (arguments
174 `(#:import-path "github.com/AudriusButkevicius/go-nat-pmp"))
175 (synopsis "Port mapping and discovery of external IP address")
176 (description "This packages provides a Go client for the NAT-PMP internet
177protocol for port mapping and discovering the external IP address of a
178firewall.")
179 (home-page "https://github.com/AudriusButkevicius/go-nat-pmp")
180 (license asl2.0))))
67b46818
LF
181
182(define-public go-github-com-bkaradzic-go-lz4
183 (let ((commit "7224d8d8f27ef618c0a95f1ae69dbb0488abc33a")
184 (revision "0"))
185 (package
186 (name "go-github-com-bkaradzic-go-lz4")
187 (version (git-version "0.0.0" revision commit))
188 (source (origin
189 (method git-fetch)
190 (uri (git-reference
191 (url "https://github.com/bkaradzic/go-lz4")
192 (commit commit)))
193 (file-name (git-file-name name version))
194 (sha256
195 (base32
196 "10lmya17vdqg2pvqni0p73iahni48s1v11ya9a0hcz4jh5vw4dkb"))))
197 (build-system go-build-system)
198 (arguments
199 `(#:import-path "github.com/bkaradzic/go-lz4"))
200 (synopsis "LZ4 compression algorithm")
201 (description "This package provides @code{go-lz4}, a Go implementation of
202the LZ4 compression algorithm.")
203 (home-page "https://github.com/bkaradzic/go-lz4")
204 (license bsd-2))))
add56f34
LF
205
206(define-public go-github-com-calmh-du
207 (package
208 (name "go-github-com-calmh-du")
209 (version "1.0.1")
210 (source (origin
211 (method git-fetch)
212 (uri (git-reference
213 (url "https://github.com/calmh/du")
214 (commit (string-append "v" version))))
215 (file-name (git-file-name name version))
216 (sha256
217 (base32
218 "0qb3a6y3p9nkyn3s66k6zcm16y8n8578qh23ddj14cxf2scrr2n2"))))
219 (build-system go-build-system)
220 (arguments
221 `(#:import-path "github.com/calmh/du"))
222 (synopsis "Get total and available disk space of a given volume")
223 (description "This is a Go implementation of `du`. It provides disk usage
224information, such as how much storage space is available, free, and used.")
225 (home-page "https://github.com/calmh/du")
226 (license public-domain)))
1e28085e
LF
227
228(define-public go-github-com-calmh-xdr
229 (let ((commit "08e072f9cb164f943a92eb59f90f3abc64ac6e8f")
230 (revision "0"))
231 (package
232 (name "go-github-com-calmh-xdr")
233 (version (git-version "2.0.1" revision commit))
234 (source (origin
235 (method git-fetch)
236 (uri (git-reference
237 (url "https://github.com/calmh/xdr")
238 (commit commit)))
239 (file-name (git-file-name name version))
240 (sha256
241 (base32
242 "072wqdncz3nd4a3zkhvzzx1y3in1lm29wfvl0d8wrnqs5pyqh0mh"))))
243 (build-system go-build-system)
244 (arguments
245 `(#:import-path "github.com/calmh/xdr"))
246 (synopsis "XDR marshalling and unmarshalling")
247 (description "XDR is an External Data Representation (XDR)
248marshalling and unmarshalling library in Go. It uses code generation and not
249reflection.")
250 (home-page "https://github.com/calmh/xdr")
251 (license expat))))
ab3e1589
LF
252
253(define-public go-github-com-d4l3k-messagediff
254 (let ((commit "29f32d820d112dbd66e58492a6ffb7cc3106312b")
255 (revision "0"))
256 (package
257 (name "go-github-com-d4l3k-messagediff")
258 (version (git-version "1.1.0" revision commit))
259 (source (origin
260 (method git-fetch)
261 (uri (git-reference
262 (url "https://github.com/d4l3k/messagediff")
263 (commit commit)))
264 (file-name (git-file-name name version))
265 (sha256
266 (base32
267 "104hl8x57ciaz7mzafg1vp9qggxcyfm8hsv9bmlihbz9ml3nyr8v"))))
268 (build-system go-build-system)
269 (arguments
270 `(#:import-path "github.com/d4l3k/messagediff"))
271 (synopsis "Diff arbitrary Go structs")
272 (description "Messagediff is a library for calculating diffs of arbitrary
273structs in the Go programming language.")
274 (home-page "https://github.com/d4l3k/messagediff")
275 (license expat))))
a3a5b012 276
4d93ebb3
LF
277(define-public go-github-com-gobwas-glob
278 (let ((commit "51eb1ee00b6d931c66d229ceeb7c31b985563420")
279 (revision "0"))
280 (package
281 (name "go-github-com-gobwas-glob")
282 (version (git-version "0.0.0" revision commit))
283 (source (origin
284 (method git-fetch)
285 (uri (git-reference
286 (url "https://github.com/gobwas/glob")
287 (commit commit)))
288 (file-name (git-file-name name version))
289 (sha256
290 (base32
291 "090wzpwsjana1qas8ipwh1pj959gvc4b7vwybzi01f3bmd79jwlp"))))
292 (build-system go-build-system)
293 (arguments
294 `(#:import-path "github.com/gobwas/glob"))
295 (synopsis "Go globbing library")
296 (description "This packages provides a Go implementation of globs.")
297 (home-page "https://github.com/gobwas/glob")
298 (license expat))))
07e88fc6 299
503802ab
LF
300(define* (go-github-com-gogo-protobuf-union
301 #:optional (packages (list go-github-com-gogo-protobuf
302 go-github-com-gogo-protobuf-protoc-gen-gogo)))
303 (package
304 (name "go-github-com-gogo-protobuf-union")
305 (version (package-version go-github-com-gogo-protobuf))
306 (source #f)
307 (build-system trivial-build-system)
308 (arguments
309 '(#:modules ((guix build union))
310 #:builder (begin
311 (use-modules (ice-9 match)
312 (guix build union))
313 (match %build-inputs
314 (((names . directories) ...)
315 (union-build (assoc-ref %outputs "out")
e3cfef22
MW
316 directories)
317 #t)))))
503802ab
LF
318 (inputs (map (lambda (package)
319 (list (package-name package) package))
320 packages))
321 (synopsis "Union of Go protobuf libraries")
322 (description "This is a union of Go protobuf libraries")
323 (home-page (package-home-page go-github-com-gogo-protobuf))
324 (license (package-license go-github-com-gogo-protobuf))))
325
3a4d3838 326(define-public go-github-com-gogo-protobuf
d095620a
LF
327 (let ((commit "160de10b2537169b5ae3e7e221d28269ef40d311")
328 (revision "2"))
3a4d3838
LF
329 (package
330 (name "go-github-com-gogo-protobuf")
c1753d6c 331 (version (git-version "0.5" revision commit))
3a4d3838
LF
332 (source (origin
333 (method git-fetch)
334 (uri (git-reference
335 (url "https://github.com/gogo/protobuf")
336 (commit commit)))
337 (file-name (git-file-name name version))
338 (sha256
339 (base32
d095620a 340 "0hxq28sgxym04rv0q40gpwkh4ni359q21hq3g78wwxwx4qfd4zwm"))))
3a4d3838
LF
341 (build-system go-build-system)
342 (arguments
343 `(#:import-path "github.com/gogo/protobuf/proto"
344 #:unpack-path "github.com/gogo/protobuf"))
345 (propagated-inputs
346 `(("go-github-com-gogo-protobuf-protoc-gen-gogo"
347 ,go-github-com-gogo-protobuf-protoc-gen-gogo)))
348 (synopsis "Protocol Buffers for Go with Gadgets")
349 (description "Gogoprotobuf is a fork of golang/protobuf with extra code
350generation features. This code generation is used to achieve:
351@itemize
352@item fast marshalling and unmarshalling
353@item more canonical Go structures
354@item goprotobuf compatibility
355@item less typing by optionally generating extra helper code
356@item peace of mind by optionally generating test and benchmark code
357@item other serialization formats
358@end itemize")
359 (home-page "https://github.com/gogo/protobuf")
360 (license bsd-3))))
361
07e88fc6
LF
362(define-public go-github-com-gogo-protobuf-protoc-gen-gogo
363 (let ((commit "efccd33a0c20aa078705571d5ddbfa14c8395a63")
364 (revision "0"))
365 (package
366 (name "go-github-com-gogo-protobuf-protoc-gen-gogo")
367 (version (git-version "0.2" revision commit))
368 (source (origin
369 (method git-fetch)
370 (uri (git-reference
371 (url "https://github.com/gogo/protobuf")
372 (commit commit)))
373 (file-name (git-file-name name version))
374 (sha256
375 (base32
376 "09kfa3aqmhh7p0rc6wd4fw5cjccidsk9vgcy13albv0g8vnbmmgw"))))
377 (build-system go-build-system)
378 (arguments
379 `(#:import-path "github.com/gogo/protobuf/protoc-gen-gogo"
380 #:unpack-path "github.com/gogo/protobuf"))
381 (synopsis "Protocol Buffers for Go with Gadgets")
382 (description "Gogoprotobuf is a fork of golang/protobuf with extra code
383generation features. This code generation is used to achieve:
384@itemize
385@item fast marshalling and unmarshalling
386@item more canonical Go structures
387@item goprotobuf compatibility
388@item less typing by optionally generating extra helper code
389@item peace of mind by optionally generating test and benchmark code
390@item other serialization formats
391@end itemize")
392 (home-page "https://github.com/gogo/protobuf")
393 (license bsd-3))))
ede4f50c
LF
394
395(define-public go-github-com-golang-groupcache-lru
e83994f2
LF
396 (let ((commit "84a468cf14b4376def5d68c722b139b881c450a4")
397 (revision "1"))
ede4f50c
LF
398 (package
399 (name "go-github-com-golang-groupcache-lru")
400 (version (git-version "0.0.0" revision commit))
401 (source (origin
402 (method git-fetch)
403 (uri (git-reference
404 (url "https://github.com/golang/groupcache")
405 (commit commit)))
406 (file-name (git-file-name name version))
407 (sha256
408 (base32
e83994f2 409 "1ky1r9qh54yi9zp2769qrjngzndgd8fn7mja2qfac285n06chmcn"))))
ede4f50c
LF
410 (build-system go-build-system)
411 (arguments
412 `(#:import-path "github.com/golang/groupcache/lru"
413 #:unpack-path "github.com/golang/groupcache"))
414 (synopsis "Groupcache is a caching and cache-filling library")
415 (description "Groupcache is a caching and cache-filling library, intended
416as a replacement for memcached in many cases. It provides a data loading
417mechanism with caching and de-duplication that works across a set of peer
418processes.")
419 (home-page "https://github.com/golang/groupcache")
420 (license asl2.0))))
b32eab0b
LF
421
422(define-public go-github-com-golang-snappy
423 (let ((commit "553a641470496b2327abcac10b36396bd98e45c9")
424 (revision "0"))
425 (package
426 (name "go-github-com-golang-snappy")
427 (version (git-version "0.0.0" revision commit))
428 (source (origin
429 (method git-fetch)
430 (uri (git-reference
431 (url "https://github.com/golang/snappy")
432 (commit commit)))
433 (file-name (git-file-name name version))
434 (sha256
435 (base32
436 "0kssxnih1l722hx9219c7javganjqkqhvl3i0hp0hif6xm6chvqk"))))
437 (build-system go-build-system)
438 (arguments
439 `(#:import-path "github.com/golang/snappy"))
440 (synopsis "Snappy compression format in the Go programming language")
441 (description "This package provides a Go implementation of the Snappy
442compression format.")
443 (home-page "https://github.com/golang/snappy")
444 (license bsd-3))))
7b92093d
LF
445
446(define-public go-github-com-jackpal-gateway
447 (let ((commit "5795ac81146e01d3fab7bcf21c043c3d6a32b006")
448 (revision "0"))
449 (package
450 (name "go-github-com-jackpal-gateway")
451 (version (git-version "0.0.0" revision commit))
452 (source (origin
453 (method git-fetch)
454 (uri (git-reference
455 (url "https://github.com/jackpal/gateway")
456 (commit commit)))
457 (file-name (git-file-name name version))
458 (sha256
459 (base32
460 "0fkwkwmhfadwk3cha8616bhqxfkr9gjjnynhhxyldlphixgs3f25"))))
461 (build-system go-build-system)
462 (arguments
463 `(#:import-path "github.com/jackpal/gateway"))
464 (synopsis "Discover the address of a LAN gateway")
465 (description "@code{gateway} is a Go library for discovering the IP
466address of the default LAN gateway.")
467 (home-page "https://github.com/jackpal/gateway")
468 (license bsd-3))))
7577a1d5 469
340e1a9a 470(define-public go-github-com-lib-pq
5e30d8c1
LF
471 (let ((commit "83612a56d3dd153a94a629cd64925371c9adad78")
472 (revision "1"))
340e1a9a
LF
473 (package
474 (name "go-github-com-lib-pq")
475 (version (git-version "0.0.0" revision commit))
476 (source (origin
477 (method git-fetch)
478 (uri (git-reference
479 (url "https://github.com/lib/pq")
480 (commit commit)))
481 (file-name (git-file-name name version))
482 (sha256
483 (base32
5e30d8c1 484 "12334yigh284k5cdvb9pgxaq6n78205jcbp75ajz44vvfd4wi6qc"))))
340e1a9a
LF
485 (build-system go-build-system)
486 (arguments
487 `(#:import-path "github.com/lib/pq"
488 ;; The tests seem to fail without access to the network or a running
489 ;; Postgres instance.
490 #:tests? #f))
491 (synopsis "Golang Postgres driver for Go's database/sql")
492 (description "This packages provides a pure Go Postgres driver for Go's
493database/sql package.")
494 (home-page "https://github.com/lib/pq")
495 (license expat))))
4a9c4dbe
LF
496
497(define-public go-github-com-minio-sha256-simd
b12df4f5
LF
498 (let ((commit "ad98a36ba0da87206e3378c556abbfeaeaa98668")
499 (revision "1"))
4a9c4dbe
LF
500 (package
501 (name "go-github-com-minio-sha256-simd")
502 (version (git-version "0.0.0" revision commit))
503 (source (origin
504 (method git-fetch)
505 (uri (git-reference
506 (url "https://github.com/minio/sha256-simd")
507 (commit commit)))
508 (file-name (git-file-name name version))
509 (sha256
510 (base32
b12df4f5 511 "0yfnqn3kqdnlfm54yvc4fr5vpdmwdi2kw571nlkbpmy8ldhsqqfi"))))
4a9c4dbe
LF
512 (build-system go-build-system)
513 (arguments
514 `(#:import-path "github.com/minio/sha256-simd"))
515 (synopsis "Hardware-accelerated SHA256 in Go using SIMD")
516 (description "This packages provides a pure Go implementation of SHA256
517using SIMD (Single instruction, multiple data) instructions for Intel and ARM
518architectures.")
519 (home-page "https://github.com/minio/sha256-simd")
520 (license asl2.0))))
bde48edc 521
0921b230 522(define-public go-github-com-oschwald-geoip2-golang
d277b9bc
LF
523 (package
524 (name "go-github-com-oschwald-geoip2-golang")
525 (version "1.1.0")
526 (source (origin
527 (method git-fetch)
528 (uri (git-reference
529 (url "https://github.com/oschwald/geoip2-golang")
530 (commit (string-append "v" version))))
531 (file-name (git-file-name name version))
532 (sha256
533 (base32
534 "0v698bzs8lb59cqpsa9cf4sl8rdsvnnmaravhbfn6g6i511ppclr"))))
535 (build-system go-build-system)
536 (propagated-inputs
537 `(("go-github-com-oschwald-maxminddb-golang"
538 ,go-github-com-oschwald-maxminddb-golang)
539 ("go-golang-org-x-sys-unix" ,go-golang-org-x-sys-unix)))
540 (arguments
541 `(#:import-path "github.com/oschwald/geoip2-golang"
542 #:tests? #f)) ; Requires some unpackaged software and test data
543 (synopsis "MaxMind GeoIP2 reader")
544 (description "This packages provides a library for reading MaxMind
0921b230 545GeoLite2 and GeoIP2 databases in Go.")
d277b9bc
LF
546 (home-page "https://github.com/oschwald/geoip2-golang")
547 (license isc)))
0921b230 548
a57778f5 549(define-public go-github-com-oschwald-maxminddb-golang
ac909141 550 (let ((commit "26fe5ace1c706491c2936119e1dc69c1a9c04d7f")
a57778f5
LF
551 (revision "0"))
552 (package
553 (name "go-github-com-oschwald-maxminddb-golang")
ac909141 554 (version (git-version "1.2.0" revision commit))
a57778f5
LF
555 (source (origin
556 (method git-fetch)
557 (uri (git-reference
558 (url "https://github.com/oschwald/maxminddb-golang")
559 (commit commit)))
560 (file-name (git-file-name name version))
561 (sha256
562 (base32
ac909141 563 "1i6d935f3cv9djpjvc2ibh8aps8jqvg454b9pkwg2h98al759ggk"))))
a57778f5
LF
564 (build-system go-build-system)
565 (propagated-inputs
566 `(("go-golang-org-x-sys-unix" ,go-golang-org-x-sys-unix)))
567 (arguments
568 `(#:import-path "github.com/oschwald/maxminddb-golang"
569 #:tests? #f)) ; Requires some unpackaged software and test data
570 (synopsis "MaxMind DB Reader for Go")
571 (description "This is a Go reader for the MaxMind DB format. Although
572this can be used to read GeoLite2 and GeoIP2 databases, @code{geoip2} provides a
573higher-level API for doing so.")
574 (home-page "https://github.com/oschwald/maxminddb-golang")
575 (license isc))))
576
6bc1eb11
LF
577(define-public go-github-com-stathat-go
578 (let ((commit "74669b9f388d9d788c97399a0824adbfee78400e")
579 (revision "0"))
580 (package
581 (name "go-github-com-stathat-go")
582 (version (git-version "0.0.0" revision commit))
583 (source (origin
584 (method git-fetch)
585 (uri (git-reference
586 (url "https://github.com/stathat/go")
587 (commit commit)))
588 (file-name (git-file-name name version))
589 (sha256
590 (base32
591 "1zzlsl24dyr202qkr2pay22m6d0gb7ssms77wgdx0r0clgm7dihw"))))
592 (build-system go-build-system)
593 (arguments
594 `(#:import-path "github.com/stathat/go"))
595 (synopsis "Post statistics to StatHat")
596 (description "This is a Go package for posting to a StatHat account.")
597 (home-page "https://github.com/stathat/go")
598 (license expat))))
599
1a4795f9 600(define-public go-github-com-rcrowley-go-metrics
d2c7971d
LF
601 (let ((commit "e181e095bae94582363434144c61a9653aff6e50")
602 (revision "1"))
1a4795f9
LF
603 (package
604 (name "go-github-com-rcrowley-go-metrics")
605 (version (git-version "0.0.0" revision commit))
606 (source (origin
607 (method git-fetch)
608 (uri (git-reference
609 (url "https://github.com/rcrowley/go-metrics")
610 (commit commit)))
611 (file-name (git-file-name name version))
612 (sha256
613 (base32
d2c7971d 614 "1pwkyw801hy7n94skzk6h177zqcil6ayrmb5gs3jdpsfayh8ia5w"))))
1a4795f9
LF
615 (build-system go-build-system)
616 (arguments
617 `(#:import-path "github.com/rcrowley/go-metrics"))
618 (propagated-inputs
619 `(("go-github-com-stathat-go" ,go-github-com-stathat-go)))
620 (synopsis "Go port of Coda Hale's Metrics library")
621 (description "This package provides a Go implementation of Coda Hale's
622Metrics library.")
623 (home-page "https://github.com/rcrowley/go-metrics")
624 (license bsd-2))))
625
8d7e9924 626(define-public go-github-com-sasha-s-go-deadlock
feade866
LF
627 (let ((commit "03d40e5dbd5488667a13b3c2600b2f7c2886f02f")
628 (revision "1"))
8d7e9924
LF
629 (package
630 (name "go-github-com-sasha-s-go-deadlock")
631 (version (git-version "0.1.0" revision commit))
632 (source (origin
633 (method git-fetch)
634 (uri (git-reference
635 (url "https://github.com/sasha-s/go-deadlock")
636 (commit commit)))
637 (file-name (git-file-name name version))
638 (sha256
639 (base32
feade866 640 "13p7b7pakd9k1c2k0fs1hfim3c8mivz679977ai6zb01s4aw7gyg"))))
8d7e9924
LF
641 (build-system go-build-system)
642 (arguments
643 `(#:import-path "github.com/sasha-s/go-deadlock"))
644 (propagated-inputs
645 `(("go-github-com-petermattis-goid" ,go-github-com-petermattis-goid)))
646 (synopsis "Deadlock detection in go")
647 (description "This package provides tools for detecting deadlocks at
648run-time in Go.")
649 (home-page "https://github.com/sasha-s/go-deadlock")
650 (license asl2.0))))
651
c864a4a7 652(define-public go-github-com-syndtr-goleveldb
619db5cf
LF
653 (let ((commit "34011bf325bce385408353a30b101fe5e923eb6e")
654 (revision "2"))
c864a4a7
LF
655 (package
656 (name "go-github-com-syndtr-goleveldb")
657 (version (git-version "0.0.0" revision commit))
658 (source (origin
659 (method git-fetch)
660 (uri (git-reference
661 (url "https://github.com/syndtr/goleveldb")
662 (commit commit)))
663 (file-name (git-file-name name version))
664 (sha256
665 (base32
619db5cf 666 "097ja0vyj6p27zrxha9nhk09fj977xsvhmd3bk2hbyvnbw4znnhd"))))
c864a4a7
LF
667 (build-system go-build-system)
668 (propagated-inputs
669 `(("go-github-com-golang-snappy" ,go-github-com-golang-snappy)))
670 (arguments
671 `(#:import-path "github.com/syndtr/goleveldb/leveldb"
672 #:unpack-path "github.com/syndtr/goleveldb"
673 #:tests? #f)) ; XXX needs 'github.com/onsi/gomega' package
674 (synopsis "LevelDB key/value database")
675 (description "This is an implementation of the LevelDB key / value
676database in Go.")
677 (home-page "https://github.com/syndtr/goleveldb")
678 (license bsd-2))))
679
f7612f0f 680(define-public go-github-com-thejerf-suture
2ed97a22 681 (let ((commit "3f1fb62fe0a3cc6429122d7dc45588a8b59c5bb6")
f7612f0f
LF
682 (revision "0"))
683 (package
684 (name "go-github-com-thejerf-suture")
2ed97a22 685 (version (git-version "2.0.3" revision commit))
f7612f0f
LF
686 (source (origin
687 (method git-fetch)
688 (uri (git-reference
689 (url "https://github.com/thejerf/suture")
690 (commit commit)))
691 (file-name (git-file-name name version))
692 (sha256
693 (base32
2ed97a22 694 "0mp7gz6bp6xhggkgmbl33vpmrq3a6n2dkgcxbkb7csnpv4r4d59k"))))
f7612f0f
LF
695 (build-system go-build-system)
696 (arguments
697 `(#:import-path "github.com/thejerf/suture"))
698 (synopsis "Supervisor trees for Go")
699 (description "Suture provides Erlang-ish supervisor trees for Go.
700\"Supervisor trees\" -> \"sutree\" -> \"suture\" -> holds your code together
701when it's trying to die.
702
703It is intended to deal gracefully with the real failure cases that can occur
704with supervision trees (such as burning all your CPU time endlessly restarting
705dead services), while also making no unnecessary demands on the \"service\"
706code, and providing hooks to perform adequate logging with in a production
707environment")
708 (home-page "https://github.com/thejerf/suture")
709 (license expat))))
710
3c466da1
LF
711(define* (go-github-com-vitrun-qart-union
712 #:optional (packages (list go-github-com-vitrun-qart-coding
713 go-github-com-vitrun-qart-gf256
714 go-github-com-vitrun-qart-qr)))
715 (package
716 (name "go-github-com-vitrun-qart")
717 (version (package-version go-github-com-vitrun-qart-qr))
718 (source #f)
719 (build-system trivial-build-system)
720 (arguments
721 '(#:modules ((guix build union))
722 #:builder (begin
723 (use-modules (ice-9 match)
724 (guix build union))
725 (match %build-inputs
726 (((names . directories) ...)
727 (union-build (assoc-ref %outputs "out")
e3cfef22
MW
728 directories)
729 #t)))))
3c466da1
LF
730 (inputs (map (lambda (package)
731 (list (package-name package) package))
732 packages))
733 (synopsis "Union of qart libraries")
734 (description "This is a union of qart libraries.")
735 (home-page (package-home-page go-github-com-vitrun-qart-qr))
736 (license (package-license go-github-com-vitrun-qart-qr))))
737
292a6b0d
LF
738(define-public go-github-com-vitrun-qart-coding
739 (let ((commit "bf64b92db6b05651d6c25a3dabf2d543b360c0aa")
740 (revision "0"))
741 (package
742 (name "go-github-com-vitrun-qart-coding")
743 (version (git-version "0.0.0" revision commit))
744 (source (origin
745 (method git-fetch)
746 (uri (git-reference
747 (url "https://github.com/vitrun/qart")
748 (commit commit)))
749 (file-name (string-append "go-github-com-vitrun-qart-"
750 version "-checkout"))
751 (sha256
752 (base32
753 "1xk7qki703xmay9ghi3kq2bjf1iw9dz8wik55739d6i7sn77vvkc"))))
754 (build-system go-build-system)
755 (arguments
756 `(#:import-path "github.com/vitrun/qart/coding"
757 #:unpack-path "github.com/vitrun/qart"))
758 (synopsis "Low-level QR coding library")
759 (description "This package provides a library for embedding
760human-meaningful graphics in QR codes. However, instead of scribbling on
761redundant pieces and relying on error correction to preserve the meaning,
762@code{qart} engineers the encoded values to create the picture in a code with no
763inherent errors. This @code{qart} component, @code{coding}, implements
764low-level QR coding details.")
765 (home-page "https://github.com/vitrun/qart/")
766 (license bsd-3))))
767
6934827a
LF
768(define-public go-github-com-vitrun-qart-gf256
769 (let ((commit "bf64b92db6b05651d6c25a3dabf2d543b360c0aa")
770 (revision "0"))
771 (package
772 (name "go-github-com-vitrun-qart-gf256")
773 (version (git-version "0.0.0" revision commit))
774 (source (origin
775 (method git-fetch)
776 (uri (git-reference
777 (url "https://github.com/vitrun/qart")
778 (commit commit)))
779 (file-name (string-append "go-github-com-vitrun-qart-"
780 version "-checkout"))
781 (sha256
782 (base32
783 "1xk7qki703xmay9ghi3kq2bjf1iw9dz8wik55739d6i7sn77vvkc"))))
784 (build-system go-build-system)
785 (arguments
786 `(#:import-path "github.com/vitrun/qart/gf256"
787 #:unpack-path "github.com/vitrun/qart"))
788 (synopsis "Qart library for Galois Field GF(256) math")
789 (description "This package, a component of @code{qart}, provides @code{gf256},
790implements arithmetic over the Galois Field GF(256).")
791 (home-page "https://github.com/vitrun/qart")
892ced6d
LF
792 (license bsd-3))))
793
794(define-public go-github-com-vitrun-qart-qr
795 (let ((commit "bf64b92db6b05651d6c25a3dabf2d543b360c0aa")
796 (revision "0"))
797 (package
798 (name "go-github-com-vitrun-qart-qr")
799 (version (git-version "0.0.0" revision commit))
800 (source (origin
801 (method git-fetch)
802 (uri (git-reference
803 (url "https://github.com/vitrun/qart")
804 (commit commit)))
805 (file-name (string-append "go-github-com-vitrun-qart-"
806 version "-checkout"))
807 (sha256
808 (base32
809 "1xk7qki703xmay9ghi3kq2bjf1iw9dz8wik55739d6i7sn77vvkc"))))
810 (build-system go-build-system)
811 (arguments
812 `(#:import-path "github.com/vitrun/qart/qr"
813 #:unpack-path "github.com/vitrun/qart"))
814 (synopsis "Qart component for generating QR codes")
892ced6d
LF
815 (description "This package provides a library for embedding
816human-meaningful graphics in QR codes. However, instead of scribbling on
817redundant pieces and relying on error correction to preserve the meaning,
818@code{qart} engineers the encoded values to create the picture in a code with no
819inherent errors. This @code{qart} component, @code{qr}, provides QR code
820generation.")
821 (home-page "https://github.com/vitrun/qart")
6934827a
LF
822 (license bsd-3))))
823
cca22eb3
LF
824;; Go searches for library modules by looking in the GOPATH environment
825;; variable. This variable is a list of paths. However, Go does not
826;; keep searching on GOPATH if it tries and fails to import a module.
827;; So, we use a union for packages sharing a namespace.
828(define* (go-golang-org-x-crypto-union #:optional
829 (packages (list go-golang-org-x-crypto-blowfish
830 go-golang-org-x-crypto-bcrypt
831 go-golang-org-x-crypto-tea
832 go-golang-org-x-crypto-xtea
833 go-golang-org-x-crypto-pbkdf2
834 go-golang-org-x-crypto-twofish
835 go-golang-org-x-crypto-cast5
836 go-golang-org-x-crypto-salsa20)))
837 (package
838 (name "go-golang-org-x-crypto")
839 (version (package-version go-golang-org-x-crypto-bcrypt))
840 (source #f)
841 (build-system trivial-build-system)
842 (arguments
843 '(#:modules ((guix build union))
844 #:builder (begin
845 (use-modules (ice-9 match)
846 (guix build union))
847 (match %build-inputs
848 (((names . directories) ...)
849 (union-build (assoc-ref %outputs "out")
e3cfef22
MW
850 directories)
851 #t)))))
cca22eb3
LF
852 (inputs (map (lambda (package)
853 (list (package-name package) package))
854 packages))
855 (synopsis "Union of the Go x crypto libraries")
856 (description "A union of the Golang cryptographic libraries. A
857union is required because `go build` assumes that all of the headers and
858libraries are in the same directory.")
859 (home-page (package-home-page go-golang-org-x-crypto-bcrypt))
860 (license (package-license go-golang-org-x-crypto-bcrypt))))
861
4c3cc949
LF
862(define* (go-golang-org-x-net-union #:optional
863 (packages (list go-golang-org-x-net-ipv4
864 go-golang-org-x-net-bpf
4c3cc949
LF
865 go-golang-org-x-net-ipv6
866 go-golang-org-x-net-proxy
867 go-golang-org-x-net-internal-iana)))
868 (package
869 (name "go-golang-org-x-net")
870 (version (package-version go-golang-org-x-net-ipv4))
871 (source #f)
872 (build-system trivial-build-system)
873 (arguments
874 '(#:modules ((guix build union))
875 #:builder (begin
876 (use-modules (ice-9 match)
877 (guix build union))
878 (match %build-inputs
879 (((names . directories) ...)
880 (union-build (assoc-ref %outputs "out")
e3cfef22
MW
881 directories)
882 #t)))))
4c3cc949
LF
883 (inputs (map (lambda (package)
884 (list (package-name package) package))
885 packages))
886 (synopsis "Union of the Go net libraries")
887 (description "A union of the Golang net libraries.")
888 (home-page (package-home-page go-golang-org-x-net-ipv4))
889 (license (package-license go-golang-org-x-net-ipv4))))
890
ae8c7774
LF
891(define* (go-golang-org-x-text-union #:optional
892 (packages (list go-golang-org-x-text-transform
893 go-golang-org-x-text-unicode-norm)))
894 (package
895 (name "go-golang-org-x-text")
896 (version (package-version go-golang-org-x-text-transform))
897 (source #f)
898 (build-system trivial-build-system)
899 (arguments
900 '(#:modules ((guix build union))
901 #:builder (begin
902 (use-modules (ice-9 match)
903 (guix build union))
904 (match %build-inputs
905 (((names . directories) ...)
906 (union-build (assoc-ref %outputs "out")
e3cfef22
MW
907 directories)
908 #t)))))
ae8c7774
LF
909 (inputs (map (lambda (package)
910 (list (package-name package) package))
911 packages))
912 (synopsis "Union of the Go text libraries")
913 (description "A union of the Golang text libraries.")
914 (home-page (package-home-page go-golang-org-x-text-transform))
915 (license (package-license go-golang-org-x-text-transform))))
916
6deb73c4 917(define-public go-github-com-audriusbutkevicius-pfilter
23e2c09c
LF
918 (let ((commit "9dca34a5b530bfc9843fa8aa2ff08ff9821032cb")
919 (revision "2"))
6deb73c4
LF
920 (package
921 (name "go-github-com-audriusbutkevicius-pfilter")
922 (version (git-version "0.0.0" revision commit))
923 (source
924 (origin
925 (method git-fetch)
926 (uri (git-reference
927 (url "https://github.com/AudriusButkevicius/pfilter.git")
928 (commit commit)))
929 (file-name (git-file-name name version))
930 (sha256
931 (base32
23e2c09c 932 "0i4qbnwba49db27fb1y792gcvhb0m744i9q4zgwjbypqmy3bj2a5"))))
6deb73c4
LF
933 (build-system go-build-system)
934 (arguments
935 '(#:import-path "github.com/AudriusButkevicius/pfilter"))
936 (synopsis "Filter packets into mulitple virtual connections")
937 (description "Pfilter is a Go package for filtering packets into multiple
938virtual connections from a single physical connection.")
939 (home-page "https://github.com/AudriusButkevicius/pfilter")
940 (license expat))))
db64cb40 941
2785690a 942(define-public go-github-com-chmduquesne-rollinghash-adler32
a624be49
LF
943 (let ((commit "abb8cbaf9915e48ee20cae94bcd94221b61707a2")
944 (revision "2"))
2785690a
LF
945 (package
946 (name "go-github-com-chmduquesne-rollinghash-adler32")
947 (version (git-version "0.0.0" revision commit))
948 (source
949 (origin
950 (method git-fetch)
951 (uri (git-reference
952 (url "https://github.com/chmduquesne/rollinghash.git")
953 (commit commit)))
954 (file-name (git-file-name name version))
955 (sha256
956 (base32
a624be49 957 "0ylqb9r60q77qw0d6g9cg4yzadxzwcw74lfd25cw9yglyq0wgd3l"))))
2785690a
LF
958 (build-system go-build-system)
959 (arguments
960 '(#:import-path "github.com/chmduquesne/rollinghash/adler32"
961 #:unpack-path "github.com/chmduquesne/rollinghash"))
962 (synopsis "Adler-32 rolling hash in Go")
963 (description "This package provides a Go implementation of the Adler-32
964rolling hash.")
965 (home-page "https://github.com/chmduquesne/rollinghash")
966 (license expat))))
3d86b557 967
936e02b4 968(define-public go-github-com-pkg-errors
1ad4e366
LF
969 (let ((commit "e881fd58d78e04cf6d0de1217f8707c8cc2249bc")
970 (revision "1"))
936e02b4
LF
971 (package
972 (name "go-github-com-pkg-errors")
973 (version (git-version "0.0.0" revision commit))
974 (source (origin
975 (method git-fetch)
976 (uri (git-reference
977 (url "https://github.com/pkg/errors.git")
978 (commit commit)))
979 (file-name (git-file-name name version))
980 (sha256
981 (base32
1ad4e366 982 "0vfhj598jp6dzy4pbyjdrqxzb5kppw8ggvfh78g80nz11r34xnzs"))))
936e02b4
LF
983 (build-system go-build-system)
984 (arguments
985 `(#:import-path "github.com/pkg/errors"))
986 (synopsis "Go error handling primitives")
987 (description "This packages provides @code{error}, which offers simple
988error handling primitives in Go.")
989 (home-page "https://github.com/pkg/errors")
990 (license bsd-2))))
991
73a2f841
LF
992(define-public go-github-com-petermattis-goid
993 (let ((commit "3db12ebb2a599ba4a96bea1c17b61c2f78a40e02")
994 (revision "0"))
995 (package
996 (name "go-github-com-petermattis-goid")
997 (version (git-version "0.0.0" revision commit))
998 (source (origin
999 (method git-fetch)
1000 (uri (git-reference
1001 (url "https://github.com/petermattis/goid.git")
1002 (commit commit)))
1003 (file-name (git-file-name name version))
1004 (sha256
1005
1006 (base32
1007 "0z18a3mr72c52g7g94n08gxw0ksnaafbfwdl5p5jav2sffirb0kd"))))
1008 (build-system go-build-system)
1009 (arguments
1010 '(#:import-path "github.com/petermattis/goid"))
1011 (synopsis "Identify the running goroutine")
1012 (description "This package offers a method of programatically retrieving
1013the current goroutine's ID.")
1014 (home-page "https://github.com/petermattis/goid")
1015 (license asl2.0))))
71415e23
LF
1016
1017(define-public go-github-com-audriusbutkevicius-cli
1018 (let ((commit "7f561c78b5a4aad858d9fd550c92b5da6d55efbb")
1019 (revision "0"))
1020 (package
1021 (name "go-github-com-audriusbutkevicius-cli")
1022 (version (git-version "0.0.0" revision commit))
1023 (source (origin
1024 (method git-fetch)
1025 (uri (git-reference
1026 (url "https://github.com/AudriusButkevicius/cli.git")
1027 (commit commit)))
1028 (file-name (git-file-name name version))
1029 (sha256
1030 (base32
1031 "0bg26pfg25vr16jmczig2m493mja2nxjxyswz3hha7avxw20rpi5"))))
1032 (build-system go-build-system)
1033 (arguments
1034 '(#:import-path "github.com/AudriusButkevicius/cli"))
1035 (synopsis "Library for building command-line interfaces in Go")
1036 (description "This package provides a library for building command-line
1037interfaces in Go.")
1038 (home-page "https://github.com/AudriusButkevicius/cli")
1039 (license expat))))
89d91ee2
LF
1040
1041(define-public go-github-com-kballard-go-shellquote
1042 (let ((commit "cd60e84ee657ff3dc51de0b4f55dd299a3e136f2")
1043 (revision "0"))
1044 (package
1045 (name "go-github-com-kballard-go-shellquote")
1046 (version (git-version "0.0.0" revision commit))
1047 (source (origin
1048 (method git-fetch)
1049 (uri (git-reference
1050 (url "https://github.com/kballard/go-shellquote.git")
1051 (commit commit)))
1052 (file-name (git-file-name name version))
1053 (sha256
1054 (base32
1055 "1xjpin4jq1zl84dcn96xhjmn9bsfyszf6g9aqyj2dc0xfi6c88y0"))))
1056 (build-system go-build-system)
1057 (arguments
1058 '(#:import-path "github.com/kballard/go-shellquote"))
1059 (synopsis "Shell-style string joins and splits")
1060 (description "Shellquote provides utilities for joining/splitting strings
1061using sh's word-splitting rules.")
1062 (home-page "https://github.com/kballard/go-shellquote")
1063 (license expat))))
a3d98dd8 1064
2849c665 1065(define-public go-github-com-syncthing-notify
e76709f7
LF
1066 (let ((commit "b76b45868a77e7800dd06cce61101af9c4274bcc")
1067 (revision "2"))
52ff28e4 1068 (package
2849c665 1069 (name "go-github-com-syncthing-notify")
52ff28e4
LF
1070 (version (git-version "0.0.0" revision commit))
1071 (source (origin
1072 (method git-fetch)
1073 (uri (git-reference
2849c665 1074 (url "https://github.com/syncthing/notify")
52ff28e4
LF
1075 (commit commit)))
1076 (file-name (git-file-name name version))
1077 (sha256
1078 (base32
e76709f7 1079 "1xxkzaxygxxr51i2kdxsdaqb5i95hqpkw4kcr75wmsp914slw2q9"))))
52ff28e4
LF
1080 (build-system go-build-system)
1081 (arguments
2849c665 1082 '(#:import-path "github.com/syncthing/notify"))
52ff28e4
LF
1083 (propagated-inputs
1084 `(("go-golang-org-x-sys-unix" ,go-golang-org-x-sys-unix)))
3bd840e4 1085 (synopsis "File system event notification library")
162a1374 1086 (description "This package provides @code{notify}, a file system event
52ff28e4 1087notification library in Go.")
2849c665 1088 (home-page "https://github.com/syncthing/notify")
52ff28e4 1089 (license expat))))
63aade45 1090
a04434f2
LF
1091(define-public go-github-com-beorn7-perks-quantile
1092 (let ((commit "4c0e84591b9aa9e6dcfdf3e020114cd81f89d5f9")
1093 (revision "0"))
1094 (package
1095 (name "go-github-com-beorn7-perks-quantile")
1096 (version (git-version "0.0.0" revision commit))
1097 (source (origin
1098 (method git-fetch)
1099 (uri (git-reference
1100 (url "https://github.com/beorn7/perks.git")
1101 (commit commit)))
1102 (file-name (git-file-name name version))
1103 (sha256
1104 (base32
1105 "1hrybsql68xw57brzj805xx2mghydpdiysv3gbhr7f5wlxj2514y"))))
1106 (build-system go-build-system)
1107 (arguments
1108 '(#:import-path "github.com/beorn7/perks/quantile"
1109 #:unpack-path "github.com/beorn7/perks"))
1110 (synopsis "Compute approximate quantiles over an unbounded data stream")
1111 (description "Perks contains the Go package @code{quantile} that computes
1112approximate quantiles over an unbounded data stream within low memory and CPU
1113bounds.")
1114 (home-page "https://github.com/beorn7/perks")
1115 (license expat))))
339e44da
LF
1116
1117(define-public go-github-com-golang-protobuf-proto
1118 (let ((commit "1e59b77b52bf8e4b449a57e6f79f21226d571845")
1119 (revision "0"))
1120 (package
1121 (name "go-github-com-golang-protobuf-proto")
1122 (version (git-version "0.0.0" revision commit))
1123 (source (origin
1124 (method git-fetch)
1125 (uri (git-reference
1126 (url "https://github.com/golang/protobuf.git")
1127 (commit commit)))
1128 (file-name (git-file-name name version))
1129 (sha256
1130 (base32
1131 "19bkh81wnp6njg3931wky6hsnnl2d1ig20vfjxpv450sd3k6yys8"))))
1132 (build-system go-build-system)
1133 (arguments
1134 '(#:import-path "github.com/golang/protobuf/proto"
1135 #:unpack-path "github.com/golang/protobuf"
1136 #:tests? #f ; requires unpackaged golang.org/x/sync/errgroup
1137 ))
1138 (synopsis "Go support for Protocol Buffers")
1139 (description "This package provides Go support for the Protocol Buffers
1140data serialization format.")
1141 (home-page "https://github.com/golang/protobuf")
1142 (license bsd-3))))
4b6b1a38
LF
1143
1144(define-public go-github-com-prometheus-client-model-go
1145 (let ((commit "99fa1f4be8e564e8a6b613da7fa6f46c9edafc6c")
1146 (revision "0"))
1147 (package
1148 (name "go-github-com-prometheus-client-model-go")
1149 (version (git-version "0.0.2" revision commit))
1150 (source (origin
1151 (method git-fetch)
1152 (uri (git-reference
1153 (url "https://github.com/prometheus/client_model.git")
1154 (commit commit)))
1155 (file-name (git-file-name name version))
1156 (sha256
1157 (base32
1158 "19y4ywsivhpxj7ikf2j0gm9k3cmyw37qcbfi78n526jxcc7kw998"))))
1159 (build-system go-build-system)
1160 (arguments
1161 '(#:import-path "github.com/prometheus/client_model/go"
1162 #:unpack-path "github.com/prometheus/client_model"))
1163 (propagated-inputs
1164 `(("go-github-com-golang-protobuf-proto"
1165 ,go-github-com-golang-protobuf-proto)))
1166 (synopsis "Data model artifacts for Prometheus")
1167 (description "This package provides data model artifacts for Prometheus.")
1168 (home-page "https://github.com/prometheus/client_model")
1169 (license asl2.0))))
1da227b0
LF
1170
1171(define-public go-github-com-matttproud-golang-protobuf-extensions-pbutil
1172 (let ((commit "c12348ce28de40eed0136aa2b644d0ee0650e56c")
1173 (revision "0"))
1174 (package
1175 (name "go-github-com-matttproud-golang-protobuf-extensions-pbutil")
1176 (version (git-version "1.0.0" revision commit))
1177 (source
1178 (origin
1179 (method git-fetch)
1180 (uri
1181 (git-reference
1182 (url "https://github.com/matttproud/golang_protobuf_extensions.git")
1183 (commit commit)))
1184 (file-name (git-file-name name version))
1185 (sha256
1186 (base32
1187 "1d0c1isd2lk9pnfq2nk0aih356j30k3h1gi2w0ixsivi5csl7jya"))))
1188 (build-system go-build-system)
1189 (arguments
1190 '(#:import-path "github.com/matttproud/golang_protobuf_extensions/pbutil"
1191 #:unpack-path "github.com/matttproud/golang_protobuf_extensions"))
1192 (propagated-inputs
1193 `(("go-github-com-golang-protobuf-proto"
1194 ,go-github-com-golang-protobuf-proto)))
1195 (synopsis "Streaming Protocol Buffers in Go")
1196 (description "This package provides various Protocol Buffer
1197extensions for the Go language, namely support for record length-delimited
1198message streaming.")
1199 (home-page "https://github.com/matttproud/golang_protobuf_extensions")
1200 (license asl2.0))))
270590bd
LF
1201
1202(define-public go-github-com-prometheus-common-expfmt
1203 (let ((commit "2e54d0b93cba2fd133edc32211dcc32c06ef72ca")
1204 (revision "0"))
1205 (package
1206 (name "go-github-com-prometheus-common-expfmt")
1207 (version (git-version "0.0.0" revision commit))
1208 (source (origin
1209 (method git-fetch)
1210 (uri (git-reference
1211 (url "https://github.com/prometheus/common.git")
1212 (commit commit)))
1213 (file-name (git-file-name name version))
1214 (sha256
1215 (base32
1216 "14kn5w7imcxxlfdqxl21fsnlf1ms7200g3ldy29hwamldv8qlm7j"))))
1217 (build-system go-build-system)
1218 (arguments
1219 '(#:import-path "github.com/prometheus/common/expfmt"
1220 #:unpack-path "github.com/prometheus/common"
1221 #:phases
1222 (modify-phases %standard-phases
1223 (add-before 'reset-gzip-timestamps 'make-gzip-archive-writable
1224 (lambda* (#:key outputs #:allow-other-keys)
1225 (map (lambda (file)
1226 (make-file-writable file))
1227 (find-files
1228 (string-append (assoc-ref outputs "out")
1229 "/src/github.com/prometheus/common/expfmt/testdata/")
1230 ".*\\.gz$"))
1231 #t)))))
1232 (propagated-inputs
1233 `(("go-github-com-golang-protobuf-proto"
1234 ,go-github-com-golang-protobuf-proto)
1235 ("go-github-com-matttproud-golang-protobuf-extensions-pbutil"
1236 ,go-github-com-matttproud-golang-protobuf-extensions-pbutil)
1237 ("go-github-com-prometheus-client-model-go"
1238 ,go-github-com-prometheus-client-model-go)))
1239 (synopsis "Prometheus metrics")
1240 (description "This package provides tools for reading and writing
1241Prometheus metrics.")
1242 (home-page "https://github.com/prometheus/common")
1243 (license asl2.0))))
13dca4a5
LF
1244
1245(define-public go-github-com-prometheus-procfs
1246 (let ((commit "b15cd069a83443be3154b719d0cc9fe8117f09fb")
1247 (revision "0"))
1248 (package
1249 (name "go-github-com-prometheus-procfs")
1250 (version (git-version "0.0.0" revision commit))
1251 (source (origin
1252 (method git-fetch)
1253 (uri (git-reference
1254 (url "https://github.com/prometheus/procfs.git")
1255 (commit commit)))
1256 (file-name (git-file-name name version))
1257 (sha256
1258 (base32
1259 "1cr45wg2m40bj2za8f32mq09rjlcnk5kfam0h0hr8wcb015k4wxj"))))
1260 (build-system go-build-system)
1261 (arguments
1262 '(#:import-path "github.com/prometheus/procfs"))
1263 (synopsis "Go library for reading @file{/proc}")
3bd840e4
TGR
1264 (description "The @code{procfs} Go package provides functions to retrieve
1265system, kernel, and process metrics from the @file{/proc} pseudo file system.")
13dca4a5
LF
1266 (home-page "https://github.com/prometheus/procfs")
1267 (license asl2.0))))
bfbe868d
LF
1268
1269(define-public go-github-com-client-golang-prometheus-promhttp
1270 (let ((commit "180b8fdc22b4ea7750bcb43c925277654a1ea2f3")
1271 (revision "0"))
1272 (package
1273 (name "go-github-com-client-golang-prometheus-promhttp")
1274 (version (git-version "0.0.0" revision commit))
1275 (source (origin
1276 (method git-fetch)
1277 (uri (git-reference
1278 (url "https://github.com/prometheus/client_golang.git")
1279 (commit commit)))
1280 (file-name (git-file-name name version))
1281 (sha256
1282 (base32
1283 "1kkfx1j9ka18ydsmdi2cdy3hs39c22b39mbc4laykmj2x93lmbdp"))))
1284 (build-system go-build-system)
1285 (arguments
1286 '(#:tests? #f ; The tests require internet access
1287 #:import-path "github.com/prometheus/client_golang/prometheus/promhttp"
1288 #:unpack-path "github.com/prometheus/client_golang"))
1289 (propagated-inputs
1290 `(("go-github-com-beorn7-perks-quantile"
1291 ,go-github-com-beorn7-perks-quantile)
1292 ("go-github-com-golang-protobuf-proto"
1293 ,go-github-com-golang-protobuf-proto)
1294 ("go-github-com-prometheus-client-model-go"
1295 ,go-github-com-prometheus-client-model-go)
1296 ("go-github-com-prometheus-common-expfmt"
1297 ,go-github-com-prometheus-common-expfmt)
1298 ("go-github-com-prometheus-procfs" ,go-github-com-prometheus-procfs)))
1299 (synopsis "HTTP server and client tools for Prometheus")
1300 (description "This package @code{promhttp} provides HTTP client and
1301server tools for Prometheus metrics.")
1302 (home-page "https://github.com/prometheus/client_golang")
1303 (license asl2.0))))
fa22168b
LF
1304
1305(define-public go-github-com-client-golang-prometheus
1306 (let ((commit "180b8fdc22b4ea7750bcb43c925277654a1ea2f3")
1307 (revision "0"))
1308 (package
1309 (name "go-github-com-prometheus-client-golang-prometheus")
1310 (version (git-version "0.0.0" revision commit))
1311 (source (origin
1312 (method git-fetch)
1313 (uri (git-reference
1314 (url "https://github.com/prometheus/client_golang.git")
1315 (commit commit)))
1316 (file-name (git-file-name name version))
1317 (sha256
1318 (base32
1319 "1kkfx1j9ka18ydsmdi2cdy3hs39c22b39mbc4laykmj2x93lmbdp"))))
1320 (build-system go-build-system)
1321 (arguments
1322 '(#:import-path "github.com/prometheus/client_golang/prometheus"
1323 #:unpack-path "github.com/prometheus/client_golang"))
1324 (propagated-inputs
1325 `(("go-github-com-beorn7-perks-quantile"
1326 ,go-github-com-beorn7-perks-quantile)
1327 ("go-github-com-golang-protobuf-proto"
1328 ,go-github-com-golang-protobuf-proto)
1329 ("go-github-com-prometheus-client-model-go"
1330 ,go-github-com-prometheus-client-model-go)
1331 ("go-github-com-prometheus-common-expfmt"
1332 ,go-github-com-prometheus-common-expfmt)
1333 ("go-github-com-prometheus-procfs" ,go-github-com-prometheus-procfs)
1334 ("go-github-com-client-golang-prometheus-promhttp"
1335 ,go-github-com-client-golang-prometheus-promhttp)))
1336 (synopsis "Prometheus instrumentation library for Go applications")
1337 (description "This package provides the Go client library for the
1338Prometheus monitoring and alerting system. It has two separate parts, one for
1339instrumenting application code, and one for creating clients that talk to the
1340Prometheus HTTP API.")
1341 (home-page "https://github.com/prometheus/client_golang")
1342 (license asl2.0))))
f07ccbc2
LF
1343
1344(define* (go-github-com-prometheus-union
1345 #:optional (packages (list go-github-com-client-golang-prometheus
1346 go-github-com-client-golang-prometheus-promhttp)))
1347 (package
1348 (name "go-github-com-prometheus-union")
1349 (version (package-version go-github-com-client-golang-prometheus))
1350 (source #f)
1351 (build-system trivial-build-system)
1352 (arguments
1353 '(#:modules ((guix build union))
1354 #:builder (begin
1355 (use-modules (ice-9 match)
1356 (guix build union))
1357 (match %build-inputs
1358 (((names . directories) ...)
1359 (union-build (assoc-ref %outputs "out")
e3cfef22
MW
1360 directories)
1361 #t)))))
f07ccbc2
LF
1362 (inputs (map (lambda (package)
1363 (list (package-name package) package))
1364 packages))
1365 (synopsis "Union of Go Prometheus libraries")
1366 (description "This is a union of Go Prometheus libraries")
1367 (home-page (package-home-page go-github-com-client-golang-prometheus))
1368 (license (package-license go-github-com-client-golang-prometheus))))