Merge branch 'master' into core-updates
[jackhill/guix/guix.git] / gnu / packages / syncthing.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2016 Petter <petter@mykolab.ch>
3 ;;; Copyright © 2016, 2017, 2018, 2019, 2020 Leo Famulari <leo@famulari.name>
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)
22 #:use-module (guix build-system trivial)
23 #:use-module (guix packages)
24 #:use-module (guix download)
25 #:use-module (guix git-download)
26 #:use-module (guix licenses)
27 #:use-module (gnu packages)
28 #:use-module (gnu packages golang))
29
30 (define-public syncthing
31 (package
32 (name "syncthing")
33 (version "1.4.0")
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
41 "1p9y943kd09pxmsaahbdml2mn2qlwbx23hvbsm1sqbbm8ma9ai8c"))
42 (modules '((guix build utils)))
43 ;; Delete bundled ("vendored") free software source code.
44 (snippet '(begin
45 (delete-file-recursively "vendor")
46 #t))))
47 (build-system go-build-system)
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"))
52 ;; When updating Syncthing, check 'go.mod' in the source distribution to
53 ;; ensure we are using the correct versions of these dependencies.
54 (inputs
55 `(("go-github-com-jackpal-go-nat-pmp"
56 ,go-github-com-jackpal-go-nat-pmp)
57 ("go-github-com-bkaradzic-go-lz4" ,go-github-com-bkaradzic-go-lz4)
58 ("go-github-com-calmh-xdr" ,go-github-com-calmh-xdr)
59 ("go-github-com-chmduquesne-rollinghash"
60 ,go-github-com-chmduquesne-rollinghash)
61 ("go-github-com-gobwas-glob" ,go-github-com-gobwas-glob)
62 ("go-github-com-golang-groupcache-lru"
63 ,go-github-com-golang-groupcache-lru)
64 ("go-github-com-jackpal-gateway" ,go-github-com-jackpal-gateway)
65 ("go-github-com-kballard-go-shellquote"
66 ,go-github-com-kballard-go-shellquote)
67 ("go-github-com-lib-pq" ,go-github-com-lib-pq)
68 ("go-github-com-minio-sha256-simd" ,go-github-com-minio-sha256-simd)
69 ("go-github-com-oschwald-geoip2-golang"
70 ,go-github-com-oschwald-geoip2-golang)
71 ("go-github-com-pkg-errors" ,go-github-com-pkg-errors)
72 ("go-github-com-rcrowley-go-metrics" ,go-github-com-rcrowley-go-metrics)
73 ("go-github-com-sasha-s-go-deadlock" ,go-github-com-sasha-s-go-deadlock)
74 ("go-github-com-syncthing-notify" ,go-github-com-syncthing-notify)
75 ("go-github-com-syndtr-goleveldb" ,go-github-com-syndtr-goleveldb)
76 ("go-github-com-thejerf-suture" ,go-github-com-thejerf-suture)
77 ("go-golang-org-x-time" ,go-golang-org-x-time)
78 ("go-gopkg.in-ldap.v2" ,go-gopkg.in-ldap.v2)
79 ("go-github-com-gogo-protobuf" ,go-github-com-gogo-protobuf)
80 ("go-github-com-shirou-gopsutil" ,go-github-com-shirou-gopsutil)
81 ("go-github-com-prometheus-client-golang"
82 ,go-github-com-prometheus-client-golang)
83 ("go-golang-org-x-net" ,go-golang-org-x-net)
84 ("go-golang-org-x-text" ,go-golang-org-x-text)
85 ("go-github-com-audriusbutkevicius-recli"
86 ,go-github-com-audriusbutkevicius-recli)
87 ("go-github-com-urfave-cli" ,go-github-com-urfave-cli)
88 ("go-github-com-vitrun-qart" ,go-github-com-vitrun-qart)
89 ("go-github-com-mattn-go-isatty" ,go-github-com-mattn-go-isatty)
90 ("go-golang-org-x-crypto" ,go-golang-org-x-crypto)
91 ("go-github-com-flynn-archive-go-shlex"
92 ,go-github-com-flynn-archive-go-shlex)
93 ("go-github-com-getsentry-raven-go" ,go-github-com-getsentry-raven-go)
94 ("go-github-com-maruel-panicparse" ,go-github-com-maruel-panicparse)
95 ("go-github-com-ccding-go-stun" ,go-github-com-ccding-go-stun)
96 ("go-github-com-audriusbutkevicius-pfilter" ,go-github-com-audriusbutkevicius-pfilter)
97 ("go-github-com-lucas-clemente-quic-go" ,go-github-com-lucas-clemente-quic-go)
98 ("go-github-com-willf-bloom" ,go-github-com-willf-bloom)
99
100 ;; For tests
101 ("go-github-com-d4l3k-messagediff" ,go-github-com-d4l3k-messagediff)))
102
103 (arguments
104 `(#:modules ((srfi srfi-26) ; for cut
105 (guix build utils)
106 (guix build go-build-system))
107 #:import-path "github.com/syncthing/syncthing"
108 ;; We don't need to install the source code for end-user applications.
109 #:install-source? #f
110 #:phases
111 (modify-phases %standard-phases
112 (add-before 'build 'increase-test-timeout
113 (lambda _
114 (substitute* "src/github.com/syncthing/syncthing/build.go"
115 (("120s") "999s"))
116 #t))
117
118 (replace 'build
119 (lambda _
120 (with-directory-excursion "src/github.com/syncthing/syncthing"
121 ;; XXX The only way to build Syncthing without its automatic
122 ;; updater and to build the utilities is to "build all" and then
123 ;; "build syncthing" again with -no-upgrade.
124 ;; https://github.com/syncthing/syncthing/issues/6118
125 (invoke "go" "run" "build.go" "build" "all")
126 (delete-file "syncthing")
127 (invoke "go" "run" "build.go" "-no-upgrade" "build" "syncthing"))))
128
129 (replace 'check
130 (lambda _
131 (with-directory-excursion "src/github.com/syncthing/syncthing"
132 (invoke "go" "run" "build.go" "test"))))
133
134 (replace 'install
135 (lambda* (#:key outputs #:allow-other-keys)
136 (let ((out (assoc-ref outputs "out"))
137 (utils (assoc-ref outputs "utils")))
138 (with-directory-excursion "src/github.com/syncthing/syncthing"
139 (install-file "syncthing" (string-append out "/bin"))
140 (for-each (cut install-file <> (string-append utils "/bin/"))
141 '("stcli" "stcompdirs" "stcrashreceiver"
142 "stdisco" "stdiscosrv" "stevents" "stfileinfo"
143 "stfinddevice" "stfindignored" "stgenfiles"
144 "stindex" "strelaypoolsrv" "strelaysrv" "stsigtool"
145 "stvanity" "stwatchfile" "uraggregate" "ursrv"))
146 #t))))
147
148 (add-after 'install 'install-docs
149 (lambda* (#:key outputs #:allow-other-keys)
150 (let* ((out (assoc-ref outputs "out"))
151 (utils (assoc-ref outputs "utils"))
152 (man "/share/man")
153 (man-section (string-append man "/man"))
154 (src "src/github.com/syncthing/syncthing/man/"))
155 ;; Install all the man pages to "out".
156 (for-each
157 (lambda (file)
158 (install-file file
159 (string-append out man-section
160 (string-take-right file 1))))
161 (find-files src "\\.[1-9]"))
162 ;; Copy all the man pages to "utils"
163 (copy-recursively (string-append out man)
164 (string-append utils man))
165 ;; Delete extraneous man pages from "out" and "utils",
166 ;; respectively.
167 (delete-file (string-append out man "/man1/stdiscosrv.1"))
168 (delete-file (string-append out man "/man1/strelaysrv.1"))
169 (delete-file (string-append utils man "/man1/syncthing.1"))
170 #t))))))
171 (synopsis "Decentralized continuous file system synchronization")
172 (description "Syncthing is a peer-to-peer file synchronization tool that
173 supports a wide variety of computing platforms. It uses the Block Exchange
174 Protocol.")
175 (home-page "https://github.com/syncthing/syncthing")
176 (license mpl2.0)))
177
178 (define-public go-github-com-jackpal-go-nat-pmp
179 (package
180 (name "go-github-com-jackpal-go-nat-pmp")
181 (version "1.0.2")
182 (source (origin
183 (method git-fetch)
184 (uri (git-reference
185 (url "https://github.com/jackpal/go-nat-pmp")
186 (commit (string-append "v" version))))
187 (file-name (git-file-name name version))
188 (sha256
189 (base32
190 "1p2yrzfbkazc9nisr2iqjwzhb6q16zj6finyxxn2ikk7iiighl1g"))))
191 (build-system go-build-system)
192 (arguments
193 `(#:import-path "github.com/jackpal/go-nat-pmp"))
194 (synopsis "Port mapping and discovery of external IP address")
195 (description "This package provides a Go client for the NAT-PMP internet
196 protocol for port mapping and discovering the external IP address of a
197 firewall.")
198 (home-page "https://github.com/jackpal/go-nat-pmp")
199 (license asl2.0)))
200
201 (define-public go-github-com-audriusbutkevicius-recli
202 (package
203 (name "go-github-com-audriusbutkevicius-recli")
204 (version "0.0.5")
205 (source (origin
206 (method git-fetch)
207 (uri (git-reference
208 (url "https://github.com/AudriusButkevicius/recli")
209 (commit (string-append "v" version))))
210 (file-name (git-file-name name version))
211 (sha256
212 (base32
213 "1m1xna1kb78pkmr1lfmvvnpk9j7c4x71j3a7c6vj7zpzc4srpsmf"))))
214 (build-system go-build-system)
215 (inputs
216 `(("go-github-com-pkg-errors" ,go-github-com-pkg-errors)
217 ("go-github-com-urfave-cli" ,go-github-com-urfave-cli)))
218 (arguments
219 `(#:import-path "github.com/AudriusButkevicius/recli"))
220 (synopsis "Reflection-based CLI generator")
221 (description "For a given struct, @code{recli} builds a set of
222 @code{urfave/cli} commands which allows you to modify it from the command line.
223 It is useful for generating command line clients for your application
224 configuration that is stored in a Go struct.")
225 (home-page "https://github.com/AudriusButkevicius/recli")
226 (license mpl2.0)))
227
228 (define-public go-github-com-bkaradzic-go-lz4
229 (let ((commit "7224d8d8f27ef618c0a95f1ae69dbb0488abc33a")
230 (revision "0"))
231 (package
232 (name "go-github-com-bkaradzic-go-lz4")
233 (version (git-version "0.0.0" revision commit))
234 (source (origin
235 (method git-fetch)
236 (uri (git-reference
237 (url "https://github.com/bkaradzic/go-lz4")
238 (commit commit)))
239 (file-name (git-file-name name version))
240 (sha256
241 (base32
242 "10lmya17vdqg2pvqni0p73iahni48s1v11ya9a0hcz4jh5vw4dkb"))))
243 (build-system go-build-system)
244 (arguments
245 `(#:import-path "github.com/bkaradzic/go-lz4"))
246 (synopsis "LZ4 compression algorithm")
247 (description "This package provides @code{go-lz4}, a Go implementation of
248 the LZ4 compression algorithm.")
249 (home-page "https://github.com/bkaradzic/go-lz4")
250 (license bsd-2))))
251
252 (define-public go-github-com-calmh-du
253 (package
254 (name "go-github-com-calmh-du")
255 (version "1.0.1")
256 (source (origin
257 (method git-fetch)
258 (uri (git-reference
259 (url "https://github.com/calmh/du")
260 (commit (string-append "v" version))))
261 (file-name (git-file-name name version))
262 (sha256
263 (base32
264 "0qb3a6y3p9nkyn3s66k6zcm16y8n8578qh23ddj14cxf2scrr2n2"))))
265 (build-system go-build-system)
266 (arguments
267 `(#:import-path "github.com/calmh/du"))
268 (synopsis "Get total and available disk space of a given volume")
269 (description "This is a Go implementation of `du`. It provides disk usage
270 information, such as how much storage space is available, free, and used.")
271 (home-page "https://github.com/calmh/du")
272 (license public-domain)))
273
274 (define-public go-github-com-calmh-xdr
275 (package
276 (name "go-github-com-calmh-xdr")
277 (version "1.1.0")
278 (source (origin
279 (method git-fetch)
280 (uri (git-reference
281 (url "https://github.com/calmh/xdr")
282 (commit (string-append "v" version))))
283 (file-name (git-file-name name version))
284 (sha256
285 (base32
286 "072wqdncz3nd4a3zkhvzzx1y3in1lm29wfvl0d8wrnqs5pyqh0mh"))))
287 (build-system go-build-system)
288 (arguments
289 `(#:import-path "github.com/calmh/xdr"))
290 (synopsis "XDR marshalling and unmarshalling")
291 (description "XDR is an External Data Representation (XDR)
292 marshalling and unmarshalling library in Go. It uses code generation and not
293 reflection.")
294 (home-page "https://github.com/calmh/xdr")
295 (license expat)))
296
297 (define-public go-github-com-d4l3k-messagediff
298 (package
299 (name "go-github-com-d4l3k-messagediff")
300 (version "1.2.1")
301 (source (origin
302 (method git-fetch)
303 (uri (git-reference
304 (url "https://github.com/d4l3k/messagediff")
305 (commit (string-append "v" version))))
306 (file-name (git-file-name name version))
307 (sha256
308 (base32
309 "104hl8x57ciaz7mzafg1vp9qggxcyfm8hsv9bmlihbz9ml3nyr8v"))))
310 (build-system go-build-system)
311 (arguments
312 `(#:import-path "github.com/d4l3k/messagediff"))
313 (synopsis "Diff arbitrary Go structs")
314 (description "Messagediff is a library for calculating diffs of arbitrary
315 structs in the Go programming language.")
316 (home-page "https://github.com/d4l3k/messagediff")
317 (license expat)))
318
319 (define-public go-github-com-gobwas-glob
320 (package
321 (name "go-github-com-gobwas-glob")
322 (version "0.2.3")
323 (source (origin
324 (method git-fetch)
325 (uri (git-reference
326 (url "https://github.com/gobwas/glob")
327 (commit (string-append "v" version))))
328 (file-name (git-file-name name version))
329 (sha256
330 (base32
331 "0jxk1x806zn5x86342s72dq2qy64ksb3zrvrlgir2avjhwb18n6z"))))
332 (build-system go-build-system)
333 (arguments
334 `(#:import-path "github.com/gobwas/glob"))
335 (synopsis "Go globbing library")
336 (description "This package provides a Go implementation of globs.")
337 (home-page "https://github.com/gobwas/glob")
338 (license expat)))
339
340
341 (define-public go-github-com-golang-groupcache-lru
342 (let ((commit "869f871628b6baa9cfbc11732cdf6546b17c1298")
343 (revision "2"))
344 (package
345 (name "go-github-com-golang-groupcache-lru")
346 (version (git-version "0.0.0" revision commit))
347 (source (origin
348 (method git-fetch)
349 (uri (git-reference
350 (url "https://github.com/golang/groupcache")
351 (commit commit)))
352 (file-name (git-file-name name version))
353 (sha256
354 (base32
355 "0r4nk8129bvx50qb4xzjaay39b2h6k7cbdqqzdlanmc82ygczsbw"))))
356 (build-system go-build-system)
357 (arguments
358 `(#:import-path "github.com/golang/groupcache/lru"
359 #:unpack-path "github.com/golang/groupcache"))
360 (synopsis "Groupcache is a caching and cache-filling library")
361 (description "Groupcache is a caching and cache-filling library, intended
362 as a replacement for memcached in many cases. It provides a data loading
363 mechanism with caching and de-duplication that works across a set of peer
364 processes.")
365 (home-page "https://github.com/golang/groupcache")
366 (license asl2.0))))
367
368 (define-public go-github-com-golang-snappy
369 (let ((commit "553a641470496b2327abcac10b36396bd98e45c9")
370 (revision "0"))
371 (package
372 (name "go-github-com-golang-snappy")
373 (version (git-version "0.0.0" revision commit))
374 (source (origin
375 (method git-fetch)
376 (uri (git-reference
377 (url "https://github.com/golang/snappy")
378 (commit commit)))
379 (file-name (git-file-name name version))
380 (sha256
381 (base32
382 "0kssxnih1l722hx9219c7javganjqkqhvl3i0hp0hif6xm6chvqk"))))
383 (build-system go-build-system)
384 (arguments
385 `(#:import-path "github.com/golang/snappy"))
386 (synopsis "Snappy compression format in the Go programming language")
387 (description "This package provides a Go implementation of the Snappy
388 compression format.")
389 (home-page "https://github.com/golang/snappy")
390 (license bsd-3))))
391
392 (define-public go-github-com-jackpal-gateway
393 (package
394 (name "go-github-com-jackpal-gateway")
395 (version "1.0.5")
396 (source (origin
397 (method git-fetch)
398 (uri (git-reference
399 (url "https://github.com/jackpal/gateway")
400 (commit (string-append "v" version))))
401 (file-name (git-file-name name version))
402 (sha256
403 (base32
404 "1ird5xmizj632l3dq24s2xgb8w1dn6v8xznlqz252gvngyr2gjl1"))))
405 (build-system go-build-system)
406 (arguments
407 `(#:import-path "github.com/jackpal/gateway"))
408 (synopsis "Discover the address of a LAN gateway")
409 (description "@code{gateway} is a Go library for discovering the IP
410 address of the default LAN gateway.")
411 (home-page "https://github.com/jackpal/gateway")
412 (license bsd-3)))
413
414 (define-public go-github-com-lib-pq
415 (package
416 (name "go-github-com-lib-pq")
417 (version "1.2.0")
418 (source (origin
419 (method git-fetch)
420 (uri (git-reference
421 (url "https://github.com/lib/pq")
422 (commit (string-append "v" version))))
423 (file-name (git-file-name name version))
424 (sha256
425 (base32
426 "08j1smm6rassdssdks4yh9aspa1dv1g5nvwimmknspvhx8a7waqz"))))
427 (build-system go-build-system)
428 (arguments
429 `(#:import-path "github.com/lib/pq"
430 ;; The tests seem to fail without access to the network or a running
431 ;; Postgres instance.
432 #:tests? #f))
433 (synopsis "Golang Postgres driver for Go's database/sql")
434 (description "This package provides a pure Go Postgres driver for Go's
435 database/sql package.")
436 (home-page "https://github.com/lib/pq")
437 (license expat)))
438
439 (define-public go-github-com-oschwald-geoip2-golang
440 (package
441 (name "go-github-com-oschwald-geoip2-golang")
442 (version "1.4.0")
443 (source (origin
444 (method git-fetch)
445 (uri (git-reference
446 (url "https://github.com/oschwald/geoip2-golang")
447 (commit (string-append "v" version))))
448 (file-name (git-file-name name version))
449 (sha256
450 (base32
451 "1jj4rbdpy87rbl79czg5hs5dyn6xlbnk0bnvyzi71dsxan57nixw"))))
452 (build-system go-build-system)
453 (propagated-inputs
454 `(("go-github-com-oschwald-maxminddb-golang"
455 ,go-github-com-oschwald-maxminddb-golang)
456 ("go-golang-org-x-sys" ,go-golang-org-x-sys)))
457 (arguments
458 `(#:import-path "github.com/oschwald/geoip2-golang"
459 #:tests? #f)) ; Requires some unpackaged software and test data
460 (synopsis "MaxMind GeoIP2 reader")
461 (description "This package provides a library for reading MaxMind
462 GeoLite2 and GeoIP2 databases in Go.")
463 (home-page "https://github.com/oschwald/geoip2-golang")
464 (license isc)))
465
466 (define-public go-github-com-oschwald-maxminddb-golang
467 (package
468 (name "go-github-com-oschwald-maxminddb-golang")
469 (version "1.4.0")
470 (source (origin
471 (method git-fetch)
472 (uri (git-reference
473 (url "https://github.com/oschwald/maxminddb-golang")
474 (commit (string-append "v" version))))
475 (file-name (git-file-name name version))
476 (sha256
477 (base32
478 "100wd5qv00pkcm6cb8c4x5gavc9jnn7drh6xrqh85hzci4rils66"))))
479 (build-system go-build-system)
480 (propagated-inputs
481 `(("go-golang-org-x-sys" ,go-golang-org-x-sys)))
482 (arguments
483 `(#:import-path "github.com/oschwald/maxminddb-golang"
484 #:tests? #f)) ; Requires some unpackaged software and test data
485 (synopsis "MaxMind DB Reader for Go")
486 (description "This is a Go reader for the MaxMind DB format. Although
487 this can be used to read GeoLite2 and GeoIP2 databases, @code{geoip2} provides a
488 higher-level API for doing so.")
489 (home-page "https://github.com/oschwald/maxminddb-golang")
490 (license isc)))
491
492 (define-public go-github-com-stathat-go
493 (let ((commit "74669b9f388d9d788c97399a0824adbfee78400e")
494 (revision "0"))
495 (package
496 (name "go-github-com-stathat-go")
497 (version (git-version "0.0.0" revision commit))
498 (source (origin
499 (method git-fetch)
500 (uri (git-reference
501 (url "https://github.com/stathat/go")
502 (commit commit)))
503 (file-name (git-file-name name version))
504 (sha256
505 (base32
506 "1zzlsl24dyr202qkr2pay22m6d0gb7ssms77wgdx0r0clgm7dihw"))))
507 (build-system go-build-system)
508 (arguments
509 `(#:import-path "github.com/stathat/go"))
510 (synopsis "Post statistics to StatHat")
511 (description "This is a Go package for posting to a StatHat account.")
512 (home-page "https://github.com/stathat/go")
513 (license expat))))
514
515 (define-public go-github-com-rcrowley-go-metrics
516 (let ((commit "cac0b30c2563378d434b5af411844adff8e32960")
517 (revision "2"))
518 (package
519 (name "go-github-com-rcrowley-go-metrics")
520 (version (git-version "0.0.0" revision commit))
521 (source (origin
522 (method git-fetch)
523 (uri (git-reference
524 (url "https://github.com/rcrowley/go-metrics")
525 (commit commit)))
526 (file-name (git-file-name name version))
527 (sha256
528 (base32
529 "1hfxffnpaw49pr3wrkbzq3pnv3nyzsvk5dxndv0yz70xlrbg8a04"))))
530 (build-system go-build-system)
531 (arguments
532 `(#:import-path "github.com/rcrowley/go-metrics"))
533 (propagated-inputs
534 `(("go-github-com-stathat-go" ,go-github-com-stathat-go)))
535 (synopsis "Go port of Coda Hale's Metrics library")
536 (description "This package provides a Go implementation of Coda Hale's
537 Metrics library.")
538 (home-page "https://github.com/rcrowley/go-metrics")
539 (license bsd-2))))
540
541 (define-public go-github-com-sasha-s-go-deadlock
542 (package
543 (name "go-github-com-sasha-s-go-deadlock")
544 (version "0.2.0")
545 (source (origin
546 (method git-fetch)
547 (uri (git-reference
548 (url "https://github.com/sasha-s/go-deadlock")
549 (commit (string-append "v" version))))
550 (file-name (git-file-name name version))
551 (sha256
552 (base32
553 "13p7b7pakd9k1c2k0fs1hfim3c8mivz679977ai6zb01s4aw7gyg"))))
554 (build-system go-build-system)
555 (arguments
556 `(#:import-path "github.com/sasha-s/go-deadlock"))
557 (propagated-inputs
558 `(("go-github-com-petermattis-goid" ,go-github-com-petermattis-goid)))
559 (synopsis "Deadlock detection in go")
560 (description "This package provides tools for detecting deadlocks at
561 run-time in Go.")
562 (home-page "https://github.com/sasha-s/go-deadlock")
563 (license asl2.0)))
564
565 (define-public go-github-com-syndtr-goleveldb
566 (let ((commit "758128399b1df3a87e92df6c26c1d2063da8fabe")
567 (revision "4"))
568 (package
569 (name "go-github-com-syndtr-goleveldb")
570 (version (git-version "1.0.1" revision commit))
571 (source (origin
572 (method git-fetch)
573 (uri (git-reference
574 (url "https://github.com/syndtr/goleveldb")
575 (commit commit)))
576 (file-name (git-file-name name version))
577 (sha256
578 (base32
579 "0mnkzrz4di13g6ggd54my7bkb9nwk8f5k672dyasn467wsg7bf8f"))))
580 (build-system go-build-system)
581 (propagated-inputs
582 `(("go-github-com-golang-snappy" ,go-github-com-golang-snappy)))
583 (arguments
584 `(#:import-path "github.com/syndtr/goleveldb/leveldb"
585 #:unpack-path "github.com/syndtr/goleveldb"
586 #:tests? #f)) ; XXX needs 'github.com/onsi/gomega' package
587 (synopsis "LevelDB key/value database")
588 (description "This is an implementation of the LevelDB key / value
589 database in Go.")
590 (home-page "https://github.com/syndtr/goleveldb")
591 (license bsd-2))))
592
593 (define-public go-github-com-thejerf-suture
594 (package
595 (name "go-github-com-thejerf-suture")
596 (version "3.0.2")
597 (source (origin
598 (method git-fetch)
599 (uri (git-reference
600 (url "https://github.com/thejerf/suture")
601 (commit (string-append "v" version))))
602 (file-name (git-file-name name version))
603 (sha256
604 (base32
605 "03bdrl78jfwk0kw40lj63ga9cxhgccgss8yi9lp5j0m0ml7921gh"))))
606 (build-system go-build-system)
607 (arguments
608 `(#:import-path "github.com/thejerf/suture"))
609 (synopsis "Supervisor trees for Go")
610 (description "Suture provides Erlang-ish supervisor trees for Go.
611 \"Supervisor trees\" -> \"sutree\" -> \"suture\" -> holds your code together
612 when it's trying to die.
613
614 It is intended to deal gracefully with the real failure cases that can occur
615 with supervision trees (such as burning all your CPU time endlessly restarting
616 dead services), while also making no unnecessary demands on the \"service\"
617 code, and providing hooks to perform adequate logging with in a production
618 environment")
619 (home-page "https://github.com/thejerf/suture")
620 (license expat)))
621
622 (define-public go-github-com-vitrun-qart
623 (let ((commit "bf64b92db6b05651d6c25a3dabf2d543b360c0aa")
624 (revision "0"))
625 (package
626 (name "go-github-com-vitrun-qart")
627 (version (git-version "0.0.0" revision commit))
628 (source (origin
629 (method git-fetch)
630 (uri (git-reference
631 (url "https://github.com/vitrun/qart")
632 (commit commit)))
633 (file-name (string-append "go-github-com-vitrun-qart-"
634 version "-checkout"))
635 (sha256
636 (base32
637 "1xk7qki703xmay9ghi3kq2bjf1iw9dz8wik55739d6i7sn77vvkc"))))
638 (build-system go-build-system)
639 (arguments
640 `(#:import-path "github.com/vitrun/qart"))
641 (synopsis "Create QR codes with an embedded image")
642 (description "This package provides a library for embedding
643 human-meaningful graphics in QR codes. However, instead of scribbling on
644 redundant pieces and relying on error correction to preserve the meaning,
645 @code{qart} engineers the encoded values to create the picture in a code with no
646 inherent errors.")
647 (home-page "https://github.com/vitrun/qart")
648 (license bsd-3))))
649
650 (define-public go-github-com-chmduquesne-rollinghash
651 (let ((commit "a60f8e7142b536ea61bb5d84014171189eeaaa81")
652 (revision "0"))
653 (package
654 (name "go-github-com-chmduquesne-rollinghash")
655 (version (git-version "4.0.0" revision commit))
656 (source
657 (origin
658 (method git-fetch)
659 (uri (git-reference
660 (url "https://github.com/chmduquesne/rollinghash.git")
661 (commit commit)))
662 (file-name (git-file-name name version))
663 (sha256
664 (base32
665 "0fpaqq4zb0wikgbhn7vwqqj1h865f5xy195vkhivsp922p7qwsjr"))))
666 (build-system go-build-system)
667 (arguments
668 '(#:import-path "github.com/chmduquesne/rollinghash/"))
669 (synopsis "Rolling hashes in Go")
670 (description "This package provides a Go implementation of several rolling
671 hashes.")
672 (home-page "https://github.com/chmduquesne/rollinghash")
673 (license expat))))
674
675 (define-public go-github-com-petermattis-goid
676 (let ((commit "b0b1615b78e5ee59739545bb38426383b2cda4c9")
677 (revision "1"))
678 (package
679 (name "go-github-com-petermattis-goid")
680 (version (git-version "0.0.0" revision commit))
681 (source (origin
682 (method git-fetch)
683 (uri (git-reference
684 (url "https://github.com/petermattis/goid.git")
685 (commit commit)))
686 (file-name (git-file-name name version))
687 (sha256
688 (base32
689 "0ghfxn045r0bbn2vszw897lxzmhnm4k59aypjvpxl0pbzsw9ab2c"))))
690 (build-system go-build-system)
691 (arguments
692 '(#:import-path "github.com/petermattis/goid"))
693 (synopsis "Identify the running goroutine")
694 (description "This package offers a method of programmatically retrieving
695 the current goroutine's ID.")
696 (home-page "https://github.com/petermattis/goid")
697 (license asl2.0))))
698
699 (define-public go-github-com-kballard-go-shellquote
700 (let ((commit "95032a82bc518f77982ea72343cc1ade730072f0")
701 (revision "1"))
702 (package
703 (name "go-github-com-kballard-go-shellquote")
704 (version (git-version "0.0.0" revision commit))
705 (source (origin
706 (method git-fetch)
707 (uri (git-reference
708 (url "https://github.com/kballard/go-shellquote.git")
709 (commit commit)))
710 (file-name (git-file-name name version))
711 (sha256
712 (base32
713 "1rspvmnsikdq95jmx3dykxd4k1rmgl98ryjrysvl0cf18hl1vq80"))))
714 (build-system go-build-system)
715 (arguments
716 '(#:import-path "github.com/kballard/go-shellquote"))
717 (synopsis "Shell-style string joins and splits")
718 (description "Shellquote provides utilities for joining/splitting strings
719 using sh's word-splitting rules.")
720 (home-page "https://github.com/kballard/go-shellquote")
721 (license expat))))
722
723 (define-public go-github-com-syncthing-notify
724 (let ((commit "69c7a957d3e261f9744f46b3dd4d608d8480ad90")
725 (revision "5"))
726 (package
727 (name "go-github-com-syncthing-notify")
728 (version (git-version "0.0.0" revision commit))
729 (source (origin
730 (method git-fetch)
731 (uri (git-reference
732 (url "https://github.com/syncthing/notify")
733 (commit commit)))
734 (file-name (git-file-name name version))
735 (sha256
736 (base32
737 "1mmdzyfnmjabyhbipl4bggw4w5nlxyyjp0d93qd824kj07kmsr1f"))))
738 (build-system go-build-system)
739 (arguments
740 '(#:import-path "github.com/syncthing/notify"))
741 (propagated-inputs
742 `(("go-golang-org-x-sys" ,go-golang-org-x-sys)))
743 (synopsis "File system event notification library")
744 (description "This package provides @code{notify}, a file system event
745 notification library in Go.")
746 (home-page "https://github.com/syncthing/notify")
747 (license expat))))
748
749 (define-public go-github-com-beorn7-perks-quantile
750 (let ((commit "4c0e84591b9aa9e6dcfdf3e020114cd81f89d5f9")
751 (revision "0"))
752 (package
753 (name "go-github-com-beorn7-perks-quantile")
754 (version (git-version "0.0.0" revision commit))
755 (source (origin
756 (method git-fetch)
757 (uri (git-reference
758 (url "https://github.com/beorn7/perks.git")
759 (commit commit)))
760 (file-name (git-file-name name version))
761 (sha256
762 (base32
763 "1hrybsql68xw57brzj805xx2mghydpdiysv3gbhr7f5wlxj2514y"))))
764 (build-system go-build-system)
765 (arguments
766 '(#:import-path "github.com/beorn7/perks/quantile"
767 #:unpack-path "github.com/beorn7/perks"))
768 (synopsis "Compute approximate quantiles over an unbounded data stream")
769 (description "Perks contains the Go package @code{quantile} that computes
770 approximate quantiles over an unbounded data stream within low memory and CPU
771 bounds.")
772 (home-page "https://github.com/beorn7/perks")
773 (license expat))))
774
775 (define-public go-github-com-prometheus-client-model
776 (let ((commit "14fe0d1b01d4d5fc031dd4bec1823bd3ebbe8016")
777 (revision "2"))
778 (package
779 (name "go-github-com-prometheus-client-model")
780 (version (git-version "0.0.2" revision commit))
781 (source (origin
782 (method git-fetch)
783 (uri (git-reference
784 (url "https://github.com/prometheus/client_model.git")
785 (commit commit)))
786 (file-name (git-file-name name version))
787 (sha256
788 (base32
789 "0zdmk6rbbx39cvfz0r59v2jg5sg9yd02b4pds5n5llgvivi99550"))))
790 (build-system go-build-system)
791 (arguments
792 '(#:import-path "github.com/prometheus/client_model"
793 #:tests? #f
794 #:phases
795 (modify-phases %standard-phases
796 ;; Source-only package
797 (delete 'build))))
798 (propagated-inputs
799 `(("go-github-com-golang-protobuf-proto"
800 ,go-github-com-golang-protobuf-proto)))
801 (synopsis "Data model artifacts for Prometheus")
802 (description "This package provides data model artifacts for Prometheus.")
803 (home-page "https://github.com/prometheus/client_model")
804 (license asl2.0))))
805
806 (define-public go-github-com-matttproud-golang-protobuf-extensions-pbutil
807 (let ((commit "c12348ce28de40eed0136aa2b644d0ee0650e56c")
808 (revision "0"))
809 (package
810 (name "go-github-com-matttproud-golang-protobuf-extensions-pbutil")
811 (version (git-version "1.0.0" revision commit))
812 (source
813 (origin
814 (method git-fetch)
815 (uri
816 (git-reference
817 (url "https://github.com/matttproud/golang_protobuf_extensions.git")
818 (commit commit)))
819 (file-name (git-file-name name version))
820 (sha256
821 (base32
822 "1d0c1isd2lk9pnfq2nk0aih356j30k3h1gi2w0ixsivi5csl7jya"))))
823 (build-system go-build-system)
824 (arguments
825 '(#:import-path "github.com/matttproud/golang_protobuf_extensions/pbutil"
826 #:unpack-path "github.com/matttproud/golang_protobuf_extensions"))
827 (propagated-inputs
828 `(("go-github-com-golang-protobuf-proto"
829 ,go-github-com-golang-protobuf-proto)))
830 (synopsis "Streaming Protocol Buffers in Go")
831 (description "This package provides various Protocol Buffer
832 extensions for the Go language, namely support for record length-delimited
833 message streaming.")
834 (home-page "https://github.com/matttproud/golang_protobuf_extensions")
835 (license asl2.0))))
836
837 (define-public go-github-com-prometheus-common
838 (package
839 (name "go-github-com-prometheus-common")
840 (version "0.4.1")
841 (source (origin
842 (method git-fetch)
843 (uri (git-reference
844 (url "https://github.com/prometheus/common.git")
845 (commit (string-append "v" version))))
846 (file-name (git-file-name name version))
847 (sha256
848 (base32
849 "0sf4sjdckblz1hqdfvripk3zyp8xq89w7q75kbsyg4c078af896s"))))
850 (build-system go-build-system)
851 (arguments
852 '(#:import-path "github.com/prometheus/common"
853 #:tests? #f
854 #:phases
855 (modify-phases %standard-phases
856 (add-before 'reset-gzip-timestamps 'make-gzip-archive-writable
857 (lambda* (#:key outputs #:allow-other-keys)
858 (map (lambda (file)
859 (make-file-writable file))
860 (find-files
861 (string-append (assoc-ref outputs "out")
862 "/src/github.com/prometheus/common/expfmt/testdata/")
863 ".*\\.gz$"))
864 #t))
865 ;; Source-only package
866 (delete 'build))))
867 (propagated-inputs
868 `(("go-github-com-golang-protobuf-proto"
869 ,go-github-com-golang-protobuf-proto)
870 ("go-github-com-matttproud-golang-protobuf-extensions-pbutil"
871 ,go-github-com-matttproud-golang-protobuf-extensions-pbutil)
872 ("go-github-com-prometheus-client-model"
873 ,go-github-com-prometheus-client-model)))
874 (synopsis "Prometheus metrics")
875 (description "This package provides tools for reading and writing
876 Prometheus metrics.")
877 (home-page "https://github.com/prometheus/common")
878 (license asl2.0)))
879
880 (define-public go-github-com-prometheus-procfs
881 (package
882 (name "go-github-com-prometheus-procfs")
883 (version "0.0.4")
884 (source (origin
885 (method git-fetch)
886 (uri (git-reference
887 (url "https://github.com/prometheus/procfs.git")
888 (commit (string-append "v" version))))
889 (file-name (git-file-name name version))
890 (sha256
891 (base32
892 "1z5jq5rjala0a0di4nwk1rai0z9f73qwqj6mgcbpjbg2qknlb544"))))
893 (build-system go-build-system)
894 (arguments
895 '(#:import-path "github.com/prometheus/procfs"
896 ;; The tests require Go modules, which are not yet supported in Guix's
897 ;; Go build system.
898 #:tests? #f))
899 (synopsis "Go library for reading @file{/proc}")
900 (description "The @code{procfs} Go package provides functions to retrieve
901 system, kernel, and process metrics from the @file{/proc} pseudo file system.")
902 (home-page "https://github.com/prometheus/procfs")
903 (license asl2.0)))
904
905 (define-public go-github-com-prometheus-client-golang
906 (package
907 (name "go-github-com-prometheus-client-golang")
908 (version "1.2.1")
909 (source (origin
910 (method git-fetch)
911 (uri (git-reference
912 (url "https://github.com/prometheus/client_golang.git")
913 (commit (string-append "v" version))))
914 (file-name (git-file-name name version))
915 (sha256
916 (base32
917 "0zs49psk23n9z8wrl02d5vib5wclpym8kaxcy6n5pk696i419065"))))
918 (build-system go-build-system)
919 (arguments
920 '(#:tests? #f
921 #:import-path "github.com/prometheus/client_golang"
922 #:phases
923 (modify-phases %standard-phases
924 ;; Source-only package
925 (delete 'build))))
926 (propagated-inputs
927 `(("go-github-com-beorn7-perks-quantile"
928 ,go-github-com-beorn7-perks-quantile)
929 ("go-github-com-golang-protobuf-proto"
930 ,go-github-com-golang-protobuf-proto)
931 ("go-github-com-prometheus-client-model"
932 ,go-github-com-prometheus-client-model)
933 ("go-github-com-prometheus-common"
934 ,go-github-com-prometheus-common)
935 ("go-github-com-prometheus-procfs" ,go-github-com-prometheus-procfs)
936 ("go-github-com-cespare-xxhash" ,go-github-com-cespare-xxhash)))
937 (synopsis "HTTP server and client tools for Prometheus")
938 (description "This package @code{promhttp} provides HTTP client and
939 server tools for Prometheus metrics.")
940 (home-page "https://github.com/prometheus/client_golang")
941 (license asl2.0)))
942
943 (define-public go-gopkg.in-asn1-ber.v1
944 (package
945 (name "go-gopkg.in-asn1-ber.v1")
946 (version "1.3")
947 (source (origin
948 (method git-fetch)
949 (uri (git-reference
950 (url "https://gopkg.in/asn1-ber.v1")
951 (commit (string-append "v" version))))
952 (file-name (git-file-name name version))
953 (sha256
954 (base32
955 "00ixms8x3lrhywbvq5v2sagcqsxa1pcnlk17dp5lnwckv3xg4psb"))))
956 (build-system go-build-system)
957 (arguments
958 '(#:import-path "gopkg.in/asn1-ber.v1"
959 ;; Tests don't pass "vet" on Go since 1.11. See
960 ;; https://github.com/go-asn1-ber/asn1-ber/issues/20.
961 #:phases
962 (modify-phases %standard-phases
963 (replace 'check
964 (lambda* (#:key import-path #:allow-other-keys)
965 (invoke "go" "test"
966 "-vet=off"
967 import-path))))))
968 (synopsis "ASN.1 BER encoding and decoding in Go")
969 (description "This package provides ASN.1 BER encoding and decoding in the
970 Go language.")
971 (home-page "https://gopkg.in/asn1-ber.v1")
972 (license expat)))
973
974 (define-public go-gopkg.in-ldap.v2
975 (package
976 (name "go-gopkg.in-ldap.v2")
977 (version "2.5.1")
978 (source (origin
979 (method git-fetch)
980 (uri (git-reference
981 (url "https://gopkg.in/ldap.v2")
982 (commit (string-append "v" version))))
983 (file-name (git-file-name name version))
984 (sha256
985 (base32
986 "1wf81wy04nhkqs0dg5zkivr4sh37r83bxrfwjz9vr4jq6vmljr3h"))))
987 (build-system go-build-system)
988 (arguments
989 '(#:import-path "gopkg.in/ldap.v2"
990 #:tests? #f)) ; the test suite requires network access
991 (propagated-inputs
992 `(("go-gopkg.in-asn1-ber.v1" ,go-gopkg.in-asn1-ber.v1)))
993 (synopsis "LDAP v3 functionality for Go")
994 (description "This package provides basic LDAP v3 functionality in the Go
995 language.")
996 (home-page "https://gopkg.in/ldap.v2")
997 (license expat)))
998
999 (define-public go-github-com-flynn-archive-go-shlex
1000 (let ((commit "3f9db97f856818214da2e1057f8ad84803971cff")
1001 (revision "0"))
1002 (package
1003 (name "go-github-com-flynn-archive-go-shlex")
1004 (version (git-version "0.0.0" revision commit))
1005 (source (origin
1006 (method git-fetch)
1007 (uri (git-reference
1008 (url "https://github.com/flynn-archive/go-shlex.git")
1009 (commit commit)))
1010 (file-name (git-file-name name version))
1011 (sha256
1012 (base32
1013 "1j743lysygkpa2s2gii2xr32j7bxgc15zv4113b0q9jhn676ysia"))))
1014 (build-system go-build-system)
1015 (arguments
1016 '(#:import-path "github.com/flynn-archive/go-shlex"))
1017 (synopsis "Go lexer")
1018 (description "Shlex is a simple lexer for go that supports shell-style
1019 quoting, commenting, and escaping.")
1020 (home-page "https://github.com/flynn-archive/go-shlex")
1021 (license asl2.0))))
1022
1023 (define-public go-github-com-audriusbutkevicius-pfilter
1024 (let ((commit "c55ef6137fc6f075801eac099cc2687ede0f101d")
1025 (revision "3"))
1026 (package
1027 (name "go-github-com-audriusbutkevicius-pfilter")
1028 (version (git-version "0.0.0" revision commit))
1029 (source
1030 (origin
1031 (method git-fetch)
1032 (uri (git-reference
1033 (url "https://github.com/AudriusButkevicius/pfilter.git")
1034 (commit commit)))
1035 (file-name (git-file-name name version))
1036 (sha256
1037 (base32
1038 "0xzhwyd0w21bhvzl5pinn22hp0y6h44rh3s2ppql69rafc6zd3c6"))))
1039 (build-system go-build-system)
1040 (arguments
1041 '(#:import-path "github.com/AudriusButkevicius/pfilter"))
1042 (synopsis "Filter packets into multiple virtual connections")
1043 (description "Pfilter is a Go package for filtering packets into multiple
1044 virtual connections from a single physical connection.")
1045 (home-page "https://github.com/AudriusButkevicius/pfilter")
1046 (license expat))))
1047
1048 (define-public go-github-com-ccding-go-stun
1049 (let ((commit "be486d185f3dfcb2dbf8429332da50a0da7f95a6")
1050 (revision "2"))
1051 (package
1052 (name "go-github-com-ccding-go-stun")
1053 (version (git-version "0.0.0" revision commit))
1054 (source
1055 (origin
1056 (method git-fetch)
1057 (uri (git-reference
1058 (url "https://github.com/ccding/go-stun.git")
1059 (commit commit)))
1060 (file-name (git-file-name name version))
1061 (sha256
1062 (base32
1063 "1gr0rw1c1y7wh6913lyn5k4ig023by27i36bly6am8dwgrgp34ww"))))
1064 (build-system go-build-system)
1065 (arguments
1066 '(#:import-path "github.com/ccding/go-stun"))
1067 (synopsis "STUN client implementation")
1068 (description "Go-stun is a go implementation of the STUN client (RFC 3489
1069 and RFC 5389).")
1070 (home-page "https://github.com/ccding/go-stun")
1071 (license asl2.0))))
1072
1073 (define-public go-github-com-cespare-xxhash
1074 (package
1075 (name "go-github-com-cespare-xxhash")
1076 (version "2.1.0")
1077 (source (origin
1078 (method git-fetch)
1079 (uri (git-reference
1080 (url "https://github.com/cespare/xxhash")
1081 (commit (string-append "v" version))))
1082 (file-name (git-file-name name version))
1083 (sha256
1084 (base32
1085 "12ad3z7ki9j07c4kx3ywkl6188i2afsjg7sl60wd21p6zkkpfjxq"))))
1086 (build-system go-build-system)
1087 (arguments
1088 '(#:import-path "github.com/cespare/xxhash"))
1089 (synopsis "Go implementation of xxHash")
1090 (description "This package provides of Go implementation of the 64-bit
1091 xxHash algorithm (XXH64).")
1092 (home-page "https://github.com/cespare/xxhash/")
1093 (license expat)))