1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2016, 2017 Efraim Flashner <efraim@flashner.co.il>
3 ;;; Copyright © 2016 Matthew Jordan <matthewjordandevops@yandex.com>
4 ;;; Copyright © 2016 Andy Wingo <wingo@igalia.com>
5 ;;; Copyright © 2016 Ludovic Courtès <ludo@gnu.org>
6 ;;; Copyright © 2016, 2017 Petter <petter@mykolab.ch>
7 ;;; Copyright © 2016, 2017 Leo Famulari <leo@famulari.name>
8 ;;; Copyright © 2017 Sergei Trofimovich <slyfox@inbox.ru>
9 ;;; Copyright © 2017 Alex Vong <alexvong1995@gmail.com>
10 ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
11 ;;; Copyright © 2018 Christopher Baines <mail@cbaines.net>
13 ;;; This file is part of GNU Guix.
15 ;;; GNU Guix is free software; you can redistribute it and/or modify it
16 ;;; under the terms of the GNU General Public License as published by
17 ;;; the Free Software Foundation; either version 3 of the License, or (at
18 ;;; your option) any later version.
20 ;;; GNU Guix is distributed in the hope that it will be useful, but
21 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
22 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 ;;; GNU General Public License for more details.
25 ;;; You should have received a copy of the GNU General Public License
26 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
28 (define-module (gnu packages golang)
29 #:use-module ((guix licenses) #:prefix license:)
30 #:use-module (guix utils)
31 #:use-module (guix download)
32 #:use-module (guix git-download)
33 #:use-module (guix packages)
34 #:use-module (guix build-system gnu)
35 #:use-module (guix build-system go)
36 #:use-module (gnu packages admin)
37 #:use-module (gnu packages gcc)
38 #:use-module (gnu packages base)
39 #:use-module (gnu packages perl)
40 #:use-module (gnu packages pkg-config)
41 #:use-module (gnu packages pcre)
42 #:use-module (ice-9 match)
43 #:use-module (srfi srfi-1))
45 ;; According to https://golang.org/doc/install/gccgo, gccgo-4.8.2 includes a
46 ;; complete go-1.1.2 implementation, gccgo-4.9 includes a complete go-1.2
47 ;; implementation, and gccgo-5 a complete implementation of go-1.4. Ultimately
48 ;; we hope to build go-1.5+ with a bootstrap process using gccgo-5. As of
49 ;; go-1.5, go cannot be bootstrapped without go-1.4, so we need to use go-1.4 or
50 ;; gccgo-5. Mips is not officially supported, but it should work if it is
59 (uri (string-append "https://storage.googleapis.com/golang/"
60 name version ".src.tar.gz"))
63 "0na9yqilzpvq0bjndbibfp07wr796gf252y471cip10bbdqgqiwr"))))
64 (build-system gnu-build-system)
69 `(#:modules ((ice-9 match)
70 (guix build gnu-build-system)
73 #:tests? #f ; Tests are run by the all.bash script.
75 (modify-phases %standard-phases
77 (add-after 'patch-generated-file-shebangs 'chdir
80 (add-before 'build 'prebuild
81 (lambda* (#:key inputs outputs #:allow-other-keys)
82 (let* ((gcclib (string-append (assoc-ref inputs "gcc:lib") "/lib"))
83 (ld (string-append (assoc-ref inputs "libc") "/lib"))
84 (loader (car (find-files ld "^ld-linux.+")))
85 (net-base (assoc-ref inputs "net-base"))
87 (string-append (assoc-ref inputs "tzdata") "/share/zoneinfo"))
88 (output (assoc-ref outputs "out")))
90 ;; Removing net/ tests, which fail when attempting to access
91 ;; network resources not present in the build container.
93 '("net/multicast_test.go" "net/parse_test.go"
96 ;; Add libgcc to the RUNPATH.
97 (substitute* "cmd/go/build.go"
98 (("cgoldflags := \\[\\]string\\{\\}")
99 (string-append "cgoldflags := []string{"
100 "\"-rpath=" gcclib "\"}"))
101 (("ldflags := buildLdflags")
103 "ldflags := buildLdflags\n"
104 "ldflags = append(ldflags, \"-r\")\n"
105 "ldflags = append(ldflags, \"" gcclib "\")\n")))
107 (substitute* "os/os_test.go"
108 (("/usr/bin") (getcwd))
109 (("/bin/pwd") (which "pwd")))
111 ;; Disable failing tests: these tests attempt to access
112 ;; commands or network resources which are neither available or
113 ;; necessary for the build to succeed.
118 ((regex all before test_name)
119 (string-append before "Disabled" test_name)))))
120 '(("net/net_test.go" "(.+)(TestShutdownUnix.+)")
121 ("net/dial_test.go" "(.+)(TestDialTimeout.+)")
122 ("os/os_test.go" "(.+)(TestHostname.+)")
123 ("time/format_test.go" "(.+)(TestParseInSydney.+)")
125 ;; Tzdata 2016g changed the name of the time zone used in this
126 ;; test, and the patch for Go 1.7 does not work for 1.4.3:
127 ;; https://github.com/golang/go/issues/17545
128 ;; https://github.com/golang/go/issues/17276
129 ("time/time_test.go" "(.+)(TestLoadFixed.+)")
130 ("time/format_test.go" "(.+)(TestParseInLocation.+)")
132 ("os/exec/exec_test.go" "(.+)(TestEcho.+)")
133 ("os/exec/exec_test.go" "(.+)(TestCommandRelativeName.+)")
134 ("os/exec/exec_test.go" "(.+)(TestCatStdin.+)")
135 ("os/exec/exec_test.go" "(.+)(TestCatGoodAndBadFile.+)")
136 ("os/exec/exec_test.go" "(.+)(TestExitStatus.+)")
137 ("os/exec/exec_test.go" "(.+)(TestPipes.+)")
138 ("os/exec/exec_test.go" "(.+)(TestStdinClose.+)")
139 ("syscall/syscall_unix_test.go" "(.+)(TestPassFD\\(.+)")
140 ("os/exec/exec_test.go" "(.+)(TestExtraFiles.+)")))
142 (substitute* "net/lookup_unix.go"
143 (("/etc/protocols") (string-append net-base "/etc/protocols")))
144 (substitute* "time/zoneinfo_unix.go"
145 (("/usr/share/zoneinfo/") tzdata-path))
146 (substitute* (find-files "cmd" "asm.c")
147 (("/lib/ld-linux.*\\.so\\.[0-9]") loader))
151 (lambda* (#:key inputs outputs #:allow-other-keys)
152 ;; FIXME: Some of the .a files are not bit-reproducible.
153 (let* ((output (assoc-ref outputs "out")))
154 (setenv "CC" (which "gcc"))
155 (setenv "GOOS" "linux")
156 (setenv "GOROOT" (dirname (getcwd)))
157 (setenv "GOROOT_FINAL" output)
158 ;; Go 1.4's cgo will not work with binutils >= 2.27:
159 ;; https://github.com/golang/go/issues/16906
160 (setenv "CGO_ENABLED" "0")
161 (zero? (system* "sh" "all.bash")))))
164 (lambda* (#:key outputs inputs #:allow-other-keys)
165 (let* ((output (assoc-ref outputs "out"))
166 (doc_out (assoc-ref outputs "doc"))
167 (bash (string-append (assoc-ref inputs "bash") "bin/bash"))
168 (docs (string-append doc_out "/share/doc/" ,name "-" ,version))
169 (tests (string-append
170 (assoc-ref outputs "tests") "/share/" ,name "-" ,version)))
172 (copy-recursively "../test" (string-append tests "/test"))
173 (delete-file-recursively "../test")
175 (copy-recursively "../api" (string-append docs "/api"))
176 (delete-file-recursively "../api")
177 (copy-recursively "../doc" (string-append docs "/doc"))
178 (delete-file-recursively "../doc")
180 (for-each (lambda (file)
181 (let ((file (string-append "../" file)))
182 (install-file file docs)
184 '("README" "CONTRIBUTORS" "AUTHORS" "PATENTS"
185 "LICENSE" "VERSION" "robots.txt"))
186 (copy-recursively "../" output)
191 ;; Building Go 1.10 with the Go 1.4 bootstrap, Thread Sanitizer from GCC
192 ;; 5 finds a data race during the the test suite of Go 1.10. With GCC 6,
193 ;; the race doesn't seem to be present:
194 ;; https://github.com/golang/go/issues/24046
195 ("gcc:lib" ,gcc-6 "lib")))
197 `(("pkg-config" ,%pkg-config)
199 ("net-base" ,net-base)
202 (home-page "https://golang.org/")
203 (synopsis "Compiler and libraries for Go, a statically-typed language")
204 (description "Go, also commonly referred to as golang, is an imperative
205 programming language designed primarily for systems programming. Go is a
206 compiled, statically typed language in the tradition of C and C++, but adds
207 garbage collection, various safety features, and concurrent programming features
208 in the style of communicating sequential processes (@dfn{CSP}).")
209 (supported-systems '("x86_64-linux" "i686-linux" "armhf-linux"))
210 (license license:bsd-3)))
212 (define-public go-1.9
220 (uri (string-append "https://storage.googleapis.com/golang/"
221 name version ".src.tar.gz"))
224 "01nw8rfvf10naja0wq0kabsm012sbqq76hd4b8c7g28n6ggshwq5"))))
226 (substitute-keyword-arguments (package-arguments go-1.4)
228 `(modify-phases ,phases
230 ;; TODO: Most of this could be factorized with Go 1.4.
231 (lambda* (#:key inputs outputs #:allow-other-keys)
232 (let* ((gcclib (string-append (assoc-ref inputs "gcc:lib") "/lib"))
233 (ld (string-append (assoc-ref inputs "libc") "/lib"))
234 (loader (car (find-files ld "^ld-linux.+")))
235 (net-base (assoc-ref inputs "net-base"))
237 (string-append (assoc-ref inputs "tzdata") "/share/zoneinfo"))
238 (output (assoc-ref outputs "out")))
240 ;; Removing net/ tests, which fail when attempting to access
241 ;; network resources not present in the build container.
242 (for-each delete-file
243 '("net/listen_test.go"
245 "net/cgo_unix_test.go"))
247 (substitute* "os/os_test.go"
248 (("/usr/bin") (getcwd))
249 (("/bin/pwd") (which "pwd"))
250 (("/bin/sh") (which "sh")))
252 ;; Add libgcc to runpath
253 (substitute* "cmd/link/internal/ld/lib.go"
254 (("!rpath.set") "true"))
255 (substitute* "cmd/go/internal/work/build.go"
256 (("cgoldflags := \\[\\]string\\{\\}")
257 (string-append "cgoldflags := []string{"
258 "\"-rpath=" gcclib "\""
260 (("ldflags = setextld\\(ldflags, compiler\\)")
262 "ldflags = setextld(ldflags, compiler)\n"
263 "ldflags = append(ldflags, \"-r\")\n"
264 "ldflags = append(ldflags, \"" gcclib "\")\n"))
267 "\"-Wl,-rpath=" gcclib "\", \"-lgcc_s\", ")))
269 ;; Disable failing tests: these tests attempt to access
270 ;; commands or network resources which are neither available
271 ;; nor necessary for the build to succeed.
276 ((regex all before test_name)
277 (string-append before "Disabled" test_name)))))
278 '(("net/net_test.go" "(.+)(TestShutdownUnix.+)")
279 ("net/dial_test.go" "(.+)(TestDialTimeout.+)")
280 ("os/os_test.go" "(.+)(TestHostname.+)")
281 ("time/format_test.go" "(.+)(TestParseInSydney.+)")
282 ("time/format_test.go" "(.+)(TestParseInLocation.+)")
283 ("os/exec/exec_test.go" "(.+)(TestEcho.+)")
284 ("os/exec/exec_test.go" "(.+)(TestCommandRelativeName.+)")
285 ("os/exec/exec_test.go" "(.+)(TestCatStdin.+)")
286 ("os/exec/exec_test.go" "(.+)(TestCatGoodAndBadFile.+)")
287 ("os/exec/exec_test.go" "(.+)(TestExitStatus.+)")
288 ("os/exec/exec_test.go" "(.+)(TestPipes.+)")
289 ("os/exec/exec_test.go" "(.+)(TestStdinClose.+)")
290 ("os/exec/exec_test.go" "(.+)(TestIgnorePipeErrorOnSuccess.+)")
291 ("syscall/syscall_unix_test.go" "(.+)(TestPassFD\\(.+)")
292 ("os/exec/exec_test.go" "(.+)(TestExtraFiles/areturn.+)")
293 ("cmd/go/go_test.go" "(.+)(TestCoverageWithCgo.+)")
294 ("os/exec/exec_test.go" "(.+)(TestOutputStderrCapture.+)")
295 ("os/exec/exec_test.go" "(.+)(TestExtraFiles.+)")
296 ("os/exec/exec_test.go" "(.+)(TestExtraFilesRace.+)")
297 ("net/lookup_test.go" "(.+)(TestLookupPort.+)")
298 ("syscall/exec_linux_test.go"
299 "(.+)(TestCloneNEWUSERAndRemapNoRootDisableSetgroups.+)")))
301 (substitute* "../misc/cgo/testsanitizers/test.bash"
302 (("(CC=)cc" all var) (string-append var "gcc")))
304 ;; fix shebang for testar script
305 ;; note the target script is generated at build time.
306 (substitute* "../misc/cgo/testcarchive/carchive_test.go"
307 (("#!/usr/bin/env") (string-append "#!" (which "env"))))
309 (substitute* "net/lookup_unix.go"
310 (("/etc/protocols") (string-append net-base "/etc/protocols")))
311 (substitute* "net/port_unix.go"
312 (("/etc/services") (string-append net-base "/etc/services")))
313 (substitute* "time/zoneinfo_unix.go"
314 (("/usr/share/zoneinfo/") tzdata-path))
315 (substitute* (find-files "cmd" "\\.go")
316 (("/lib(64)?/ld-linux.*\\.so\\.[0-9]") loader))
318 (add-before 'build 'set-bootstrap-variables
319 (lambda* (#:key outputs inputs #:allow-other-keys)
320 ;; Tell the build system where to find the bootstrap Go.
321 (let ((go (assoc-ref inputs "go"))
322 (out (assoc-ref outputs "out")))
323 (setenv "GOROOT_BOOTSTRAP" go)
325 (string-append out "/bin:"
326 (dirname (getcwd)) "/bin:"
329 ;; XXX: The following variables seem unrelated.
330 (setenv "GOGC" "400")
331 (setenv "GO_TEST_TIMEOUT_SCALE" "9999")
335 (lambda* (#:key inputs outputs #:allow-other-keys)
336 ;; FIXME: Some of the .a files are not bit-reproducible.
337 (let* ((output (assoc-ref outputs "out")))
338 (setenv "CC" (which "gcc"))
339 (setenv "GOOS" "linux")
340 (setenv "GOROOT" (dirname (getcwd)))
341 (setenv "GOROOT_FINAL" output)
342 (setenv "CGO_ENABLED" "1")
343 (zero? (system* "sh" "all.bash")))))
346 ;; TODO: Most of this could be factorized with Go 1.4.
347 (lambda* (#:key outputs #:allow-other-keys)
348 (let* ((output (assoc-ref outputs "out"))
349 (doc_out (assoc-ref outputs "doc"))
350 (docs (string-append doc_out "/share/doc/" ,name "-" ,version))
352 (assoc-ref outputs "tests") "/share/" ,name "-" ,version)))
353 (delete-file-recursively "../pkg/bootstrap")
356 (copy-recursively "../test" (string-append src "/test"))
357 (delete-file-recursively "../test")
359 (copy-recursively "../api" (string-append docs "/api"))
360 (delete-file-recursively "../api")
361 (copy-recursively "../doc" (string-append docs "/doc"))
362 (delete-file-recursively "../doc")
366 (let* ((filein (string-append "../" file))
367 (fileout (string-append docs "/" file)))
368 (copy-file filein fileout)
369 (delete-file filein)))
370 ;; Note the slightly different file names compared to 1.4.
371 '("README.md" "CONTRIBUTORS" "AUTHORS" "PATENTS"
372 "LICENSE" "VERSION" "CONTRIBUTING.md" "robots.txt"))
374 (copy-recursively "../" output))))))))
377 ,@(package-native-inputs go-1.4)))
378 (supported-systems %supported-systems)))
380 (define-public go-1.10
388 (uri (string-append "https://storage.googleapis.com/golang/"
389 name version ".src.tar.gz"))
392 "093z1h0gmi458kv7smpx0ph6jm7ss9mzxa432kysbz85jhl4kppk"))))
394 (substitute-keyword-arguments (package-arguments go-1.9)
396 `(modify-phases ,phases
398 (lambda* (#:key inputs outputs #:allow-other-keys)
399 (let* ((gcclib (string-append (assoc-ref inputs "gcc:lib") "/lib"))
400 (ld (string-append (assoc-ref inputs "libc") "/lib"))
401 (loader (car (find-files ld "^ld-linux.+")))
402 (net-base (assoc-ref inputs "net-base"))
404 (string-append (assoc-ref inputs "tzdata") "/share/zoneinfo"))
405 (output (assoc-ref outputs "out")))
407 ;; Removing net/ tests, which fail when attempting to access
408 ;; network resources not present in the build container.
409 (for-each delete-file
410 '("net/listen_test.go"
412 "net/cgo_unix_test.go"))
414 (substitute* "os/os_test.go"
415 (("/usr/bin") (getcwd))
416 (("/bin/pwd") (which "pwd"))
417 (("/bin/sh") (which "sh")))
419 ;; Add libgcc to runpath
420 (substitute* "cmd/link/internal/ld/lib.go"
421 (("!rpath.set") "true"))
422 (substitute* "cmd/go/internal/work/gccgo.go"
423 (("cgoldflags := \\[\\]string\\{\\}")
424 (string-append "cgoldflags := []string{"
425 "\"-rpath=" gcclib "\""
429 "\"-Wl,-rpath=" gcclib "\", \"-lgcc_s\", ")))
430 (substitute* "cmd/go/internal/work/gc.go"
431 (("ldflags = setextld\\(ldflags, compiler\\)")
433 "ldflags = setextld(ldflags, compiler)\n"
434 "ldflags = append(ldflags, \"-r\")\n"
435 "ldflags = append(ldflags, \"" gcclib "\")\n")))
437 ;; Disable failing tests: these tests attempt to access
438 ;; commands or network resources which are neither available
439 ;; nor necessary for the build to succeed.
444 ((regex all before test_name)
445 (string-append before "Disabled" test_name)))))
446 '(("net/net_test.go" "(.+)(TestShutdownUnix.+)")
447 ("net/dial_test.go" "(.+)(TestDialTimeout.+)")
448 ("os/os_test.go" "(.+)(TestHostname.+)")
449 ("time/format_test.go" "(.+)(TestParseInSydney.+)")
450 ("time/format_test.go" "(.+)(TestParseInLocation.+)")
451 ("os/exec/exec_test.go" "(.+)(TestEcho.+)")
452 ("os/exec/exec_test.go" "(.+)(TestCommandRelativeName.+)")
453 ("os/exec/exec_test.go" "(.+)(TestCatStdin.+)")
454 ("os/exec/exec_test.go" "(.+)(TestCatGoodAndBadFile.+)")
455 ("os/exec/exec_test.go" "(.+)(TestExitStatus.+)")
456 ("os/exec/exec_test.go" "(.+)(TestPipes.+)")
457 ("os/exec/exec_test.go" "(.+)(TestStdinClose.+)")
458 ("os/exec/exec_test.go" "(.+)(TestIgnorePipeErrorOnSuccess.+)")
459 ("syscall/syscall_unix_test.go" "(.+)(TestPassFD\\(.+)")
460 ("os/exec/exec_test.go" "(.+)(TestExtraFiles/areturn.+)")
461 ("cmd/go/go_test.go" "(.+)(TestCoverageWithCgo.+)")
462 ("os/exec/exec_test.go" "(.+)(TestOutputStderrCapture.+)")
463 ("os/exec/exec_test.go" "(.+)(TestExtraFiles.+)")
464 ("os/exec/exec_test.go" "(.+)(TestExtraFilesRace.+)")
465 ("net/lookup_test.go" "(.+)(TestLookupPort.+)")
466 ("syscall/exec_linux_test.go"
467 "(.+)(TestCloneNEWUSERAndRemapNoRootDisableSetgroups.+)")))
469 ;; fix shebang for testar script
470 ;; note the target script is generated at build time.
471 (substitute* "../misc/cgo/testcarchive/carchive_test.go"
472 (("#!/usr/bin/env") (string-append "#!" (which "env"))))
474 (substitute* "net/lookup_unix.go"
475 (("/etc/protocols") (string-append net-base "/etc/protocols")))
476 (substitute* "net/port_unix.go"
477 (("/etc/services") (string-append net-base "/etc/services")))
478 (substitute* "time/zoneinfo_unix.go"
479 (("/usr/share/zoneinfo/") tzdata-path))
480 (substitute* (find-files "cmd" "\\.go")
481 (("/lib(64)?/ld-linux.*\\.so\\.[0-9]") loader))
483 (replace 'set-bootstrap-variables
484 (lambda* (#:key outputs inputs #:allow-other-keys)
485 ;; Tell the build system where to find the bootstrap Go.
486 (let ((go (assoc-ref inputs "go")))
487 (setenv "GOROOT_BOOTSTRAP" go)
488 (setenv "GOGC" "400")
489 ;; Go 1.10 tries to write to $HOME in a test
490 (setenv "HOME" "/tmp")
493 (define-public go go-1.9)
495 (define-public go-github-com-alsm-ioprogress
496 (let ((commit "063c3725f436e7fba0c8f588547bee21ffec7ac5")
499 (name "go-github-com-alsm-ioprogress")
500 (version (git-version "0.0.0" revision commit))
504 (url "https://github.com/alsm/ioprogress.git")
506 (file-name (git-file-name name version))
509 "10ym5qlq77nynmkxbk767f2hfwyxg2k7hrzph05hvgzv833dhivh"))))
510 (build-system go-build-system)
512 '(#:import-path "github.com/alsm/ioprogress"))
513 (synopsis "Textual progress bars in Go")
514 (description "@code{ioprogress} is a Go library with implementations of
515 @code{io.Reader} and @code{io.Writer} that draws progress bars. The primary use
516 case for these are for command-line applications but alternate progress bar
517 writers can be supplied for alternate environments.")
518 (home-page "https://github.com/alsm/ioprogress")
519 (license license:expat))))
521 (define-public go-github-com-aki237-nscjar
522 (let ((commit "e2df936ddd6050d30dd90c7214c02b5019c42f06")
525 (name "go-github-com-aki237-nscjar")
526 (version (git-version "0.0.0" revision commit))
530 (url "https://github.com/aki237/nscjar.git")
532 (file-name (git-file-name name version))
535 "03y7zzq12qvhsq86lb06sgns8xrkblbn7i7wd886wk3zr5574b96"))))
536 (build-system go-build-system)
538 '(#:import-path "github.com/aki237/nscjar"))
539 (synopsis "Handle Netscape / Mozilla cookies")
540 (description "@code{nscjar} is a Go library used to parse and output
541 Netscape/Mozilla's old-style cookie files. It also implements a simple cookie
542 jar struct to manage the cookies added to the cookie jar.")
543 (home-page "https://github.com/aki237/nscjar")
544 (license license:expat))))
546 (define-public go-github-com-davidjpeacock-cli
547 (let ((commit "8ba6f23b6e36d03666a14bd9421f5e3efcb59aca")
550 (name "go-github-com-davidjpeacock-cli")
551 (version (git-version "1.19.1" revision commit))
555 (url "https://github.com/davidjpeacock/cli.git")
557 (file-name (git-file-name name version))
560 "01s53ny3p0fdx64rnwcnmjj4xpc5adihnh6islsfq5z1ph2phhnj"))))
561 (build-system go-build-system)
563 '(#:import-path "github.com/davidjpeacock/cli"))
564 (synopsis "Build command-line interfaces in Go")
565 (description "@code{cli} is a package for building command line
566 interfaces in Go. The goal is to enable developers to write fast and
567 distributable command line applications in an expressive way.")
568 (home-page "https://github.com/davidjpeacock/cli")
569 (license license:expat))))
571 (define-public go-github.com-jessevdk-go-flags
573 (name "go-github.com-jessevdk-go-flags")
578 (url "https://github.com/jessevdk/go-flags")
579 (commit (string-append "v" version))))
580 (file-name (git-file-name name version))
583 "1jk2k2l10lwrn1r3nxdvbs0yz656830j4khzirw8p4ahs7c5zz36"))))
584 (build-system go-build-system)
586 '(#:import-path "github.com/jessevdk/go-flags"))
587 (synopsis "Go library for parsing command line arguments")
589 "The @code{flags} package provides a command line option parser. The
590 functionality is similar to the go builtin @code{flag} package, but
591 @code{flags} provides more options and uses reflection to provide a succinct
592 way of specifying command line options.")
593 (home-page "https://github.com/jessevdk/go-flags")
594 (license license:bsd-3)))
596 (define-public go-gopkg.in-tomb.v2
597 (let ((commit "d5d1b5820637886def9eef33e03a27a9f166942c")
600 (name "go-gopkg.in-tomb.v2")
601 (version (string-append "0.0.0-" revision "." (string-take commit 7)))
605 (url "https://github.com/go-tomb/tomb.git")
607 (file-name (string-append name "-" version ".tar.gz"))
610 "1sv15sri99szkdz1bkh0ir46w9n8prrwx5hfai13nrhkawfyfy10"))))
611 (build-system go-build-system)
613 '(#:import-path "gopkg.in/tomb.v2"))
614 (synopsis "@code{tomb} handles clean goroutine tracking and termination")
616 "The @code{tomb} package handles clean goroutine tracking and
618 (home-page "https://gopkg.in/tomb.v2")
619 (license license:bsd-3))))
621 (define-public go-github.com-jtolds-gls
623 (name "go-github.com-jtolds-gls")
628 (url "https://github.com/jtolds/gls")
629 (commit (string-append "v" version))))
630 (file-name (git-file-name name version))
633 "1vm37pvn0k4r6d3m620swwgama63laz8hhj3pyisdhxwam4m2g1h"))))
634 (build-system go-build-system)
636 '(#:import-path "github.com/jtolds/gls"))
637 (synopsis "@code{gls} provides Goroutine local storage")
639 "The @code{gls} package provides a way to store a retrieve values
641 (home-page "https://github.com/jtolds/gls")
642 (license license:expat)))
644 (define-public go-github-com-tj-docopt
646 (name "go-github-com-tj-docopt")
651 (url "https://github.com/tj/docopt")
652 (commit (string-append "v" version))))
653 (file-name (git-file-name name version))
656 "06h8hdg1mh3s78zqlr01g4si7k0f0g6pr7fj7lnvfg446hgc7080"))))
657 (build-system go-build-system)
659 '(#:import-path "github.com/tj/docopt"))
660 (synopsis "Go implementation of docopt")
662 "This library allows the user to define a command-line interface from a
663 program's help message rather than specifying it programatically with
664 command-line parsers.")
665 (home-page "https://github.com/tj/docopt")
666 (license license:expat)))
668 (define-public go-github-com-hashicorp-hcl
669 (let ((commit "23c074d0eceb2b8a5bfdbb271ab780cde70f05a8")
672 (name "go-github-com-hashicorp-hcl")
673 (version (git-version "0.0.0" revision commit))
677 (url "https://github.com/hashicorp/hcl")
679 (file-name (git-file-name name version))
682 "0db4lpqb5m130rmfy3s3gjjf4dxllypmyrzxv6ggqhkmwmc7w4mc"))))
683 (build-system go-build-system)
686 #:import-path "github.com/hashicorp/hcl"))
687 (synopsis "Go implementation of HashiCorp Configuration Language")
689 "This package contains the main implementation of the @acronym{HCL,
690 HashiCorp Configuration Language}. HCL is designed to be a language for
691 expressing configuration which is easy for both humans and machines to read.")
692 (home-page "https://github.com/hashicorp/hcl")
693 (license license:mpl2.0))))