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