[PATCH]: Add mongo-tools.

  • Done
  • quality assurance status badge
Details
2 participants
  • Leo Famulari
  • Christopher Baines
Owner
unassigned
Submitted by
Christopher Baines
Severity
normal
C
C
Christopher Baines wrote on 22 Jan 2018 21:51
(address . guix-patches@gnu.org)
87h8rd4nxg.fsf@cbaines.net
Christopher Baines (10):
gnu: Add go-golang.org-x-crypto-ssh-terminal.
gnu: Add go-github.com-howeyc-gopass.
gnu: Add go-github.com-jessevdk-go-flags.
gnu: Add go-gopkg.in-check.v1.
gnu: Add daemontools.
gnu: Add go-gopkg.in-mgo.v2.
gnu: Add go-gopkg.in-tomb.v2.
gnu: Add go-github.com-mattn-go-runewidth.
gnu: Add go-github.com-nsf-termbox-go.
gnu: Add mongo-tools.

gnu/packages/admin.scm | 43 +++++++++++++
gnu/packages/check.scm | 25 ++++++++
gnu/packages/databases.scm | 147 +++++++++++++++++++++++++++++++++++++++++++++
gnu/packages/golang.scm | 59 ++++++++++++++++++
gnu/packages/terminals.scm | 96 +++++++++++++++++++++++++++++
gnu/packages/textutils.scm | 33 ++++++++++
6 files changed, 403 insertions(+)
-----BEGIN PGP SIGNATURE-----

iQKTBAEBCgB9FiEEPonu50WOcg2XVOCyXiijOwuE9XcFAlpmTttfFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF
ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcACgkQXiijOwuE
9XfuyQ//WbEuIJHR2++XoCvLMckFZLHVbcZV3z9WaHqu0OUT+ckneRtMqRioVtpb
riVGqG2MUx0LwxBRjKP3qCxIdRgVCtIwnytxo0sGYrZgTMtbWsaDhB6GJt3GXFnC
4VfLehtwqXvu5sNZhOS5xsrzEKUfBa1pu132D3IE3uGxPTzPVVnnifIneFc+fNP7
bAxPhwqIjmMEg2ZN7KQONgfM51IC/Qcq2O141mZF2uEhB9cqhcVHBLMUd3v6MHYS
KDIkmipG1fplNyzc1/rkq2IFaBujLAFCM1C780PbTHRgi5NH5kJmdLFYkFx8i0ye
Ap4hGGRWItG2Ane+Cpz56Cu0b3sAoheS7vUPphQbWxtSsUoyPHWOkUsl4EductVa
X3vqLityWr6CACZ6p/WQVOl289WDI81Uki/IfZLEdJpd4hh0EZBUNindM3TZI72q
gs4Ge1XYQpL/el0wdvFyb3YL2xdZLI3Lw4TvwnK1uTogE85CqMkN+yGoHldnPYbD
+NeCXsdw/H/En/FPJBIUmu+PJgSw8yBlVNlXURv2JFQ8r2mxx58O8MyAzz/Wqf7o
wdWOdY6QijGcRVqvfLKFiQ//DPtyWp4pGfHgUxaiNA6CE3wn6G1mlMkJ9SwUOsTo
pXZFQX5L6/WxO8i4FPdKhVni3qm9Fr7L8XWVDdioJ0+I018sMUs=
=KK9M
-----END PGP SIGNATURE-----

C
C
Christopher Baines wrote on 22 Jan 2018 22:08
[PATCH 03/10] gnu: Add go-github.com-jessevdk-go-flags.
(address . 30214@debbugs.gnu.org)
20180122210830.28924-3-mail@cbaines.net
* gnu/packages/golang.scm (go-github.com-jessevdk-go-flags): New variable.
---
gnu/packages/golang.scm | 34 ++++++++++++++++++++++++++++++++++
1 file changed, 34 insertions(+)

Toggle diff (44 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 202183ff2..514b347a5 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -446,3 +446,37 @@ interfaces in Go. The goal is to enable developers to write fast and
distributable command line applications in an expressive way.")
(home-page "https://github.com/davidjpeacock/cli")
(license license:expat))))
+
+(define-public go-github.com-jessevdk-go-flags
+ (package
+ (name "go-github.com-jessevdk-go-flags")
+ (version "1.3.0")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://github.com/jessevdk/go-flags/archive/v"
+ version ".tar.gz"))
+ (file-name (string-append name "-" version "-checkout"))
+ (sha256
+ (base32
+ "0dmvsxsq2s6jx17c8snpw8b2hixy5m03wp8qwvsjsjzavd5gkyg0"))))
+ (build-system go-build-system)
+ (arguments
+ `(#:unpack-path "github.com/jessevdk"
+ #:import-path "github.com/jessevdk/go-flags"
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'rename-archive
+ (lambda _
+ (rename-file
+ ,(string-append "src/github.com/jessevdk/go-flags-" version)
+ "src/github.com/jessevdk/go-flags")
+ #t)))))
+ (synopsis "Go library for parsing command line arguments")
+ (description
+ "The @code{flags} package provides a command line option parser. The
+functionality is similar to the go builtin @code{flag} package, but
+@code{flags} provides more options and uses reflection to provide a succinct
+way of specifying command line options.")
+ (home-page "https://github.com/jessevdk/go-flags")
+ (license license:bsd-3)))
--
2.15.1
C
C
Christopher Baines wrote on 22 Jan 2018 22:08
[PATCH 06/10] gnu: Add go-gopkg.in-mgo.v2.
(address . 30214@debbugs.gnu.org)
20180122210830.28924-6-mail@cbaines.net
* gnu/packages/databases.scm (go-gopkg.in-mgo.v2): New variable.
---
gnu/packages/databases.scm | 52 ++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 52 insertions(+)

Toggle diff (79 lines)
diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm
index c0cf41a5b..8f5f639cc 100644
--- a/gnu/packages/databases.scm
+++ b/gnu/packages/databases.scm
@@ -49,6 +49,7 @@
(define-module (gnu packages databases)
#:use-module (gnu packages)
+ #:use-module (gnu packages admin)
#:use-module (gnu packages algebra)
#:use-module (gnu packages autotools)
#:use-module (gnu packages avahi)
@@ -94,6 +95,7 @@
#:use-module (guix download)
#:use-module (guix git-download)
#:use-module (guix build-system gnu)
+ #:use-module (guix build-system go)
#:use-module (guix build-system perl)
#:use-module (guix build-system python)
#:use-module (guix build-system ruby)
@@ -173,6 +175,56 @@ store key/value pairs in a file in a manner similar to the Unix dbm library
and provides interfaces to the traditional file format.")
(license license:gpl3+)))
+(define-public go-gopkg.in-mgo.v2
+ (package
+ (name "go-gopkg.in-mgo.v2")
+ (version "2016.08.01")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://github.com/go-mgo/mgo/archive/r"
+ version ".tar.gz"))
+ (file-name (string-append name "-" version "-checkout"))
+ (sha256
+ (base32
+ "09li3qc5c5idw4qldy0yzfh1vwac3hpslnq96g3s3mld9wwpnmg2"))))
+ (build-system go-build-system)
+ (arguments
+ `(#:import-path "gopkg.in/mgo.v2"
+ #:unpack-path "gopkg.in"
+ ;; TODO: Starting mongo for running the tests currently fails
+ ;; Error parsing command line: unrecognised option '--chunkSize'
+ #:tests? #f
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'rename-archive
+ (lambda _
+ (rename-file
+ ,(string-append "src/gopkg.in/mgo-r" version)
+ "src/gopkg.in/mgo.v2")
+ #t))
+ (add-before 'check 'start-mongodb
+ (lambda* (#:key tests? #:allow-other-keys)
+ (if tests?
+ (with-directory-excursion "src/gopkg.in/mgo.v2"
+ (invoke "make" "startdb")))))
+ (add-after 'check 'stop'mongodb
+ (lambda* (#:key tests? #:allow-other-keys)
+ (if tests?
+ (with-directory-excursion "src/gopkg.in/mgo.v2"
+ (invoke "make" "stopdb"))))))))
+ (native-inputs
+ `(("go-gopkg.in-check.v1" ,go-gopkg.in-check.v1)
+ ("mongodb" ,mongodb)
+ ("daemontools" ,daemontools)))
+ (synopsis "@code{mgo} offers a rich MongoDB driver for Go.")
+ (description
+ "@code{mgo} (pronounced as mango) is a MongoDB driver for the Go language.
+It implements a rich selection of features under a simple API following
+standard Go idioms.")
+ (home-page "http://labix.org/mgo")
+ (license license:bsd-2)))
+
(define-public bdb
(package
(name "bdb")
--
2.15.1
C
C
Christopher Baines wrote on 22 Jan 2018 22:08
[PATCH 04/10] gnu: Add go-gopkg.in-check.v1.
(address . 30214@debbugs.gnu.org)
20180122210830.28924-4-mail@cbaines.net
* gnu/packages/check.scm (go-gopkg.in-check.v1): New variable.
---
gnu/packages/check.scm | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)

Toggle diff (45 lines)
diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm
index 1585948b3..a5c528f7f 100644
--- a/gnu/packages/check.scm
+++ b/gnu/packages/check.scm
@@ -59,6 +59,7 @@
#:use-module (guix git-download)
#:use-module (guix build-system cmake)
#:use-module (guix build-system gnu)
+ #:use-module (guix build-system go)
#:use-module (guix build-system python)
#:use-module (guix build-system trivial))
@@ -283,6 +284,30 @@ normally do not detect. The goal is to detect only real errors in the code
(i.e. have zero false positives).")
(license license:gpl3+)))
+(define-public go-gopkg.in-check.v1
+ (let ((commit "20d25e2804050c1cd24a7eea1e7a6447dd0e74ec")
+ (revision "0"))
+ (package
+ (name "go-gopkg.in-check.v1")
+ (version (string-append "0.0.0-" revision "." (string-take commit 7)))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/go-check/check.git")
+ (commit commit)))
+ (file-name (string-append name "-" version "-checkout"))
+ (sha256
+ (base32
+ "0k1m83ji9l1a7ng8a7v40psbymxasmssbrrhpdv2wl4rhs0nc3np"))))
+ (build-system go-build-system)
+ (arguments
+ '(#:import-path "gopkg.in/check.v1"))
+ (synopsis "Rich testing extension for Go's testing package")
+ (description
+ "@code{check} is a rich testing extension for Go's testing package.")
+ (home-page "https://github.com/go-check/check")
+ (license license:bsd-2))))
+
(define-public googletest
(package
(name "googletest")
--
2.15.1
C
C
Christopher Baines wrote on 22 Jan 2018 22:08
[PATCH 02/10] gnu: Add go-github.com-howeyc-gopass.
(address . 30214@debbugs.gnu.org)
20180122210830.28924-2-mail@cbaines.net
* gnu/packages/terminals.scm (go-github.com-howeyc-gopass): New variable.
---
gnu/packages/terminals.scm | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)

Toggle diff (38 lines)
diff --git a/gnu/packages/terminals.scm b/gnu/packages/terminals.scm
index 37b222e93..8740356a1 100644
--- a/gnu/packages/terminals.scm
+++ b/gnu/packages/terminals.scm
@@ -610,3 +610,31 @@ desktop installed to have a decent terminal emulator.")
with terminals in Go.")
(home-page "https://go.googlesource.com/crypto/")
(license license:bsd-3))))
+
+(define-public go-github.com-howeyc-gopass
+ (let ((commit "bf9dde6d0d2c004a008c27aaee91170c786f6db8")
+ (revision "0"))
+ (package
+ (name "go-github.com-howeyc-gopass")
+ (version (string-append "0.0.0-" revision "." (string-take commit 7)))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/howeyc/gopass.git")
+ (commit commit)))
+ (file-name (string-append name "-" version "-checkout"))
+ (sha256
+ (base32
+ "1jxzyfnqi0h1fzlsvlkn10bncic803bfhslyijcxk55mgh297g45"))))
+ (build-system go-build-system)
+ (arguments
+ '(#:import-path "github.com/howeyc/gopass"))
+ (native-inputs
+ `(("go-golang.org-x-crypto-ssh-terminal"
+ ,go-golang.org-x-crypto-ssh-terminal)))
+ (synopsis "Retrieve password from a terminal or piped input in Go")
+ (description
+ "@code{gopass} is a Go package for retrieving a password from user
+terminal or piped input.")
+ (home-page "https://github.com/howeyc/gopass")
+ (license license:isc))))
--
2.15.1
C
C
Christopher Baines wrote on 22 Jan 2018 22:08
[PATCH 01/10] gnu: Add go-golang.org-x-crypto-ssh-terminal.
(address . 30214@debbugs.gnu.org)
20180122210830.28924-1-mail@cbaines.net
* gnu/packages/terminals.scm (go-golang.org-x-crypto-ssh-terminal): New
variable.
---
gnu/packages/terminals.scm | 38 ++++++++++++++++++++++++++++++++++++++
1 file changed, 38 insertions(+)

Toggle diff (55 lines)
diff --git a/gnu/packages/terminals.scm b/gnu/packages/terminals.scm
index 68507cf64..37b222e93 100644
--- a/gnu/packages/terminals.scm
+++ b/gnu/packages/terminals.scm
@@ -31,6 +31,7 @@
#:use-module (guix build-system cmake)
#:use-module (guix build-system gnu)
#:use-module (guix build-system glib-or-gtk)
+ #:use-module (guix build-system go)
#:use-module (guix build-system python)
#:use-module (guix download)
#:use-module (guix git-download)
@@ -572,3 +573,40 @@ eye-candy, customizable, and reasonably lightweight.")
It's a terminal emulator with few dependencies, so you don't need a full GNOME
desktop installed to have a decent terminal emulator.")
(license license:gpl2)))
+
+(define-public go-golang.org-x-crypto-ssh-terminal
+ (let ((commit "c78caca803c95773f48a844d3dcab04b9bc4d6dd")
+ (revision "0"))
+ (package
+ (name "go-golang.org-x-crypto-ssh-terminal")
+ (version (string-append "0.0.0-" revision "." (string-take commit 7)))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://go.googlesource.com/crypto")
+ (commit commit)))
+ (file-name (string-append "go.googlesource.com-crypto-"
+ version "-checkout"))
+ (sha256
+ (base32
+ "0vxlfxr9y681yn2cfh6dbqmq35vvq4f45ay0mm31ffkny9cms0y4"))))
+ (build-system go-build-system)
+ (arguments
+ '(#:import-path "golang.org/x/crypto/ssh/terminal"
+ #:unpack-path "golang.org/x/crypto"
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'reset-gzip-timestamps 'make-gzip-archive-writable
+ (lambda* (#:key outputs #:allow-other-keys)
+ (map (lambda (file)
+ (make-file-writable file))
+ (find-files
+ (string-append (assoc-ref outputs "out")
+ "/src/golang.org/x/crypto/ed25519/testdata")
+ ".*\\.gz$"))
+ #t)))))
+ (synopsis "Support functions for dealing with terminals in Go")
+ (description "@code{terminal} provides support functions for dealing
+with terminals in Go.")
+ (home-page "https://go.googlesource.com/crypto/")
+ (license license:bsd-3))))
--
2.15.1
C
C
Christopher Baines wrote on 22 Jan 2018 22:08
[PATCH 08/10] gnu: Add go-github.com-mattn-go-runewidth.
(address . 30214@debbugs.gnu.org)
20180122210830.28924-8-mail@cbaines.net
* gnu/packages/textutils.scm (go-github.com-mattn-go-runewidth): New variable.
---
gnu/packages/textutils.scm | 33 +++++++++++++++++++++++++++++++++
1 file changed, 33 insertions(+)

Toggle diff (50 lines)
diff --git a/gnu/packages/textutils.scm b/gnu/packages/textutils.scm
index 1f5fe6aba..6cf7c2165 100644
--- a/gnu/packages/textutils.scm
+++ b/gnu/packages/textutils.scm
@@ -37,6 +37,7 @@
#:use-module (guix git-download)
#:use-module (guix build-system ant)
#:use-module (guix build-system gnu)
+ #:use-module (guix build-system go)
#:use-module (guix build-system cmake)
#:use-module (guix build-system python)
#:use-module (gnu packages)
@@ -660,3 +661,35 @@ source code.")
"This library simply implements Levenshtein distance algorithm with C++
and Cython.")
(license license:expat))))
+
+(define-public go-github.com-mattn-go-runewidth
+ (package
+ (name "go-github.com-mattn-go-runewidth")
+ (version "0.0.2")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://github.com/mattn/go-runewidth/archive/v"
+ version ".tar.gz"))
+ (file-name (string-append name "-" version "-checkout"))
+ (sha256
+ (base32
+ "0xmhjpzdsy01apxl0s9kd0x7v3slahdg4njsygs9m0nz3x038xvc"))))
+ (build-system go-build-system)
+ (arguments
+ `(#:import-path "github.com/mattn/go-runewidth"
+ #:unpack-path "github.com/mattn"
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'rename-archive
+ (lambda _
+ (rename-file
+ ,(string-append "src/github.com/mattn/go-runewidth-" version)
+ "src/github.com/mattn/go-runewidth")
+ #t)))))
+ (synopsis "@code{runewidth} provides Go functions to work with string widths")
+ (description
+ "The @code{runewidth} library provides Go functions for padding,
+measuring and checking the width of strings, with support east asian text.")
+ (home-page "https://github.com/jessevdk/go-flags")
+ (license license:expat)))
--
2.15.1
C
C
Christopher Baines wrote on 22 Jan 2018 22:08
[PATCH 07/10] gnu: Add go-gopkg.in-tomb.v2.
(address . 30214@debbugs.gnu.org)
20180122210830.28924-7-mail@cbaines.net
* gnu/packages/golang.scm (go-gopkg.in-tomb.v2): New variable.
---
gnu/packages/golang.scm | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)

Toggle diff (35 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 514b347a5..5565a0965 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -480,3 +480,28 @@ functionality is similar to the go builtin @code{flag} package, but
way of specifying command line options.")
(home-page "https://github.com/jessevdk/go-flags")
(license license:bsd-3)))
+
+(define-public go-gopkg.in-tomb.v2
+ (let ((commit "d5d1b5820637886def9eef33e03a27a9f166942c")
+ (revision "0"))
+ (package
+ (name "go-gopkg.in-tomb.v2")
+ (version (string-append "0.0.0-" revision "." (string-take commit 7)))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/go-tomb/tomb.git")
+ (commit commit)))
+ (file-name (string-append name "-" version "-checkout"))
+ (sha256
+ (base32
+ "1sv15sri99szkdz1bkh0ir46w9n8prrwx5hfai13nrhkawfyfy10"))))
+ (build-system go-build-system)
+ (arguments
+ '(#:import-path "gopkg.in/tomb.v2"))
+ (synopsis "@code{tomb} handles clean goroutine tracking and termination")
+ (description
+ "The @code{tomb} package handles clean goroutine tracking and
+termination.")
+ (home-page "https://gopkg.in/tomb.v2")
+ (license license:bsd-3))))
--
2.15.1
C
C
Christopher Baines wrote on 22 Jan 2018 22:08
[PATCH 05/10] gnu: Add daemontools.
(address . 30214@debbugs.gnu.org)
20180122210830.28924-5-mail@cbaines.net
* gnu/packages/admin.scm (daemontools): New variable.
---
gnu/packages/admin.scm | 43 +++++++++++++++++++++++++++++++++++++++++++
1 file changed, 43 insertions(+)

Toggle diff (56 lines)
diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm
index 3d3c62619..7c7c457f5 100644
--- a/gnu/packages/admin.scm
+++ b/gnu/packages/admin.scm
@@ -187,6 +187,49 @@ interface and is based on GNU Guile.")
(home-page "https://www.gnu.org/software/shepherd/")
(properties '((ftp-server . "alpha.gnu.org")))))
+(define-public daemontools
+ (package
+ (name "daemontools")
+ (version "0.76")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://cr.yp.to/" name "/"
+ name "-" version ".tar.gz"))
+ (sha256
+ (base32
+ "07scvw88faxkscxi91031pjkpccql6wspk4yrlnsbrrb5c0kamd5"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:tests? #f ;; No tests as far as I can tell.
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'chdir
+ (lambda _
+ (chdir ,(string-append name "-" version))))
+ (delete 'configure)
+ (add-before 'build 'patch
+ (lambda _
+ (substitute* "src/error.h"
+ (("extern int errno;")
+ "#include <errno.h>"))))
+ (replace 'build
+ (lambda _
+ (invoke "package/compile")))
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (bin (string-append out "/bin")))
+ (for-each (lambda (file)
+ (install-file file bin))
+ (find-files "command"))))))))
+ (synopsis "Tools for managing UNIX style services")
+ (description
+ "@code{daemontools} is a collection of tools for managing UNIX
+services.")
+ (license license:public-domain)
+ (home-page "https://cr.yp.to/daemontools.html")))
+
(define-public dfc
(package
(name "dfc")
--
2.15.1
C
C
Christopher Baines wrote on 22 Jan 2018 22:08
[PATCH 10/10] gnu: Add mongo-tools.
(address . 30214@debbugs.gnu.org)
20180122210830.28924-10-mail@cbaines.net
* gnu/packages/databases.scm (mongo-tools): New variable.
---
gnu/packages/databases.scm | 95 ++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 95 insertions(+)

Toggle diff (119 lines)
diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm
index 8f5f639cc..0c1bc9ea3 100644
--- a/gnu/packages/databases.scm
+++ b/gnu/packages/databases.scm
@@ -68,6 +68,7 @@
#:use-module (gnu packages gnupg)
#:use-module (gnu packages guile)
#:use-module (gnu packages time)
+ #:use-module (gnu packages golang)
#:use-module (gnu packages jemalloc)
#:use-module (gnu packages language)
#:use-module (gnu packages libevent)
@@ -87,6 +88,8 @@
#:use-module (gnu packages serialization)
#:use-module (gnu packages statistics)
#:use-module (gnu packages tcl)
+ #:use-module (gnu packages terminals)
+ #:use-module (gnu packages textutils)
#:use-module (gnu packages tls)
#:use-module (gnu packages valgrind)
#:use-module (gnu packages xml)
@@ -2607,3 +2610,95 @@ transforms idiomatic python function calls to well-formed SQL queries.")
(define-public python2-sql
(package-with-python2 python-sql))
+
+(define-public mongo-tools
+ (package
+ (name "mongo-tools")
+ (version "3.4.0")
+ (source
+ (origin (method url-fetch)
+ (uri (string-append "https://github.com/mongodb/mongo-tools"
+ "/archive/r" version ".tar.gz"))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32
+ "095nc57k4m4iyim0x3fgpw681qba123iyl4qz7xysbv5ngbr19mc"))))
+ (build-system go-build-system)
+ (arguments
+ `(#:tests? #f
+ #:unpack-path "github.com/mongodb"
+ #:import-path "github.com/mongodb/mongo-tools"
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'rename-archive
+ (lambda _
+ (rename-file
+ ,(string-append "src/github.com/mongodb/mongo-tools-r" version)
+ "src/github.com/mongodb/mongo-tools")
+ #t))
+
+ (add-after 'rename-archive 'delete-bundled-source-code
+ (lambda _
+ (delete-file-recursively
+ "src/github.com/mongodb/mongo-tools/vendor")
+ #t))
+
+ ;; We don't need to install the source code for end-user application
+ (delete 'install-source)
+
+ (replace 'build
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let ((bash (which "bash"))
+ (out (assoc-ref outputs "out")))
+ (let build ((tools
+ '("bsondump" "mongodump" "mongoexport" "mongofiles"
+ "mongoimport" "mongooplog" "mongorestore"
+ "mongostat" "mongotop")))
+ (if (null? tools)
+ #t
+ (if (let* ((tool (car tools))
+ (command
+ `("go" "install" "-v"
+ "-tags=\"ssl sasl\""
+ "-ldflags"
+ "-extldflags=-Wl,-z,now,-z,relro"
+ ,(string-append
+ "src/github.com/mongodb/mongo-tools/"
+ tool "/main/" tool ".go"))))
+ (simple-format #t "build: running ~A\n"
+ (string-join command))
+ (zero? (apply system* command)))
+ (build (cdr tools))
+ #f)))))))))
+ (native-inputs
+ `(("go-github.com-howeyc-gopass" ,go-github.com-howeyc-gopass)
+ ("go-github.com-jessevdk-go-flags" ,go-github.com-jessevdk-go-flags)
+ ("go-golang.org-x-crypto-ssh-terminal" ,go-golang.org-x-crypto-ssh-terminal)
+ ("go-gopkg.in-mgo.v2" ,go-gopkg.in-mgo.v2)
+ ("go-gopkg.in-tomb.v2" ,go-gopkg.in-tomb.v2)
+ ("go-github.com-nsf-termbox-go" ,go-github.com-nsf-termbox-go)))
+ (home-page "https://github.com/mongodb/mongo-tools")
+ (synopsis "Various tools for interacting with MongoDB and BSON")
+ (description
+ "This package includes a collection of tools related to MongoDB.
+@table @code
+@item bsondump
+Display BSON files in a human-readable format
+@item mongoimport
+Convert data from JSON, TSV or CSV and insert them into a collection
+@item mongoexport
+Write an existing collection to CSV or JSON format
+@item mongodump/mongorestore
+Dump MongoDB backups to disk in the BSON format
+@item mongorestore
+Read MongoDB backups in the BSON format, and restore them to a live database
+@item mongostat
+Monitor live MongoDB servers, replica sets, or sharded clusters
+@item mongofiles
+Read, write, delete, or update files in GridFS
+@item mongooplog
+Replay oplog entries between MongoDB servers
+@item mongotop
+Monitor read/write activity on a mongo server
+@end table")
+ (license license:asl2.0)))
--
2.15.1
C
C
Christopher Baines wrote on 22 Jan 2018 22:08
[PATCH 09/10] gnu: Add go-github.com-nsf-termbox-go.
(address . 30214@debbugs.gnu.org)
20180122210830.28924-9-mail@cbaines.net
* gnu/packages/terminals.scm (go-github.com-nsf-termbox-go): New variable.
---
gnu/packages/terminals.scm | 30 ++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)

Toggle diff (50 lines)
diff --git a/gnu/packages/terminals.scm b/gnu/packages/terminals.scm
index 8740356a1..f90ae96e2 100644
--- a/gnu/packages/terminals.scm
+++ b/gnu/packages/terminals.scm
@@ -53,6 +53,7 @@
#:use-module (gnu packages python)
#:use-module (gnu packages python-web)
#:use-module (gnu packages qt)
+ #:use-module (gnu packages textutils)
#:use-module (gnu packages wm)
#:use-module (gnu packages xdisorg)
#:use-module (gnu packages xml)
@@ -574,6 +575,35 @@ It's a terminal emulator with few dependencies, so you don't need a full GNOME
desktop installed to have a decent terminal emulator.")
(license license:gpl2)))
+(define-public go-github.com-nsf-termbox-go
+ (let ((commit "4ed959e0540971545eddb8c75514973d670cf739")
+ (revision "0"))
+ (package
+ (name "go-github.com-nsf-termbox-go")
+ (version (string-append "0.0.0-" revision "." (string-take commit 7)))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/nsf/termbox-go.git")
+ (commit commit)))
+ (file-name (string-append name "-" version "-checkout"))
+ (sha256
+ (base32
+ "1vx64i1mg660if3wwm81p4b7lzxfb3qbr39i7misdyld3fc486p9"))))
+ (build-system go-build-system)
+ (arguments
+ '(#:import-path "github.com/nsf/termbox-go"))
+ (propagated-inputs
+ `(("go-github.com-mattn-go-runewidth"
+ ,go-github.com-mattn-go-runewidth)))
+ (synopsis "@code{termbox} provides a minimal API for text-based user
+interfaces")
+ (description
+ "Termbox is a library that provides a minimalistic API which allows the
+programmer to write text-based user interfaces.")
+ (home-page "https://github.com/nsf/termbox-go")
+ (license license:expat))))
+
(define-public go-golang.org-x-crypto-ssh-terminal
(let ((commit "c78caca803c95773f48a844d3dcab04b9bc4d6dd")
(revision "0"))
--
2.15.1
L
L
Leo Famulari wrote on 22 Jan 2018 22:51
Re: [bug#30214] [PATCH]: Add mongo-tools.
(name . Christopher Baines)(address . mail@cbaines.net)(address . 30214@debbugs.gnu.org)
20180122215120.GA15170@jasmine.lan
On Mon, Jan 22, 2018 at 08:51:39PM +0000, Christopher Baines wrote:
Toggle quote (13 lines)
>
> Christopher Baines (10):
> gnu: Add go-golang.org-x-crypto-ssh-terminal.
> gnu: Add go-github.com-howeyc-gopass.
> gnu: Add go-github.com-jessevdk-go-flags.
> gnu: Add go-gopkg.in-check.v1.
> gnu: Add daemontools.
> gnu: Add go-gopkg.in-mgo.v2.
> gnu: Add go-gopkg.in-tomb.v2.
> gnu: Add go-github.com-mattn-go-runewidth.
> gnu: Add go-github.com-nsf-termbox-go.
> gnu: Add mongo-tools.

Cool! Please feel free to provide feeback on the go-build-system. The
current implementation is sort of primitive and may need to change to
accomodate the way the Go community develops with Go libraries.
-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEsFFZSPHn08G5gDigJkb6MLrKfwgFAlpmXNUACgkQJkb6MLrK
fwjLsQ/+NjNpe9uvo83jWFDvqcEp6OVCvTjD6r766r7EKPZB2XqbWKu4vBkLRAR+
obCh9mFe4sAhLgWulZgW/gJ9E48ozq8F+A/W9RI1k/ztatF6C2YLpx87DR1ZVInt
M9+rKqkVUXDcewvF6twSoV3TCG7eOo2fZT01zvu07xUrcbDntK7jLkXICGe0pzKY
t7hCUKd58uDQ/TxWK/2ZxMKlIlZsVHmECrr8vF2P+iUhlsejEUUEaKkBWWbixyc3
1sAnoMaKhrH0OTUCqkgw/NqKwCLXz4SA/LpQ5SYMbnzok/8JLlbt0n1M9cbpTBA2
6ElYFGPWg0ghsB3yeKG6dY080w31TcblaKiEL+MSOY8jq+My5Ua0rdmROMietrlM
TtP33UiOOrKtDOFZqRCiPv7xXl5Y4js1VdKo8JCsSSasF8BCbkDdB70TWfRVt+a1
HEfDlliHZDSnTFxiyzUc5c6NQpf47CDZPVE6GsoxidSEMigRuAhlj1NtgRURq6mq
V14gwp5VZwVG5Z5xhkQfsIUoq3r/+vqvjc2AtPEcWBmY5ZHDqxReejvVP7k/D2q1
J/OsPi9HAw4kuw3tIqMDeQu3qMhjjd7aIGJbO5sFgJJSqqUfXSK5tXqjzReI0Jxj
f/UYts+fFIyx6HDXO1tozdfNGaxzqR0BFrN4J90EMuMIzxfLQDQ=
=c0ts
-----END PGP SIGNATURE-----


L
L
Leo Famulari wrote on 22 Jan 2018 22:52
Re: [bug#30214] [PATCH 01/10] gnu: Add go-golang.org-x-crypto-ssh-terminal.
(name . Christopher Baines)(address . mail@cbaines.net)(address . 30214@debbugs.gnu.org)
20180122215213.GB15170@jasmine.lan
On Mon, Jan 22, 2018 at 09:08:21PM +0000, Christopher Baines wrote:
Toggle quote (10 lines)
> * gnu/packages/terminals.scm (go-golang.org-x-crypto-ssh-terminal): New
> variable.

> +(define-public go-golang.org-x-crypto-ssh-terminal
> + (let ((commit "c78caca803c95773f48a844d3dcab04b9bc4d6dd")
> + (revision "0"))
> + (package
> + (name "go-golang.org-x-crypto-ssh-terminal")
> + (version (string-append "0.0.0-" revision "." (string-take commit 7)))

Can you use (git-version "0.0.0" revision commit) here?

Toggle quote (8 lines)
> + (source (origin
> + (method git-fetch)
> + (uri (git-reference
> + (url "https://go.googlesource.com/crypto")
> + (commit commit)))
> + (file-name (string-append "go.googlesource.com-crypto-"
> + version "-checkout"))

And here, (git-file-name name version)?
-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEsFFZSPHn08G5gDigJkb6MLrKfwgFAlpmXQ0ACgkQJkb6MLrK
fwhY0Q/5AWou3P1Jf+8Mr1aMygk6JY5ukyh0esqoTcHiXDWrMFhGYWR4pNKl49fn
BV0bRx6F7ohlh73nE6WBYimNx8d1MPF6YDu8SKtY4MXBaoo9382Br5kNVJdMFTln
f6+pl/vhnZMXMNb727+SvbTyNKBi5mUV4Tr4WMaCJEGw2l665FHytvOLCMMmPRj+
xQMvl/AUkdM2KeRYXO3d6I78PTmEYKdkCQtjEdRHaa59y7K7FZB+rznltADrXU5d
ewoqQU9H48bMngs7cVwLf6VNwu+XioDo/4y2cp78k0fgzRgQ9aT3F4gKwfyHoLal
4cExRnRRvbz+XeAvuWX8lE0cgqamZCWzhTmcLahR51oGTvEoaL6CiI9zmn9g3P59
HL3CuSv/EFYWc4m8kdh+84+ez7wrncIV4tnc/KKRX7ZjPoTdCvr6B6mzNUCdl236
xvWQT9pEJhaHBjoKUWUD2HmDGTw4Da6aifWvC/XFIYiAR45df+5rStccqR/afF7s
DRtwYZkPRFZzl2mUsCPWa9dE2DW3z+CVF6d4Kw3EqTOrfh9AzeneRNsWYNmpDE1S
GQ7kP3e/8JmnB5BdzdQZoCzmwoON8C7lMWvXZY+flOevAAc9+JAuw/CEj8fXZxS8
CYBg5zI/Lau9WH/4pcklV8M57P/nh+OqnUcXEEzAurdaLs5KluU=
=vHNb
-----END PGP SIGNATURE-----


L
L
Leo Famulari wrote on 22 Jan 2018 22:53
Re: [bug#30214] [PATCH 02/10] gnu: Add go-github.com-howeyc-gopass.
(name . Christopher Baines)(address . mail@cbaines.net)(address . 30214@debbugs.gnu.org)
20180122215306.GC15170@jasmine.lan
On Mon, Jan 22, 2018 at 09:08:22PM +0000, Christopher Baines wrote:
Toggle quote (6 lines)
> * gnu/packages/terminals.scm (go-github.com-howeyc-gopass): New variable.

> + (native-inputs
> + `(("go-golang.org-x-crypto-ssh-terminal"
> + ,go-golang.org-x-crypto-ssh-terminal)))

Is it really just a native-input? Or could it need this library later,
at run-time?
-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEsFFZSPHn08G5gDigJkb6MLrKfwgFAlpmXUIACgkQJkb6MLrK
fwgKUQ//bPRvVZGd0T6+qsEZh5RN1SqkAorb+wVy96DtdBJDzjQDj/tiR64VxGE0
Vx/3YAYds/sc700cWLffiCvpu32w5c34gEt1tuxwzxgk4npIV9dXxipTfPM1ZPGn
32oLfHnNjx2mCxVXfHvPz7YCZ+g4aw4MlUMjGJAqiLxxLZ5t5lav3u+9vwM8VM/s
T4qPfBxgjgIfXaFGoN9Zpvg3/FqE2vQ+Ww7jqj5DCh0HgNi2gOjcV+mihVLQIbCc
HPNuZZIY6SUwt4PB7Yel/RJtKcDcKPv8kCjTGXpSdi3E9Ek5hLnzG66/dnxaLx57
8ebNDun8SOnp7meAYoDoToWC7cmrho+1YcaYvrJvmaiF/sFhNmxOTBjjMA/76ttj
TjbB+kg690lnex2UcKJZoZIlNkw/WBwi/RqW07U2cPcmpVcU0OTjIvfP3SL9CRdY
UB0Zw5EytntOaJQBEdQGl1M2y3zXJPLwrLyWpJV4HLEVpsail+rQiz70Y9YdRnpu
oiF5r5B6Vrq6xYCuA/z+tSHeg2yokSqkevDmcvCfpMZuXWqkGGrH3mHVfL70jFtL
7VtjzwzD33w5OXYkXbI4rKLnYtxeojonEwtoxiS3rWeNIrohutRXNm7ptT3nED2c
uD/9KaaChOPwYRMSht12DDciqjP+ZD/3wPIwIXflwIbkSmP3IsE=
=0Ycv
-----END PGP SIGNATURE-----


L
L
Leo Famulari wrote on 22 Jan 2018 22:54
Re: [bug#30214] [PATCH 03/10] gnu: Add go-github.com-jessevdk-go-flags.
(name . Christopher Baines)(address . mail@cbaines.net)(address . 30214@debbugs.gnu.org)
20180122215447.GD15170@jasmine.lan
On Mon, Jan 22, 2018 at 09:08:23PM +0000, Christopher Baines wrote:
Toggle quote (9 lines)
> * gnu/packages/golang.scm (go-github.com-jessevdk-go-flags): New variable.

> + (add-after 'unpack 'rename-archive
> + (lambda _
> + (rename-file
> + ,(string-append "src/github.com/jessevdk/go-flags-" version)
> + "src/github.com/jessevdk/go-flags")
> + #t)))))

I notice a few of these changes in your patch series. Can you give some
detail about what's going on?

If someone were developing with this library in the typical Go way,
outside of Guix, would they have a problem here?

Should the go-build-system try to handle this automatically?
-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEsFFZSPHn08G5gDigJkb6MLrKfwgFAlpmXacACgkQJkb6MLrK
fwgIGxAAsDAH5kAvUDf58Kw/Yx2T0cRzLG8Ed5CKyh+mNixEvvl2he9xQYZvswHq
oEfWbM3qTqUQMt5Zk3b9KDUgFD9GsFFH0YJMKWhenN0tVpaI+ihpdqcjDYxUDs/J
UGZeWcbBVUPjLVinYjAxxJNzw4zs9JhNBqawSa+Hq2aYT+0O473a29h7rVQ5BJ06
T72Vulj9G1dCQOj50QY1qYU2RjUOrisAjI4KERkhcQWFKIMVR//2t0Snn9oXe/mT
hQGXa724O/sMrphdhu3KMgIuFeNCA0TM/fnsc39xii/UsWrqNT8JT/8o0AIyV8hq
LGRVYSc+XCntvY3l3sN6QQnlypQV47HxpXOYm+if/NklptqGpbz//NXtg6pTLXa6
yigsHHVksFOR+YF+pwczJHbtmCiOrZ7fNRMIClyPpbbsSXJF2fX3O0cfIhbLG66e
ZV6MVa5sevTxrErAUoqX1lyq8fnn0XLRvKut6xjSRI/RK1xjeCvnbCOfcNEme8X9
t96PQss4cqgq5evV2qJgatX1TqqJFJgMzFELlzetRdQoOmK5ZpW79b5zAwyPR0qD
v+iWANw3TzF3wWqtSYJZh/gkUGo1lvY7EfxiP7DuAhzmOgBn2/JZInDXB6JCyaqK
FsGU3AOxSjkNLkCPeqcudR4baTRUy3kOc+i/xPashyHo/RmGzAQ=
=UQRP
-----END PGP SIGNATURE-----


L
L
Leo Famulari wrote on 22 Jan 2018 22:57
Re: [bug#30214] [PATCH 05/10] gnu: Add daemontools.
(name . Christopher Baines)(address . mail@cbaines.net)(address . 30214@debbugs.gnu.org)
20180122215727.GE15170@jasmine.lan
On Mon, Jan 22, 2018 at 09:08:25PM +0000, Christopher Baines wrote:
Toggle quote (2 lines)
> * gnu/packages/admin.scm (daemontools): New variable.

Cool!

Toggle quote (8 lines)
> + (name "daemontools")
> + (version "0.76")
> + (source (origin
> + (method url-fetch)
> + (uri (string-append
> + "https://cr.yp.to/" name "/"
> + name "-" version ".tar.gz"))

Can you check if there are any important patches (security or other bug
fixes) floating around? This release is 16 years young...

For example, you might look at Debian's diff.gz:

-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEsFFZSPHn08G5gDigJkb6MLrKfwgFAlpmXkcACgkQJkb6MLrK
fwgGHRAAiPp8KoOq7sD2kJrLk4fjpfcBLU24qGV/jOB8pYvnStDBif3OAlHqt5PZ
zHz+10Dm5yViYBkvsIu1T+Vpg0/PwLHHTyauXE7dR8vO4ep3mCVlo6/MECNiaWId
D9klzYyWl9GsLvdArMCsF9ZQZkCunu3QvKk3jKcsq1LiqTsc2OubrimYYsf3k7+m
RLdypIBs5wBi2r+nGl2SP1HawbTbIlMM6l/dyJWBdTty5aTJB+7w2N/dXGZZ/mzX
Y2hYDBnrwhwmMBbth/tesRv7Q62LXMD+W1snL83iV3DK83BZQc9WrZIt0XgzDhEz
73LbM+bBqqf2EqO/5D/7Rmt4FRea03BnEOhCc8nG8/q7/xVFVW6EzvcSvzbv9bl+
T8tkLwX6QJz/o8mLHIBMEuEd/HOgcNT+yaUMU7J6AxeHYmlpf54PJNS14tGMv28H
VH0dCzcWNyfWSVz2tXHBXWbteTddpRGjihdcaB2iKjIR9MUAK/cCa3MxxDxT8gMy
9Xl+XaqQLDnmOIZV9nJpthxHLojD43EGw7ddx1+89XQcsQ/5SS1E3WmtzcV5G63b
O6f+S/fJVJ4d17tbEljcl2A2bQQN3byLNbjQ0UqsHZFPCGzpwgaazJ4q56oSkAJi
G5co8nFFctdS+Wg4lDMGTN/CM9KDK0OiAt4dRCZjiOYbaxCsznI=
=ph97
-----END PGP SIGNATURE-----


L
L
Leo Famulari wrote on 22 Jan 2018 23:01
Re: [bug#30214] [PATCH 10/10] gnu: Add mongo-tools.
(name . Christopher Baines)(address . mail@cbaines.net)(address . 30214@debbugs.gnu.org)
20180122220133.GF15170@jasmine.lan
On Mon, Jan 22, 2018 at 09:08:30PM +0000, Christopher Baines wrote:
Toggle quote (2 lines)
> * gnu/packages/databases.scm (mongo-tools): New variable.

Can you add some comments explaining the following section?

Toggle quote (16 lines)
> + (replace 'build
> + (lambda* (#:key inputs outputs #:allow-other-keys)
> + (let ((bash (which "bash"))
> + (out (assoc-ref outputs "out")))
> + (let build ((tools
> + '("bsondump" "mongodump" "mongoexport" "mongofiles"
> + "mongoimport" "mongooplog" "mongorestore"
> + "mongostat" "mongotop")))
> + (if (null? tools)
> + #t
> + (if (let* ((tool (car tools))
> + (command
> + `("go" "install" "-v"
> + "-tags=\"ssl sasl\""
> + "-ldflags"

This -ldflags argument avoids the go-build-system's default ldflags,
which strip the debugging symbols. Okay if that's what you intended.

Toggle quote (10 lines)
> + "-extldflags=-Wl,-z,now,-z,relro"
> + ,(string-append
> + "src/github.com/mongodb/mongo-tools/"
> + tool "/main/" tool ".go"))))
> + (simple-format #t "build: running ~A\n"
> + (string-join command))
> + (zero? (apply system* command)))
> + (build (cdr tools))
> + #f)))))))))

Do you think the go-build-system should accept some sort of #:make-flags
argument to simplify this sort of thing?
-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEsFFZSPHn08G5gDigJkb6MLrKfwgFAlpmXzwACgkQJkb6MLrK
fwg0xQ//ZMQO7YTzyMbPiZuErpon/9vnpytRr16GBvU7U/vpIIhW+6KfysshAS9m
mFt94eA8iuflCAr7iL9PECXVYaKRikc4xfYtyPX2Tm2WjIznjjzJKam7+8/nNBJJ
L+rVa3ZphdZHkp33m+L8dgF/b7NNm+Tymkvj9SNSS0qivvBs733knkKCeU/D3K5c
2Bqf/tc6J46evihJ/N35a4aZ1TacGWzq9kbUs0xujwISp/H1CLj3anTnX1jr8FrS
q/2Rrxn4DrtKwtw7yW3JW/B/gGt4FCrcmi555siKsqT94Bf3ibOX7d0VwBax0EKB
ypcawu7yqK6e/hmjncY55HuNmraMsd95jOw7ffPizJfRD7AvHrbjc9psdkNAqB09
ZQfDuLdHI3xTgWVJD5PFN5ETqj7U+ah09VMDZr5gXCvjL14uU102SkU+MhpyoT1k
wfwiWnFA24pwow/HTc9XT2YW/wKiX7Eetfj80jnUvYkCWfMk3F40aNw6eqC6Ifbl
RixytbKSQuFLrWMPM4rc7lu2ka89tWNbzU2Fy0pW7KojdPDdwLZIU9A5KHQZ7b/E
1uLHxFsiKu2xttWNVnoelyNKKo/2KRnCWGJqqW6uODL8qZUWMe5/D3SXJGhDClbk
LjG5C1YxdCqz8ioy2B5pf+Dpl0OWbkjJ7DFn2tFv9hxKwIruXqc=
=FbFJ
-----END PGP SIGNATURE-----


C
C
Christopher Baines wrote on 23 Jan 2018 20:41
Re: [bug#30214] [PATCH]: Add mongo-tools.
(name . Leo Famulari)(address . leo@famulari.name)(address . 30214@debbugs.gnu.org)
87zi545pnc.fsf@cbaines.net
Leo Famulari <leo@famulari.name> writes:

Toggle quote (18 lines)
> On Mon, Jan 22, 2018 at 08:51:39PM +0000, Christopher Baines wrote:
>>
>> Christopher Baines (10):
>> gnu: Add go-golang.org-x-crypto-ssh-terminal.
>> gnu: Add go-github.com-howeyc-gopass.
>> gnu: Add go-github.com-jessevdk-go-flags.
>> gnu: Add go-gopkg.in-check.v1.
>> gnu: Add daemontools.
>> gnu: Add go-gopkg.in-mgo.v2.
>> gnu: Add go-gopkg.in-tomb.v2.
>> gnu: Add go-github.com-mattn-go-runewidth.
>> gnu: Add go-github.com-nsf-termbox-go.
>> gnu: Add mongo-tools.
>
> Cool! Please feel free to provide feeback on the go-build-system. The
> current implementation is sort of primitive and may need to change to
> accomodate the way the Go community develops with Go libraries.

Thanks for writing it :) I've got no real experience with Go, but I am
interested in packaging a few bits of software written in Go.
-----BEGIN PGP SIGNATURE-----

iQKTBAEBCgB9FiEEPonu50WOcg2XVOCyXiijOwuE9XcFAlpnj+dfFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF
ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcACgkQXiijOwuE
9XfoJg/+M74A+ATXrWaRlrTu8IRCXybEcKhapSPulWg4QEr8XAv2h/po0DBOMdc6
Hd9+/kFtoeqUcunsRwb1kBW1MPnqOzL1eTFr53F3udgSP5qU2bLrLmMkpP8Pwgxv
2cdFOyBWfVLr+RMc/ITU7DwTAH/wDQxerpZr+tU9Iv2aUCVzsUsfbzQVPLIATK5H
CmsdxTOliOSi8vduBb3l4McaUDP39QIl6Y4o0etavC1sAz3LMksy1G0ZpgaeTG5a
H2ktjCdgszR0GBRSGnd24WIpsfg34lg5EjKeUJO/BC/GsclYu+CZt4HOavisrrr1
CXLdG85fLhulKpnlRIrlZvrMapZRprT/NffmWBTNORf/hquS/o0yXzti5Ermlegf
LEcfRYau8WTXbnKq5TdYxe3CiMHrnh46vU/hZdzOLcVSj6Ee4aNVm3UQeDV4geCe
Ic0WGPHGAyaBsv/cYz4TkPb/tE0iR/dB+REcXAGwr2dxPOmBF32XYUhgGmihn/VT
XURrYfh9KaoXBrfulvZdJmEUCcVkcU8CmhFrck4YjZ68r+glkJplNPknfJ45GZsn
rE0eURPjNZ8WjOmcLrMzOMuXdFyYwshUTwQnS8FgA7a8TYlKqtzNeudb8a5NZgtS
MlFk908ZyTzOjK517ZmDHf+PAhgElX1Ss1HNMTLNK7zIpnWsDYg=
=1SZw
-----END PGP SIGNATURE-----

C
C
Christopher Baines wrote on 23 Jan 2018 20:42
Re: [bug#30214] [PATCH 01/10] gnu: Add go-golang.org-x-crypto-ssh-terminal.
(name . Leo Famulari)(address . leo@famulari.name)(address . 30214@debbugs.gnu.org)
87y3ko5pm9.fsf@cbaines.net
Leo Famulari <leo@famulari.name> writes:

Toggle quote (23 lines)
> On Mon, Jan 22, 2018 at 09:08:21PM +0000, Christopher Baines wrote:
>> * gnu/packages/terminals.scm (go-golang.org-x-crypto-ssh-terminal): New
>> variable.
>
>> +(define-public go-golang.org-x-crypto-ssh-terminal
>> + (let ((commit "c78caca803c95773f48a844d3dcab04b9bc4d6dd")
>> + (revision "0"))
>> + (package
>> + (name "go-golang.org-x-crypto-ssh-terminal")
>> + (version (string-append "0.0.0-" revision "." (string-take commit 7)))
>
> Can you use (git-version "0.0.0" revision commit) here?
>
>> + (source (origin
>> + (method git-fetch)
>> + (uri (git-reference
>> + (url "https://go.googlesource.com/crypto")
>> + (commit commit)))
>> + (file-name (string-append "go.googlesource.com-crypto-"
>> + version "-checkout"))
>
> And here, (git-file-name name version)?

Sure, those sound like useful helpers.
-----BEGIN PGP SIGNATURE-----

iQKTBAEBCgB9FiEEPonu50WOcg2XVOCyXiijOwuE9XcFAlpnkA5fFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF
ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcACgkQXiijOwuE
9XcfRBAAnKWY3t70tzTDxPqAQ/01WMQ/SULgsc1BOo33lpWCOOMve8vcKesXxyva
nPHlB6hqzN/0GvH5ZWEVAXrEQzbSumMFFTFCVB93wrfwstVxGwgwQFDs91oqapva
VXAKcgfir2jQ34YMHqyskW44TSpciAsbejFEr0eiZGezOCg5VLjZZVE/pzM+tblB
shSMRrddJwLHDeSJpnl4dK/uzA6mRgjTjDWbZp7JljEVmKUgRb3NUOHt0cPbipNS
+ptgOk0fd85c/5aaANfqyptvccAhKyePciOWSRcoiroiExsyS0YTs6MxmEGgIyzs
Bv6Ym3mxEegs8bbD4f3i0vyqqWBDt+sei2jw+yCvPjwuEfepingfdgDy2aD/uEqE
NmjbTJz7NmdvEvtKLtjkuhXkCFt0UbpbhOtZg2oq7Td+pMZwBr+6H7V3eO89YdyQ
avBQX4XrYpT9e6yObC02Elzey6KLBMtLeY6GGn8tj9PlDiRk9fYDSnEYwXD1ct4E
6/P2VBRm7/Zk29B4KBa57bpDeNQ46baCdf4ejzgjRXkccp3XWYpL9zS6BUyuQL4u
D3uu/XHGtLYV5/6sbtB2n4kMsFQkPeAXyBsnWE2X9lju9nVYGfbVQj2NgPb8kcA1
s8E7y2Rtp9sEF5o+2J1OnnkPQoEgdGrMRbCaYudLHAiBMBINII8=
=N9v8
-----END PGP SIGNATURE-----

C
C
Christopher Baines wrote on 23 Jan 2018 20:45
Re: [bug#30214] [PATCH 02/10] gnu: Add go-github.com-howeyc-gopass.
(name . Leo Famulari)(address . leo@famulari.name)(address . 30214@debbugs.gnu.org)
87wp085ph3.fsf@cbaines.net
Leo Famulari <leo@famulari.name> writes:

Toggle quote (10 lines)
> On Mon, Jan 22, 2018 at 09:08:22PM +0000, Christopher Baines wrote:
>> * gnu/packages/terminals.scm (go-github.com-howeyc-gopass): New variable.
>
>> + (native-inputs
>> + `(("go-golang.org-x-crypto-ssh-terminal"
>> + ,go-golang.org-x-crypto-ssh-terminal)))
>
> Is it really just a native-input? Or could it need this library later,
> at run-time?

Well, the package doesn't build without it, and as far as I can tell the
store output doesn't reference it. I believe that
go-golang.org-x-crypto-ssh-terminal is a dependency of
go-github.com-howeyc-gopass, so if you're using
go-github.com-howeyc-gopass, then you'll need
go-golang.org-x-crypto-ssh-terminal. Maybe it should be a propagated
input instead?
-----BEGIN PGP SIGNATURE-----

iQKTBAEBCgB9FiEEPonu50WOcg2XVOCyXiijOwuE9XcFAlpnkMhfFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF
ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcACgkQXiijOwuE
9XcsDhAAg+51p9+XTPYyFUQdIN6dPHRVz52Wxx9kyXvhblJd0ec1qbhC+5auKDwE
M+N5U+riXw3BvvhcSv3L6F4H3y5j3JBct1XRbAW5Bd7gRZPricH6PM6ubk88WlJo
DVHoeC0vrx7EaQseXGHpnL4FG3OLky0y5PgdKXol5mMAriZjTAEZNmFfKcMtEnP1
qDbjyCJMpKUvPtjVwkLlsQjVqtQsZoIgYcHDg9PmVOJ0sHDxBp6Q3R+HMPmBNBcq
yHSVBJgSiGGQdJF0/QB54rSyFOekWKxyOSPlYUsf4v3aHSYVMdczYvxrYZIfnINJ
G2+DQYOMFplmLpjDbo6K3lLnE1QZtHcXqsDKFM5/olpuH51B3QsUsvNKpm0NILcq
nTV0yXOCtJT4/DqWicMxGJa9TTJpTQtnnEz8rYgMSH66Gba0v3iqKaLoWAi6lYB4
UhccFJKUpOXT04ZDuBsq/KML4CzVYlV0tepJxiQjKpzN3uw9uomTh0bOoq924tVv
UP7xl0irGX9MPH8Ctr3CLDqi/6vLX5q3sUnytnN+HQM5P+LihKM9NRm1SEzCyFMh
mEZyBd3Ouu675AGqGkmNKxdYo88CQ3D+QwUTfTPSof+VZHnK67GX55XJDq8f6kze
dOs3AT8dmXmD+0JyOahFzyqD4uGDme7isJVFpPvsbBrIjRZ5b/U=
=TMaC
-----END PGP SIGNATURE-----

C
C
Christopher Baines wrote on 23 Jan 2018 20:51
Re: [bug#30214] [PATCH 03/10] gnu: Add go-github.com-jessevdk-go-flags.
(name . Leo Famulari)(address . leo@famulari.name)(address . 30214@debbugs.gnu.org)
87vafs5p79.fsf@cbaines.net
Leo Famulari <leo@famulari.name> writes:

Toggle quote (18 lines)
> On Mon, Jan 22, 2018 at 09:08:23PM +0000, Christopher Baines wrote:
>> * gnu/packages/golang.scm (go-github.com-jessevdk-go-flags): New variable.
>
>> + (add-after 'unpack 'rename-archive
>> + (lambda _
>> + (rename-file
>> + ,(string-append "src/github.com/jessevdk/go-flags-" version)
>> + "src/github.com/jessevdk/go-flags")
>> + #t)))))
>
> I notice a few of these changes in your patch series. Can you give some
> detail about what's going on?
>
> If someone were developing with this library in the typical Go way,
> outside of Guix, would they have a problem here?
>
> Should the go-build-system try to handle this automatically?

I believe this might be connected with what is in the source
tarball. Without this stage, the go-flags directory is called
go-flags-1.3.0, and this causes the build to fail [2].

I'm not sure about the wider context, but it would be good to handle
this automatically.

1:
→ ls /tmp/guix-build-go-github.com-jessevdk-go-flags-1.3.0.drv-0/src/github.com/jessevdk/
go-flags-1.3.0

2:
starting phase `build'
can't load package: package github.com/jessevdk/go-flags: cannot find package "github.com/jessevdk/go-flags" in any of:
/gnu/store/9xvc0ml2dfgb58vlbc4sl6mv360jyh84-go-1.9.2/src/github.com/jessevdk/go-flags (from $GOROOT)
/tmp/guix-build-go-github.com-jessevdk-go-flags-1.3.0.drv-0/src/github.com/jessevdk/go-flags (from $GOPATH)
Building 'github.com/jessevdk/go-flags' failed.
-----BEGIN PGP SIGNATURE-----

iQKTBAEBCgB9FiEEPonu50WOcg2XVOCyXiijOwuE9XcFAlpnkipfFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF
ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcACgkQXiijOwuE
9Xcg8Q/7BCbhwxFD4amXTmnb9+mwilQQaHxGNe3phwt4lgLM5P4BFcGvE5j/5KWi
2MU7zrYSOE/e6scdnQ92rfaG9Krrisaqbd3c10RbKfg+wfs++5QAB9CbrtDK+AhZ
SAidb1AOULJ3cpAgvQ+QCrlt6xpSB2xdgaeo2LmJglIDPSIBVMvib7vMiWT2JEJz
lC+tAAGl1zSCxpW7kNaHIwzr7xtx9cmtiXoP8VFqoSw8t48ovdcsevcJhTdOxufz
OQ64wOplgvsNDaGVpBdON9cWOBGxgWCVBMYzr6i5GApMoz+5AaLAY3MimVrkcPpw
yCS7HwXdTAU6vgS0sTRpAlqPq94IIiHj3n09TPPVog50nQH+zyaiXbSGSlmgaFBf
qA3Ps6S5Eu/T60reecUZAYAFPD0ZbtfQXLYvgjJ8hQp+CLDB27oRAxtoQGOfvTRz
volpHou3lovVwDpyadlwOsC9W3ciwZKxCc3bPoRfSWTj57tZ9rKwrXqYL9UK4zlp
BwdjCyL++Kcz7rewVLkLT9DReU4s1ihAatcnkP0rY2ySSug5FBuTSreD3Ir76Sdx
pHfl4wWeE65DlCp6TZZSvtC690IUQ6+kLmGA/hLu1bCTnWAeY2fuVloxGsjdIFWk
lTQ72Afrf1ZIH22iFFbxB8/RtGfLExss0hjf91FCln3i/2QJmEY=
=0CWx
-----END PGP SIGNATURE-----

C
C
Christopher Baines wrote on 23 Jan 2018 20:54
Re: [bug#30214] [PATCH 05/10] gnu: Add daemontools.
(name . Leo Famulari)(address . leo@famulari.name)(address . 30214@debbugs.gnu.org)
87tvvc5p1s.fsf@cbaines.net
Leo Famulari <leo@famulari.name> writes:

Toggle quote (20 lines)
> On Mon, Jan 22, 2018 at 09:08:25PM +0000, Christopher Baines wrote:
>> * gnu/packages/admin.scm (daemontools): New variable.
>
> Cool!
>
>> + (name "daemontools")
>> + (version "0.76")
>> + (source (origin
>> + (method url-fetch)
>> + (uri (string-append
>> + "https://cr.yp.to/" name "/"
>> + name "-" version ".tar.gz"))
>
> Can you check if there are any important patches (security or other bug
> fixes) floating around? This release is 16 years young...
>
> For example, you might look at Debian's diff.gz:
>
> https://packages.debian.org/stretch/daemontools

It looks like Debian has 3 patches for this [1]. I used one of them in
the form of substitute* to get the package to build. I can include all
the patches if that is helpful, but I was actually hesitant to send this
patch at all.

I packaged it when trying to get the test suite for go-gopkg.in-mgo.v2
to pass as it uses utilities from daemontools, but I got stuck getting
mongodb to start. I left all of the stuff I did around the tests in
place, but just disabled them.

-----BEGIN PGP SIGNATURE-----

iQKTBAEBCgB9FiEEPonu50WOcg2XVOCyXiijOwuE9XcFAlpnku9fFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF
ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcACgkQXiijOwuE
9XfgxQ/+LwM4hsDumW6hQ0MQyLrCPEbzkfOHs9C09EuWv0QNzx5zeLfMrLPKI2OT
1DejQBgt2VHdGf+qJkzEFwFongXStHPG766TtvIfoLul0lHX8kymFgxnpsoh9LKs
aooGxKltfKUyKF2qsxzr9pXG586uU1YZcpdu/qRRsnAzCxGBqeTqdFcjNlE1WxpR
qbME1PLLneg/ogfbdWg/O2hjiDEU83zfNw4amvbi6U6jKFtmFtuRapCCo46eItAp
V9V6hgAjruqo2eDxdx6rQZ6SdU65bkjb5NeTCPHBPS4jNZDGvANQtTfUZzyKU8FK
tWKySBQ8ICzyZjMPBmXNbKDiFII4/i4NirUIUVBxKfRmePl8Dzi9NsfxdAEglh/m
gOdt7JX1NEzqSD8KUCrHQ3DZF3to812tpv8MkumOojEUmfLQYBt8TObYRcM9qsjz
Yu9xggFzRcTX/EJTsen/u2PaXrNNwaBwe2cAqGyQkAZ2CtBSAsPLeRiRTPVxhtKR
rZ+G9O15BSKnQVd1W8ncKKQzorB96Q7t0/O6j75yOJXJcKJylsaQCb9VbPCD/1Yy
bVvahrmtRLS+NkkK2j0T/j1uZrtNM26EiY8Rkp2cW6D3SOP1tR4Bm7Hiwg3DMBLB
IBjyd+SBpMgRjWIi07EV5rXgqL+knNzZ8Ff5xI5HuJtieYmOXq0=
=l57U
-----END PGP SIGNATURE-----

C
C
Christopher Baines wrote on 23 Jan 2018 20:59
Re: [bug#30214] [PATCH 10/10] gnu: Add mongo-tools.
(name . Leo Famulari)(address . leo@famulari.name)(address . 30214@debbugs.gnu.org)
87shaw5osm.fsf@cbaines.net
Leo Famulari <leo@famulari.name> writes:

Toggle quote (9 lines)
> On Mon, Jan 22, 2018 at 09:08:30PM +0000, Christopher Baines wrote:
>> * gnu/packages/databases.scm (mongo-tools): New variable.
>
> Can you add some comments explaining the following section?
>
>> + (replace 'build
>> + (lambda* (#:key inputs outputs #:allow-other-keys)
>> + (let ((bash (which "bash"))

bash here is unused, I forget where it came from. I'll remove it.

Toggle quote (16 lines)
>> + (out (assoc-ref outputs "out")))
>> + (let build ((tools
>> + '("bsondump" "mongodump" "mongoexport" "mongofiles"
>> + "mongoimport" "mongooplog" "mongorestore"
>> + "mongostat" "mongotop")))
>> + (if (null? tools)
>> + #t
>> + (if (let* ((tool (car tools))
>> + (command
>> + `("go" "install" "-v"
>> + "-tags=\"ssl sasl\""
>> + "-ldflags"
>
> This -ldflags argument avoids the go-build-system's default ldflags,
> which strip the debugging symbols. Okay if that's what you intended.

The build phase is a bit of guesswork from me, plus some prior art in
the mongo-tools README [1] and the Debian package rules file [2]. I
think I got the -ldflags from the latter. It sounds like stripping debug
symbols is a good default behaviour, but I'm only guessing as to what
this means.


Toggle quote (13 lines)
>> + "-extldflags=-Wl,-z,now,-z,relro"
>> + ,(string-append
>> + "src/github.com/mongodb/mongo-tools/"
>> + tool "/main/" tool ".go"))))
>> + (simple-format #t "build: running ~A\n"
>> + (string-join command))
>> + (zero? (apply system* command)))
>> + (build (cdr tools))
>> + #f)))))))))
>
> Do you think the go-build-system should accept some sort of #:make-flags
> argument to simplify this sort of thing?

Maybe, but I'm not sure of how many other packages will be similar to
mongo-tools.
-----BEGIN PGP SIGNATURE-----

iQKTBAEBCgB9FiEEPonu50WOcg2XVOCyXiijOwuE9XcFAlpnlDlfFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF
ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcACgkQXiijOwuE
9Xff4A//anmYEbgXftWSZ0zAmtQ83xyJSHYQNjVaNi0HW3Os69PR6J010+tbRJ7l
DrrtN8osjA10hRc03CEqhto7C4LDKJJjcqVVuBLnwUXcPyIiP/9ADr/9dtOrTqaK
FyDyEUBkkGwmKG29JCK2fAk0oaKw8w1eEHEykMQOJp5mLl3ORv2jHlhQqz77ITjq
UMVke5y15xOW7wojFg46KcaYzea0JTBOIIxepJfrL0VweVkzEkStCYnrag1rXU7Q
vFVOGuWFhqxYZ6taJ1m7PF6q1NqBAp6H/QXWvtpIYamDLyFZvxQNsc0SGIy2I01C
Qk6kjkunGcPSdmYaJuTh2Ktt70qRIPeRHCbnkBoCCLWxW053Gr/NZ28Ba2OnSTNi
Jn5sIdE5y+BL1DceN2nhO9nQlucVdC6JBMQSPGzU0KRi2FLAXn361HVeZhKdXjh1
qIb3ry7OdfXBSCTrtH3KWo9m7LsdDPJPrxtbhRwf7hmY+38+Mg0W0g4E37mreIjO
4ZCy8gmIj6SnnfvTQ2juJGLM5BTEHRPgADMMIIroBj87qE6NCYGeiaZPJVJwJSNc
jAtVUBdzSPqetCDiOFmHImMLF3rdvjtrURPNpCJ8iOD5Gt0uGfVUqEn3JZgwv1u5
TfuUbk0521ZyEZgaXRAE8efyEYO7Rowgfggpg/CKwpayGhn6Zro=
=2Ks5
-----END PGP SIGNATURE-----

C
C
Christopher Baines wrote on 23 Jan 2018 21:21
[PATCH 02/10] gnu: Add go-github.com-howeyc-gopass.
(address . 30214@debbugs.gnu.org)
20180123202202.32140-2-mail@cbaines.net
* gnu/packages/terminals.scm (go-github.com-howeyc-gopass): New variable.
---
gnu/packages/terminals.scm | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)

Toggle diff (38 lines)
diff --git a/gnu/packages/terminals.scm b/gnu/packages/terminals.scm
index 3baaf6612..687cfc3f4 100644
--- a/gnu/packages/terminals.scm
+++ b/gnu/packages/terminals.scm
@@ -609,3 +609,31 @@ desktop installed to have a decent terminal emulator.")
with terminals in Go.")
(home-page "https://go.googlesource.com/crypto/")
(license license:bsd-3))))
+
+(define-public go-github.com-howeyc-gopass
+ (let ((commit "bf9dde6d0d2c004a008c27aaee91170c786f6db8")
+ (revision "0"))
+ (package
+ (name "go-github.com-howeyc-gopass")
+ (version (git-version "0.0.0" revision commit))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/howeyc/gopass.git")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1jxzyfnqi0h1fzlsvlkn10bncic803bfhslyijcxk55mgh297g45"))))
+ (build-system go-build-system)
+ (arguments
+ '(#:import-path "github.com/howeyc/gopass"))
+ (native-inputs
+ `(("go-golang.org-x-crypto-ssh-terminal"
+ ,go-golang.org-x-crypto-ssh-terminal)))
+ (synopsis "Retrieve password from a terminal or piped input in Go")
+ (description
+ "@code{gopass} is a Go package for retrieving a password from user
+terminal or piped input.")
+ (home-page "https://github.com/howeyc/gopass")
+ (license license:isc))))
--
2.16.0
C
C
Christopher Baines wrote on 23 Jan 2018 21:21
[PATCH 01/10] gnu: Add go-golang.org-x-crypto-ssh-terminal.
(address . 30214@debbugs.gnu.org)
20180123202202.32140-1-mail@cbaines.net
* gnu/packages/terminals.scm (go-golang.org-x-crypto-ssh-terminal): New
variable.
---
gnu/packages/terminals.scm | 37 +++++++++++++++++++++++++++++++++++++
1 file changed, 37 insertions(+)

Toggle diff (54 lines)
diff --git a/gnu/packages/terminals.scm b/gnu/packages/terminals.scm
index 68507cf64..3baaf6612 100644
--- a/gnu/packages/terminals.scm
+++ b/gnu/packages/terminals.scm
@@ -31,6 +31,7 @@
#:use-module (guix build-system cmake)
#:use-module (guix build-system gnu)
#:use-module (guix build-system glib-or-gtk)
+ #:use-module (guix build-system go)
#:use-module (guix build-system python)
#:use-module (guix download)
#:use-module (guix git-download)
@@ -572,3 +573,39 @@ eye-candy, customizable, and reasonably lightweight.")
It's a terminal emulator with few dependencies, so you don't need a full GNOME
desktop installed to have a decent terminal emulator.")
(license license:gpl2)))
+
+(define-public go-golang.org-x-crypto-ssh-terminal
+ (let ((commit "c78caca803c95773f48a844d3dcab04b9bc4d6dd")
+ (revision "0"))
+ (package
+ (name "go-golang.org-x-crypto-ssh-terminal")
+ (version (git-version "0.0.0" revision commit))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://go.googlesource.com/crypto")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0vxlfxr9y681yn2cfh6dbqmq35vvq4f45ay0mm31ffkny9cms0y4"))))
+ (build-system go-build-system)
+ (arguments
+ '(#:import-path "golang.org/x/crypto/ssh/terminal"
+ #:unpack-path "golang.org/x/crypto"
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'reset-gzip-timestamps 'make-gzip-archive-writable
+ (lambda* (#:key outputs #:allow-other-keys)
+ (map (lambda (file)
+ (make-file-writable file))
+ (find-files
+ (string-append (assoc-ref outputs "out")
+ "/src/golang.org/x/crypto/ed25519/testdata")
+ ".*\\.gz$"))
+ #t)))))
+ (synopsis "Support functions for dealing with terminals in Go")
+ (description "@code{terminal} provides support functions for dealing
+with terminals in Go.")
+ (home-page "https://go.googlesource.com/crypto/")
+ (license license:bsd-3))))
--
2.16.0
C
C
Christopher Baines wrote on 23 Jan 2018 21:21
[PATCH 03/10] gnu: Add go-github.com-jessevdk-go-flags.
(address . 30214@debbugs.gnu.org)
20180123202202.32140-3-mail@cbaines.net
* gnu/packages/golang.scm (go-github.com-jessevdk-go-flags): New variable.
---
gnu/packages/golang.scm | 34 ++++++++++++++++++++++++++++++++++
1 file changed, 34 insertions(+)

Toggle diff (44 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 202183ff2..f972e5058 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -446,3 +446,37 @@ interfaces in Go. The goal is to enable developers to write fast and
distributable command line applications in an expressive way.")
(home-page "https://github.com/davidjpeacock/cli")
(license license:expat))))
+
+(define-public go-github.com-jessevdk-go-flags
+ (package
+ (name "go-github.com-jessevdk-go-flags")
+ (version "1.3.0")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://github.com/jessevdk/go-flags/archive/v"
+ version ".tar.gz"))
+ (file-name (string-append name "-" version ".tar.gz"))))
+ (sha256
+ (base32
+ "0dmvsxsq2s6jx17c8snpw8b2hixy5m03wp8qwvsjsjzavd5gkyg0"))))
+ (build-system go-build-system)
+ (arguments
+ `(#:unpack-path "github.com/jessevdk"
+ #:import-path "github.com/jessevdk/go-flags"
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'rename-archive
+ (lambda _
+ (rename-file
+ ,(string-append "src/github.com/jessevdk/go-flags-" version)
+ "src/github.com/jessevdk/go-flags")
+ #t)))))
+ (synopsis "Go library for parsing command line arguments")
+ (description
+ "The @code{flags} package provides a command line option parser. The
+functionality is similar to the go builtin @code{flag} package, but
+@code{flags} provides more options and uses reflection to provide a succinct
+way of specifying command line options.")
+ (home-page "https://github.com/jessevdk/go-flags")
+ (license license:bsd-3)))
--
2.16.0
C
C
Christopher Baines wrote on 23 Jan 2018 21:21
[PATCH 05/10] gnu: Add daemontools.
(address . 30214@debbugs.gnu.org)
20180123202202.32140-5-mail@cbaines.net
* gnu/packages/admin.scm (daemontools): New variable.
---
gnu/packages/admin.scm | 43 +++++++++++++++++++++++++++++++++++++++++++
1 file changed, 43 insertions(+)

Toggle diff (56 lines)
diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm
index 3d3c62619..7c7c457f5 100644
--- a/gnu/packages/admin.scm
+++ b/gnu/packages/admin.scm
@@ -187,6 +187,49 @@ interface and is based on GNU Guile.")
(home-page "https://www.gnu.org/software/shepherd/")
(properties '((ftp-server . "alpha.gnu.org")))))
+(define-public daemontools
+ (package
+ (name "daemontools")
+ (version "0.76")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://cr.yp.to/" name "/"
+ name "-" version ".tar.gz"))
+ (sha256
+ (base32
+ "07scvw88faxkscxi91031pjkpccql6wspk4yrlnsbrrb5c0kamd5"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:tests? #f ;; No tests as far as I can tell.
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'chdir
+ (lambda _
+ (chdir ,(string-append name "-" version))))
+ (delete 'configure)
+ (add-before 'build 'patch
+ (lambda _
+ (substitute* "src/error.h"
+ (("extern int errno;")
+ "#include <errno.h>"))))
+ (replace 'build
+ (lambda _
+ (invoke "package/compile")))
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (bin (string-append out "/bin")))
+ (for-each (lambda (file)
+ (install-file file bin))
+ (find-files "command"))))))))
+ (synopsis "Tools for managing UNIX style services")
+ (description
+ "@code{daemontools} is a collection of tools for managing UNIX
+services.")
+ (license license:public-domain)
+ (home-page "https://cr.yp.to/daemontools.html")))
+
(define-public dfc
(package
(name "dfc")
--
2.16.0
C
C
Christopher Baines wrote on 23 Jan 2018 21:21
[PATCH 07/10] gnu: Add go-gopkg.in-tomb.v2.
(address . 30214@debbugs.gnu.org)
20180123202202.32140-7-mail@cbaines.net
* gnu/packages/golang.scm (go-gopkg.in-tomb.v2): New variable.
---
gnu/packages/golang.scm | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)

Toggle diff (35 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index f972e5058..93d414625 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -480,3 +480,28 @@ functionality is similar to the go builtin @code{flag} package, but
way of specifying command line options.")
(home-page "https://github.com/jessevdk/go-flags")
(license license:bsd-3)))
+
+(define-public go-gopkg.in-tomb.v2
+ (let ((commit "d5d1b5820637886def9eef33e03a27a9f166942c")
+ (revision "0"))
+ (package
+ (name "go-gopkg.in-tomb.v2")
+ (version (string-append "0.0.0-" revision "." (string-take commit 7)))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/go-tomb/tomb.git")
+ (commit commit)))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32
+ "1sv15sri99szkdz1bkh0ir46w9n8prrwx5hfai13nrhkawfyfy10"))))
+ (build-system go-build-system)
+ (arguments
+ '(#:import-path "gopkg.in/tomb.v2"))
+ (synopsis "@code{tomb} handles clean goroutine tracking and termination")
+ (description
+ "The @code{tomb} package handles clean goroutine tracking and
+termination.")
+ (home-page "https://gopkg.in/tomb.v2")
+ (license license:bsd-3))))
--
2.16.0
C
C
Christopher Baines wrote on 23 Jan 2018 21:22
[PATCH 09/10] gnu: Add go-github.com-nsf-termbox-go.
(address . 30214@debbugs.gnu.org)
20180123202202.32140-9-mail@cbaines.net
* gnu/packages/terminals.scm (go-github.com-nsf-termbox-go): New variable.
---
gnu/packages/terminals.scm | 30 ++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)

Toggle diff (50 lines)
diff --git a/gnu/packages/terminals.scm b/gnu/packages/terminals.scm
index 687cfc3f4..ca84cdf6a 100644
--- a/gnu/packages/terminals.scm
+++ b/gnu/packages/terminals.scm
@@ -53,6 +53,7 @@
#:use-module (gnu packages python)
#:use-module (gnu packages python-web)
#:use-module (gnu packages qt)
+ #:use-module (gnu packages textutils)
#:use-module (gnu packages wm)
#:use-module (gnu packages xdisorg)
#:use-module (gnu packages xml)
@@ -574,6 +575,35 @@ It's a terminal emulator with few dependencies, so you don't need a full GNOME
desktop installed to have a decent terminal emulator.")
(license license:gpl2)))
+(define-public go-github.com-nsf-termbox-go
+ (let ((commit "4ed959e0540971545eddb8c75514973d670cf739")
+ (revision "0"))
+ (package
+ (name "go-github.com-nsf-termbox-go")
+ (version (git-version "0.0.0" revision commit))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/nsf/termbox-go.git")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1vx64i1mg660if3wwm81p4b7lzxfb3qbr39i7misdyld3fc486p9"))))
+ (build-system go-build-system)
+ (arguments
+ '(#:import-path "github.com/nsf/termbox-go"))
+ (propagated-inputs
+ `(("go-github.com-mattn-go-runewidth"
+ ,go-github.com-mattn-go-runewidth)))
+ (synopsis "@code{termbox} provides a minimal API for text-based user
+interfaces")
+ (description
+ "Termbox is a library that provides a minimalistic API which allows the
+programmer to write text-based user interfaces.")
+ (home-page "https://github.com/nsf/termbox-go")
+ (license license:expat))))
+
(define-public go-golang.org-x-crypto-ssh-terminal
(let ((commit "c78caca803c95773f48a844d3dcab04b9bc4d6dd")
(revision "0"))
--
2.16.0
C
C
Christopher Baines wrote on 23 Jan 2018 21:22
[PATCH 10/10] gnu: Add mongo-tools.
(address . 30214@debbugs.gnu.org)
20180123202202.32140-10-mail@cbaines.net
* gnu/packages/databases.scm (mongo-tools): New variable.
---
gnu/packages/databases.scm | 93 ++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 93 insertions(+)

Toggle diff (117 lines)
diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm
index bc22fed37..fd25d204d 100644
--- a/gnu/packages/databases.scm
+++ b/gnu/packages/databases.scm
@@ -68,6 +68,7 @@
#:use-module (gnu packages gnupg)
#:use-module (gnu packages guile)
#:use-module (gnu packages time)
+ #:use-module (gnu packages golang)
#:use-module (gnu packages jemalloc)
#:use-module (gnu packages language)
#:use-module (gnu packages libevent)
@@ -87,6 +88,8 @@
#:use-module (gnu packages serialization)
#:use-module (gnu packages statistics)
#:use-module (gnu packages tcl)
+ #:use-module (gnu packages terminals)
+ #:use-module (gnu packages textutils)
#:use-module (gnu packages tls)
#:use-module (gnu packages valgrind)
#:use-module (gnu packages xml)
@@ -2607,3 +2610,93 @@ transforms idiomatic python function calls to well-formed SQL queries.")
(define-public python2-sql
(package-with-python2 python-sql))
+
+(define-public mongo-tools
+ (package
+ (name "mongo-tools")
+ (version "3.4.0")
+ (source
+ (origin (method url-fetch)
+ (uri (string-append "https://github.com/mongodb/mongo-tools"
+ "/archive/r" version ".tar.gz"))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32
+ "095nc57k4m4iyim0x3fgpw681qba123iyl4qz7xysbv5ngbr19mc"))))
+ (build-system go-build-system)
+ (arguments
+ `(#:tests? #f
+ #:unpack-path "github.com/mongodb"
+ #:import-path "github.com/mongodb/mongo-tools"
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'rename-archive
+ (lambda _
+ (rename-file
+ ,(string-append "src/github.com/mongodb/mongo-tools-r" version)
+ "src/github.com/mongodb/mongo-tools")
+ #t))
+
+ (add-after 'rename-archive 'delete-bundled-source-code
+ (lambda _
+ (delete-file-recursively
+ "src/github.com/mongodb/mongo-tools/vendor")
+ #t))
+
+ ;; We don't need to install the source code for end-user application
+ (delete 'install-source)
+
+ (replace 'build
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let build ((tools
+ '("bsondump" "mongodump" "mongoexport" "mongofiles"
+ "mongoimport" "mongooplog" "mongorestore"
+ "mongostat" "mongotop")))
+ (if (null? tools)
+ #t
+ (if (let* ((tool (car tools))
+ (command
+ `("go" "install" "-v"
+ "-tags=\"ssl sasl\""
+ "-ldflags"
+ "-extldflags=-Wl,-z,now,-z,relro"
+ ,(string-append
+ "src/github.com/mongodb/mongo-tools/"
+ tool "/main/" tool ".go"))))
+ (simple-format #t "build: running ~A\n"
+ (string-join command))
+ (zero? (apply system* command)))
+ (build (cdr tools))
+ #f))))))))
+ (native-inputs
+ `(("go-github.com-howeyc-gopass" ,go-github.com-howeyc-gopass)
+ ("go-github.com-jessevdk-go-flags" ,go-github.com-jessevdk-go-flags)
+ ("go-golang.org-x-crypto-ssh-terminal" ,go-golang.org-x-crypto-ssh-terminal)
+ ("go-gopkg.in-mgo.v2" ,go-gopkg.in-mgo.v2)
+ ("go-gopkg.in-tomb.v2" ,go-gopkg.in-tomb.v2)
+ ("go-github.com-nsf-termbox-go" ,go-github.com-nsf-termbox-go)))
+ (home-page "https://github.com/mongodb/mongo-tools")
+ (synopsis "Various tools for interacting with MongoDB and BSON")
+ (description
+ "This package includes a collection of tools related to MongoDB.
+@table @code
+@item bsondump
+Display BSON files in a human-readable format
+@item mongoimport
+Convert data from JSON, TSV or CSV and insert them into a collection
+@item mongoexport
+Write an existing collection to CSV or JSON format
+@item mongodump/mongorestore
+Dump MongoDB backups to disk in the BSON format
+@item mongorestore
+Read MongoDB backups in the BSON format, and restore them to a live database
+@item mongostat
+Monitor live MongoDB servers, replica sets, or sharded clusters
+@item mongofiles
+Read, write, delete, or update files in GridFS
+@item mongooplog
+Replay oplog entries between MongoDB servers
+@item mongotop
+Monitor read/write activity on a mongo server
+@end table")
+ (license license:asl2.0)))
--
2.16.0
C
C
Christopher Baines wrote on 23 Jan 2018 21:21
[PATCH 04/10] gnu: Add go-gopkg.in-check.v1.
(address . 30214@debbugs.gnu.org)
20180123202202.32140-4-mail@cbaines.net
* gnu/packages/check.scm (go-gopkg.in-check.v1): New variable.
---
gnu/packages/check.scm | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)

Toggle diff (45 lines)
diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm
index 1585948b3..564b75f8d 100644
--- a/gnu/packages/check.scm
+++ b/gnu/packages/check.scm
@@ -59,6 +59,7 @@
#:use-module (guix git-download)
#:use-module (guix build-system cmake)
#:use-module (guix build-system gnu)
+ #:use-module (guix build-system go)
#:use-module (guix build-system python)
#:use-module (guix build-system trivial))
@@ -283,6 +284,30 @@ normally do not detect. The goal is to detect only real errors in the code
(i.e. have zero false positives).")
(license license:gpl3+)))
+(define-public go-gopkg.in-check.v1
+ (let ((commit "20d25e2804050c1cd24a7eea1e7a6447dd0e74ec")
+ (revision "0"))
+ (package
+ (name "go-gopkg.in-check.v1")
+ (version (git-version "0.0.0" revision commit))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/go-check/check.git")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0k1m83ji9l1a7ng8a7v40psbymxasmssbrrhpdv2wl4rhs0nc3np"))))
+ (build-system go-build-system)
+ (arguments
+ '(#:import-path "gopkg.in/check.v1"))
+ (synopsis "Rich testing extension for Go's testing package")
+ (description
+ "@code{check} is a rich testing extension for Go's testing package.")
+ (home-page "https://github.com/go-check/check")
+ (license license:bsd-2))))
+
(define-public googletest
(package
(name "googletest")
--
2.16.0
C
C
Christopher Baines wrote on 23 Jan 2018 21:22
[PATCH 08/10] gnu: Add go-github.com-mattn-go-runewidth.
(address . 30214@debbugs.gnu.org)
20180123202202.32140-8-mail@cbaines.net
* gnu/packages/textutils.scm (go-github.com-mattn-go-runewidth): New variable.
---
gnu/packages/textutils.scm | 33 +++++++++++++++++++++++++++++++++
1 file changed, 33 insertions(+)

Toggle diff (50 lines)
diff --git a/gnu/packages/textutils.scm b/gnu/packages/textutils.scm
index 1f5fe6aba..2e7051ee2 100644
--- a/gnu/packages/textutils.scm
+++ b/gnu/packages/textutils.scm
@@ -37,6 +37,7 @@
#:use-module (guix git-download)
#:use-module (guix build-system ant)
#:use-module (guix build-system gnu)
+ #:use-module (guix build-system go)
#:use-module (guix build-system cmake)
#:use-module (guix build-system python)
#:use-module (gnu packages)
@@ -660,3 +661,35 @@ source code.")
"This library simply implements Levenshtein distance algorithm with C++
and Cython.")
(license license:expat))))
+
+(define-public go-github.com-mattn-go-runewidth
+ (package
+ (name "go-github.com-mattn-go-runewidth")
+ (version "0.0.2")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://github.com/mattn/go-runewidth/archive/v"
+ version ".tar.gz"))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32
+ "0xmhjpzdsy01apxl0s9kd0x7v3slahdg4njsygs9m0nz3x038xvc"))))
+ (build-system go-build-system)
+ (arguments
+ `(#:import-path "github.com/mattn/go-runewidth"
+ #:unpack-path "github.com/mattn"
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'rename-archive
+ (lambda _
+ (rename-file
+ ,(string-append "src/github.com/mattn/go-runewidth-" version)
+ "src/github.com/mattn/go-runewidth")
+ #t)))))
+ (synopsis "@code{runewidth} provides Go functions to work with string widths")
+ (description
+ "The @code{runewidth} library provides Go functions for padding,
+measuring and checking the width of strings, with support east asian text.")
+ (home-page "https://github.com/jessevdk/go-flags")
+ (license license:expat)))
--
2.16.0
C
C
Christopher Baines wrote on 23 Jan 2018 21:21
[PATCH 06/10] gnu: Add go-gopkg.in-mgo.v2.
(address . 30214@debbugs.gnu.org)
20180123202202.32140-6-mail@cbaines.net
* gnu/packages/databases.scm (go-gopkg.in-mgo.v2): New variable.
---
gnu/packages/databases.scm | 52 ++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 52 insertions(+)

Toggle diff (79 lines)
diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm
index c0cf41a5b..bc22fed37 100644
--- a/gnu/packages/databases.scm
+++ b/gnu/packages/databases.scm
@@ -49,6 +49,7 @@
(define-module (gnu packages databases)
#:use-module (gnu packages)
+ #:use-module (gnu packages admin)
#:use-module (gnu packages algebra)
#:use-module (gnu packages autotools)
#:use-module (gnu packages avahi)
@@ -94,6 +95,7 @@
#:use-module (guix download)
#:use-module (guix git-download)
#:use-module (guix build-system gnu)
+ #:use-module (guix build-system go)
#:use-module (guix build-system perl)
#:use-module (guix build-system python)
#:use-module (guix build-system ruby)
@@ -173,6 +175,56 @@ store key/value pairs in a file in a manner similar to the Unix dbm library
and provides interfaces to the traditional file format.")
(license license:gpl3+)))
+(define-public go-gopkg.in-mgo.v2
+ (package
+ (name "go-gopkg.in-mgo.v2")
+ (version "2016.08.01")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://github.com/go-mgo/mgo/archive/r"
+ version ".tar.gz"))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32
+ "09li3qc5c5idw4qldy0yzfh1vwac3hpslnq96g3s3mld9wwpnmg2"))))
+ (build-system go-build-system)
+ (arguments
+ `(#:import-path "gopkg.in/mgo.v2"
+ #:unpack-path "gopkg.in"
+ ;; TODO: Starting mongo for running the tests currently fails
+ ;; Error parsing command line: unrecognised option '--chunkSize'
+ #:tests? #f
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'rename-archive
+ (lambda _
+ (rename-file
+ ,(string-append "src/gopkg.in/mgo-r" version)
+ "src/gopkg.in/mgo.v2")
+ #t))
+ (add-before 'check 'start-mongodb
+ (lambda* (#:key tests? #:allow-other-keys)
+ (if tests?
+ (with-directory-excursion "src/gopkg.in/mgo.v2"
+ (invoke "make" "startdb")))))
+ (add-after 'check 'stop'mongodb
+ (lambda* (#:key tests? #:allow-other-keys)
+ (if tests?
+ (with-directory-excursion "src/gopkg.in/mgo.v2"
+ (invoke "make" "stopdb"))))))))
+ (native-inputs
+ `(("go-gopkg.in-check.v1" ,go-gopkg.in-check.v1)
+ ("mongodb" ,mongodb)
+ ("daemontools" ,daemontools)))
+ (synopsis "@code{mgo} offers a rich MongoDB driver for Go.")
+ (description
+ "@code{mgo} (pronounced as mango) is a MongoDB driver for the Go language.
+It implements a rich selection of features under a simple API following
+standard Go idioms.")
+ (home-page "http://labix.org/mgo")
+ (license license:bsd-2)))
+
(define-public bdb
(package
(name "bdb")
--
2.16.0
L
L
Leo Famulari wrote on 23 Jan 2018 21:29
Re: [bug#30214] [PATCH 03/10] gnu: Add go-github.com-jessevdk-go-flags.
(name . Christopher Baines)(address . mail@cbaines.net)(address . 30214@debbugs.gnu.org)
20180123202935.GD6750@jasmine.lan
On Tue, Jan 23, 2018 at 07:51:06PM +0000, Christopher Baines wrote:
Toggle quote (17 lines)
> Leo Famulari <leo@famulari.name> writes:
> > On Mon, Jan 22, 2018 at 09:08:23PM +0000, Christopher Baines wrote:
> >> * gnu/packages/golang.scm (go-github.com-jessevdk-go-flags): New variable.
> >
> >> + (add-after 'unpack 'rename-archive
> >> + (lambda _
> >> + (rename-file
> >> + ,(string-append "src/github.com/jessevdk/go-flags-" version)
> >> + "src/github.com/jessevdk/go-flags")
> >> + #t)))))
> >
> > Should the go-build-system try to handle this automatically?
>
> I believe this might be connected with what is in the source
> tarball. Without this stage, the go-flags directory is called
> go-flags-1.3.0, and this causes the build to fail [2].

Oh right, Go expects you to use Git checkouts instead of release
tarballs. I bet it works if you do that. That kind of tarball is
automatically created by GitHub per tag, and can't be disabled.

Toggle quote (3 lines)
> I'm not sure about the wider context, but it would be good to handle
> this automatically.

So, I think the build system doesn't need to handle this case.
-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEsFFZSPHn08G5gDigJkb6MLrKfwgFAlpnmy8ACgkQJkb6MLrK
fwghqw//eKnanz6JwqO3HeMAfeFVHJEJ/JAZQ99UxyOWoK68cKMahAjcKXooouga
BvckdIpfjWgvV+8FXoWhbpy4YQVjW1Hmn9a6bVbG9kaWZz8IitFwJ3bgNyFWJDvo
aSRVkQIjA3PyZ0Q2DnbyH7dwgwUrYTSTpaV/ey9TjWH0m4o/Cude1j5LqXmCr6QS
tyoWpXW1s1sLlO9EmOt2eVtk8bIqGB1ViSoZgr+Qb20FD2LHB7O4AfIEt5lsaCrV
RhgVvWdUbC66B2nBsjRW/xA4ZL0iQIglc7xD619/zqJi1MXT/qaw9mZOGrk8rLkm
+pNZcky0zS+HH2DHt+1utWXkmTv/l9yGkiAxDzB+/iH1FOz/xRI+vEUh5CnbV8ws
EhzY9Iwj0jmfthS3uOvt+0xU7HWDCwguhmITwCvThtbqxWOquxu5fadCrQyIli5+
zw9FxKgmf66gRuUi0TPbh8xS9uq47dQt7EXd4x9dm6gMTq+PIyhNVJrJhsarvkgY
r+d/n4HuqSyIu6caOQVzTCe19HUYb9tl42PxeAwa4acBE2d5clYlNdQKUl7VYWOM
IH1j00n0B3Qhu1/F1UXppZ5TJcMyxVYaOKVHhn1Dt4Msciesh2ZpS3d2atoGbj6c
7fy6w1WnAk/tb7EfyVN33b0OAlI5qGI1v54hJZ+LVwVk7BL5KIg=
=97i8
-----END PGP SIGNATURE-----


L
L
Leo Famulari wrote on 23 Jan 2018 21:30
Re: [bug#30214] [PATCH 05/10] gnu: Add daemontools.
(name . Christopher Baines)(address . mail@cbaines.net)(address . 30214@debbugs.gnu.org)
20180123203055.GE6750@jasmine.lan
On Tue, Jan 23, 2018 at 07:54:23PM +0000, Christopher Baines wrote:
Toggle quote (33 lines)
>
> Leo Famulari <leo@famulari.name> writes:
>
> > On Mon, Jan 22, 2018 at 09:08:25PM +0000, Christopher Baines wrote:
> >> * gnu/packages/admin.scm (daemontools): New variable.
> >
> > Cool!
> >
> >> + (name "daemontools")
> >> + (version "0.76")
> >> + (source (origin
> >> + (method url-fetch)
> >> + (uri (string-append
> >> + "https://cr.yp.to/" name "/"
> >> + name "-" version ".tar.gz"))
> >
> > Can you check if there are any important patches (security or other bug
> > fixes) floating around? This release is 16 years young...
> >
> > For example, you might look at Debian's diff.gz:
> >
> > https://packages.debian.org/stretch/daemontools
>
> It looks like Debian has 3 patches for this [1]. I used one of them in
> the form of substitute* to get the package to build. I can include all
> the patches if that is helpful, but I was actually hesitant to send this
> patch at all.
>
> I packaged it when trying to get the test suite for go-gopkg.in-mgo.v2
> to pass as it uses utilities from daemontools, but I got stuck getting
> mongodb to start. I left all of the stuff I did around the tests in
> place, but just disabled them.

Okay, it's up to you whether or not to add the daemontools package.
-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEsFFZSPHn08G5gDigJkb6MLrKfwgFAlpnm38ACgkQJkb6MLrK
fwhcrBAAtulJG2pRVLnOHTKKLiUvbBLriFjlSJxsJ60GGxA2n4CWY8XGBrmTv0Mn
71wSwXSu28zWTP5PurXmcY02hIITDriWt0ttRvpef0Z59Y3nitP4QPlNRlNtBFC+
zChr6V70NBM98+g9qyuHJcVHV7u/o5Pdv3kimNWQAu14xALex7HRUjDIEsCsRIf9
1MZUw+02VicxXHwlPulLQ7+CYbcspuh1XVZYRnita6pc1bRWEo+bUV/lDqHnEvyM
IKBN6uvK39LRoWuOMb9sQuCYhYqBRBGiQ633c1uCNTA8YaclWyzjK0OEc3A0DL8R
VGURJf7g7EcNbDDDBv1CPzOCTbvCnczbeBFWa16ONXLiBgmXjN3Vd392OyJzfM9R
DKoF0YRrDFZz9MtHWgUNW7blYgZsUMvAVolTGvu5A0mec+WbDKo3w8+reGpIA6xk
Gk3Mj0yb1jc75mFtBSeMmhd95SlBA1Y3ekONks7+OPwfkNuE+o+DJE5US/SO0p/M
s+/P8ZhzgzqCWsUnZweG7j4hbHhXi9AiL6LPnhk7NA5AzCqD5uxYXbwOOgw/7PDq
VzF9dj7eGYRhGOv7+AYJyx8jan3ILYCPdxiD7amxL7B/NIydt28GHn1QLmMaSD2P
x5VRC9/AFJTMyzQheRl7irFafFD8nzwJ5ZExvVjBClY12EWlWiw=
=qzbw
-----END PGP SIGNATURE-----


C
C
Christopher Baines wrote on 23 Jan 2018 21:34
Re: [bug#30214] [PATCH 03/10] gnu: Add go-github.com-jessevdk-go-flags.
(name . Leo Famulari)(address . leo@famulari.name)(address . 30214@debbugs.gnu.org)
87r2qg5n74.fsf@cbaines.net
Leo Famulari <leo@famulari.name> writes:

Toggle quote (27 lines)
> On Tue, Jan 23, 2018 at 07:51:06PM +0000, Christopher Baines wrote:
>> Leo Famulari <leo@famulari.name> writes:
>> > On Mon, Jan 22, 2018 at 09:08:23PM +0000, Christopher Baines wrote:
>> >> * gnu/packages/golang.scm (go-github.com-jessevdk-go-flags): New variable.
>> >
>> >> + (add-after 'unpack 'rename-archive
>> >> + (lambda _
>> >> + (rename-file
>> >> + ,(string-append "src/github.com/jessevdk/go-flags-" version)
>> >> + "src/github.com/jessevdk/go-flags")
>> >> + #t)))))
>> >
>> > Should the go-build-system try to handle this automatically?
>>
>> I believe this might be connected with what is in the source
>> tarball. Without this stage, the go-flags directory is called
>> go-flags-1.3.0, and this causes the build to fail [2].
>
> Oh right, Go expects you to use Git checkouts instead of release
> tarballs. I bet it works if you do that. That kind of tarball is
> automatically created by GitHub per tag, and can't be disabled.
>
>> I'm not sure about the wider context, but it would be good to handle
>> this automatically.
>
> So, I think the build system doesn't need to handle this case.

Ok, would it be more appropriate to use a git checkout, rather than a
tar archive for these packages then?
-----BEGIN PGP SIGNATURE-----

iQKTBAEBCgB9FiEEPonu50WOcg2XVOCyXiijOwuE9XcFAlpnnE9fFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF
ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcACgkQXiijOwuE
9XcOwQ//dNN50WRvgalU2hfVt1yCJWdbdZcQsSv75I1PyORkdHqGXE6dz8CeYevl
N7nMap4NMq1ML2V3UlgRGUxf7YPhuju1oqSPMn2/ai13byZKgMc+D5mzrvfchwmo
uuf30xTlsEujaE9dEjJu98w0FaABSjKZbmVe9R8oW3IhitvmNA2mPmffrmXhpdFB
XLCg1Fc1LkFgbRWta0tZkMnA1ma2pm6jdoDHg1iFndxKxrh/PyKkBZtdbJ9lkJT0
af7v9DW0RKg5GoUqEs1Y982CshIAnNJACsS8ZtNGgwMBfoDpi1GpOtW15y8L+vWq
/psgD1i0ilrm/0bB1d8HdBmQpjl5yJsmOFHDMYdgII099UKU/OS5VGPMy8kb5Mea
IMewzkMKjsN0yPIH5VNbelybAdpb5aOoVYF0FS1Jao8KKRKb6m4aGvW68o5Kg+4Q
5HFCn8/fPsj6IwvU3u/Cp2ayBDBLjPrdV7bDI7YVwZ9tcsrrd90ZkHJaN54f2ux4
D+NiWdAgGD7UlZul7aEwCI95uVjj8gkzUHjoaDDEFc81BqQqqZ5+LzpBeD4b4GR3
a0HO0uDoZjKf0sQ4+3zWW2oBEQ+pShU4BwKG6j6/jn4S4Ragybf2WZR77NcSuZIH
KsG0MWwsohqUqnc7GZJI3K1J2a6oG5rNucOtD+YAEvc/k36MJGM=
=ycQX
-----END PGP SIGNATURE-----

L
L
Leo Famulari wrote on 23 Jan 2018 21:44
Re: [bug#30214] [PATCH 10/10] gnu: Add mongo-tools.
(name . Christopher Baines)(address . mail@cbaines.net)(address . 30214@debbugs.gnu.org)
20180123204417.GF6750@jasmine.lan
On Tue, Jan 23, 2018 at 07:59:53PM +0000, Christopher Baines wrote:
Toggle quote (7 lines)
> Leo Famulari <leo@famulari.name> writes:
> > Do you think the go-build-system should accept some sort of #:make-flags
> > argument to simplify this sort of thing?
>
> Maybe, but I'm not sure of how many other packages will be similar to
> mongo-tools.

Okay, we'll reserve judgment for now :)
-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEsFFZSPHn08G5gDigJkb6MLrKfwgFAlpnnqEACgkQJkb6MLrK
fwjQhhAAybBz8FsFdp9trqbY0mASi1g+KEXHk259GQtJqvPs/VXUbzKozz/s5jNL
hMXFwBcNBLPT1F8GfkgVS6xpN7R2kVLm9BdtT7AszegILiCmf1pEK9XuvD5Kn6DH
r0HlkhdVRdRu0nEuTDWJG1qRjh1JJy1BL5TjII+zVpaCyy2sQVExbRKu0P14EdR0
ep6DuyQ8yCB9YknIsPSBYZRAE2aj2op4Eg5PQN9dr76X/wsqhbkkBNu3dq1PNcft
D0BVzNTbnTNau6UgGH2OtgGD+DNyjIzEaORqawlCEpygJ/w5B485anmLMT00McQE
7J96QJrVnrkPiEyQWhMb5bTnbe5oxhe8EtHl3YOdQETGLMIUyPhYoyXzJXIkfm5R
GID4YME3EyjPoWFPVtNwoMiaTJ/qfE7taKHanohBF9gUvous907GqCxLl1s2Oc2m
C22HCzmR/ZmoaMQ+mrH3AGEEiXUCSToskJrg1XVje3+CYEPtcEdzeNbdNBDWPIRY
ylqvJWTNmKDUllGS+iCmpMIMtm1Gh8PWEexpHOl5tdxi7AFMB3+KdJAG921yCruL
PmU1bDeyXCjLLhaK0H2B7Y0e6dEsYXJ7G6VM1WNZNZaYxJn5yXV8Mg5OjvbgLzbY
YKdFIVaXQWz3xmXyYk3rDKbSPFUZuwfwwjUh4/OXjpL0sx3YRDM=
=kf00
-----END PGP SIGNATURE-----


L
L
Leo Famulari wrote on 23 Jan 2018 21:44
Re: [bug#30214] [PATCH 03/10] gnu: Add go-github.com-jessevdk-go-flags.
(name . Christopher Baines)(address . mail@cbaines.net)(address . 30214@debbugs.gnu.org)
20180123204451.GG6750@jasmine.lan
On Tue, Jan 23, 2018 at 08:34:23PM +0000, Christopher Baines wrote:
Toggle quote (33 lines)
>
> Leo Famulari <leo@famulari.name> writes:
>
> > On Tue, Jan 23, 2018 at 07:51:06PM +0000, Christopher Baines wrote:
> >> Leo Famulari <leo@famulari.name> writes:
> >> > On Mon, Jan 22, 2018 at 09:08:23PM +0000, Christopher Baines wrote:
> >> >> * gnu/packages/golang.scm (go-github.com-jessevdk-go-flags): New variable.
> >> >
> >> >> + (add-after 'unpack 'rename-archive
> >> >> + (lambda _
> >> >> + (rename-file
> >> >> + ,(string-append "src/github.com/jessevdk/go-flags-" version)
> >> >> + "src/github.com/jessevdk/go-flags")
> >> >> + #t)))))
> >> >
> >> > Should the go-build-system try to handle this automatically?
> >>
> >> I believe this might be connected with what is in the source
> >> tarball. Without this stage, the go-flags directory is called
> >> go-flags-1.3.0, and this causes the build to fail [2].
> >
> > Oh right, Go expects you to use Git checkouts instead of release
> > tarballs. I bet it works if you do that. That kind of tarball is
> > automatically created by GitHub per tag, and can't be disabled.
> >
> >> I'm not sure about the wider context, but it would be good to handle
> >> this automatically.
> >
> > So, I think the build system doesn't need to handle this case.
>
> Ok, would it be more appropriate to use a git checkout, rather than a
> tar archive for these packages then?

Yeah, I bet you can avoid the rename-archive phases if you use a Git
checkout.
-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEsFFZSPHn08G5gDigJkb6MLrKfwgFAlpnnsMACgkQJkb6MLrK
fwhsEg/+L1nAqEtB8qKNuh3hvlS6gqWhMHSZJY9UbnL14PfwJKAEwRWub6SDFKyH
2wETipxkeByeafAuO2ARVp/kgQXZqF0jyYuta+Nvk9f9M4KoN0KlyCFNhpcCACSl
bDW4HvduWHI2Wi1qiJ8gfvIvWceczJVbH6hGrvz92E1mkgFNNMtCRU04Gj41NPzl
s63WQhBW7pR4HF+BaNMS6HzeD/QGKs5M8QE7+aztJiqffoNlK0fWFutxdn/9thLL
ehuH6FFyuKZhimDBlcMzJnSgzIg0VhpDboU6qAjWRfAyC9buqzQhuCd6u0UHoTUz
xkVQ1KoZPRhR+DDzs5YY779qe5j6P9cYqnCemltravYCA8ZeGfi0pt2XDcYCa8Dj
Dx6W+lQTsUG95RJd9DK3g7EtdwjRhKEOJwQboWJ2sDiWKqAt/vnl0QSpuhs7b7rm
SvZjwuFEL3ZfssHAo3nQjP2o4EfAwHKme0pTjIgUWY5n/nbSVAYvZdpwL//gD8LW
zimzyowMZ2T14zSsx0gYXPnUOLPIh8Ijvf2oqedZrvb5qm9+Gs4AAW+51Hnvo3Y3
eWtuOukex2alVsr6WsF+yDOEhckscmpacxJXqY05afWFI79D8wycZ27BBM8xWBTu
h5wAZuu+/HZQrppqNhQvGqQAvvzyWjOQ2igu7zEVeQkgPirzV2A=
=Zyyb
-----END PGP SIGNATURE-----


L
L
Leo Famulari wrote on 23 Jan 2018 21:51
Re: [bug#30214] [PATCH 02/10] gnu: Add go-github.com-howeyc-gopass.
(name . Christopher Baines)(address . mail@cbaines.net)(address . 30214@debbugs.gnu.org)
20180123205123.GH6750@jasmine.lan
On Tue, Jan 23, 2018 at 07:45:12PM +0000, Christopher Baines wrote:
Toggle quote (21 lines)
>
> Leo Famulari <leo@famulari.name> writes:
>
> > On Mon, Jan 22, 2018 at 09:08:22PM +0000, Christopher Baines wrote:
> >> * gnu/packages/terminals.scm (go-github.com-howeyc-gopass): New variable.
> >
> >> + (native-inputs
> >> + `(("go-golang.org-x-crypto-ssh-terminal"
> >> + ,go-golang.org-x-crypto-ssh-terminal)))
> >
> > Is it really just a native-input? Or could it need this library later,
> > at run-time?
>
> Well, the package doesn't build without it, and as far as I can tell the
> store output doesn't reference it. I believe that
> go-golang.org-x-crypto-ssh-terminal is a dependency of
> go-github.com-howeyc-gopass, so if you're using
> go-github.com-howeyc-gopass, then you'll need
> go-golang.org-x-crypto-ssh-terminal. Maybe it should be a propagated
> input instead?

Go looks for dependencies by first looking for their source code (this
is why the go-build-system installs the source code by default). Once it
finds the source code, then it looks up the compiled objects.

Finally, when building the end-user application (not just some library)
it links everything together in what's basically a static archive.

If everything seems to work even though x-crypto-ssh-terminal is a
native-input, then I bet that whatever is using howeyc-gopass does not
exercise the part of howeyc-gopass's code using x-crypto-ssh-terminal.

I think it's more correct here to propagate, unless
x-crypto-ssh-terminal is only used for howeyc-gopass's test suite or
something like that.
-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEsFFZSPHn08G5gDigJkb6MLrKfwgFAlpnoEsACgkQJkb6MLrK
fwj7Jw/8D00JmgM0HbT1K84dukxnHuB59cGkIkihz13HZ/NVzgkjOixgt3WFbKDP
BbCj/ELd4df6CrMrm5cA0nsBG5spGOEahIwM+7T/KpZXBjFDvhGeWWbLh6N53OTA
Ne3YT3FYNb8M/bE++FFjWFF4IUWRlNaShS3AaGd/sArPer5wxQkGkXwqgoPtv5hT
F1qtkcnH0zteJPGQXI4jbA0gJY/xYvxTomVXk4GmztgiQH8X8Ia0VDEfuNHcU8M4
WPnaNbRJuDvHD2lyizXPPAuYGz/sP/RkmGpTVhBugA6KQeA8kDwbPHhFMhcbFSRH
niR0auhabxPxJxWb2ZNOkyfB5RB0LKUsOuKDXL//XurJcX4wLYURaSItnZWSU2XX
dfUVUudGOTSp0YXi+ULDLzAn5dnHyPznKXFd3Z/wf5Hnv7uzQqnaPfbBtex8sH32
ngFdZk9c3nXVtckjW52xrdZBK+b2x5xebQDjY1KBjiLkEj2EuCd9DgCIZzQn1zpc
i4Ww8O50GRqJ4J0CBvsfpnpdVTG0huycKjnuhdGDseqR6bL2t0EYJrhTJuDyzjWk
TWHMT8GoCh0ke25+5mrTThwmJfCHUEUi2UA+F1pqqhz4q7lIMfwCvzsWiXG2/Hh/
GfkdV9t1EMT2u4FeOUjoTBzYHwrTjPbD7FhifXKhAJ2iraIA1Sg=
=pMM+
-----END PGP SIGNATURE-----


C
C
Christopher Baines wrote on 27 Jan 2018 16:00
[PATCH 01/10] gnu: Add go-golang.org-x-crypto-ssh-terminal.
(address . 30214@debbugs.gnu.org)
20180127150027.27150-1-mail@cbaines.net
* gnu/packages/terminals.scm (go-golang.org-x-crypto-ssh-terminal): New
variable.
---
gnu/packages/terminals.scm | 37 +++++++++++++++++++++++++++++++++++++
1 file changed, 37 insertions(+)

Toggle diff (54 lines)
diff --git a/gnu/packages/terminals.scm b/gnu/packages/terminals.scm
index 68507cf64..3baaf6612 100644
--- a/gnu/packages/terminals.scm
+++ b/gnu/packages/terminals.scm
@@ -31,6 +31,7 @@
#:use-module (guix build-system cmake)
#:use-module (guix build-system gnu)
#:use-module (guix build-system glib-or-gtk)
+ #:use-module (guix build-system go)
#:use-module (guix build-system python)
#:use-module (guix download)
#:use-module (guix git-download)
@@ -572,3 +573,39 @@ eye-candy, customizable, and reasonably lightweight.")
It's a terminal emulator with few dependencies, so you don't need a full GNOME
desktop installed to have a decent terminal emulator.")
(license license:gpl2)))
+
+(define-public go-golang.org-x-crypto-ssh-terminal
+ (let ((commit "c78caca803c95773f48a844d3dcab04b9bc4d6dd")
+ (revision "0"))
+ (package
+ (name "go-golang.org-x-crypto-ssh-terminal")
+ (version (git-version "0.0.0" revision commit))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://go.googlesource.com/crypto")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0vxlfxr9y681yn2cfh6dbqmq35vvq4f45ay0mm31ffkny9cms0y4"))))
+ (build-system go-build-system)
+ (arguments
+ '(#:import-path "golang.org/x/crypto/ssh/terminal"
+ #:unpack-path "golang.org/x/crypto"
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'reset-gzip-timestamps 'make-gzip-archive-writable
+ (lambda* (#:key outputs #:allow-other-keys)
+ (map (lambda (file)
+ (make-file-writable file))
+ (find-files
+ (string-append (assoc-ref outputs "out")
+ "/src/golang.org/x/crypto/ed25519/testdata")
+ ".*\\.gz$"))
+ #t)))))
+ (synopsis "Support functions for dealing with terminals in Go")
+ (description "@code{terminal} provides support functions for dealing
+with terminals in Go.")
+ (home-page "https://go.googlesource.com/crypto/")
+ (license license:bsd-3))))
--
2.15.1
C
C
Christopher Baines wrote on 27 Jan 2018 16:00
[PATCH 08/10] gnu: Add go-github.com-mattn-go-runewidth.
(address . 30214@debbugs.gnu.org)
20180127150027.27150-8-mail@cbaines.net
* gnu/packages/textutils.scm (go-github.com-mattn-go-runewidth): New variable.
---
gnu/packages/textutils.scm | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)

Toggle diff (41 lines)
diff --git a/gnu/packages/textutils.scm b/gnu/packages/textutils.scm
index 1f5fe6aba..3284be243 100644
--- a/gnu/packages/textutils.scm
+++ b/gnu/packages/textutils.scm
@@ -37,6 +37,7 @@
#:use-module (guix git-download)
#:use-module (guix build-system ant)
#:use-module (guix build-system gnu)
+ #:use-module (guix build-system go)
#:use-module (guix build-system cmake)
#:use-module (guix build-system python)
#:use-module (gnu packages)
@@ -660,3 +661,26 @@ source code.")
"This library simply implements Levenshtein distance algorithm with C++
and Cython.")
(license license:expat))))
+
+(define-public go-github.com-mattn-go-runewidth
+ (package
+ (name "go-github.com-mattn-go-runewidth")
+ (version "0.0.2")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/mattn/go-runewidth")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0vkrfrz3fzn5n6ix4k8s0cg0b448459sldq8bp4riavsxm932jzb"))))
+ (build-system go-build-system)
+ (arguments
+ '(#:import-path "github.com/mattn/go-runewidth"))
+ (synopsis "@code{runewidth} provides Go functions to work with string widths")
+ (description
+ "The @code{runewidth} library provides Go functions for padding,
+measuring and checking the width of strings, with support east asian text.")
+ (home-page "https://github.com/jessevdk/go-flags")
+ (license license:expat)))
--
2.15.1
C
C
Christopher Baines wrote on 27 Jan 2018 16:00
[PATCH 05/10] gnu: Add daemontools.
(address . 30214@debbugs.gnu.org)
20180127150027.27150-5-mail@cbaines.net
* gnu/packages/admin.scm (daemontools): New variable.
---
gnu/packages/admin.scm | 43 +++++++++++++++++++++++++++++++++++++++++++
1 file changed, 43 insertions(+)

Toggle diff (56 lines)
diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm
index 3d3c62619..7c7c457f5 100644
--- a/gnu/packages/admin.scm
+++ b/gnu/packages/admin.scm
@@ -187,6 +187,49 @@ interface and is based on GNU Guile.")
(home-page "https://www.gnu.org/software/shepherd/")
(properties '((ftp-server . "alpha.gnu.org")))))
+(define-public daemontools
+ (package
+ (name "daemontools")
+ (version "0.76")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://cr.yp.to/" name "/"
+ name "-" version ".tar.gz"))
+ (sha256
+ (base32
+ "07scvw88faxkscxi91031pjkpccql6wspk4yrlnsbrrb5c0kamd5"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:tests? #f ;; No tests as far as I can tell.
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'chdir
+ (lambda _
+ (chdir ,(string-append name "-" version))))
+ (delete 'configure)
+ (add-before 'build 'patch
+ (lambda _
+ (substitute* "src/error.h"
+ (("extern int errno;")
+ "#include <errno.h>"))))
+ (replace 'build
+ (lambda _
+ (invoke "package/compile")))
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (bin (string-append out "/bin")))
+ (for-each (lambda (file)
+ (install-file file bin))
+ (find-files "command"))))))))
+ (synopsis "Tools for managing UNIX style services")
+ (description
+ "@code{daemontools} is a collection of tools for managing UNIX
+services.")
+ (license license:public-domain)
+ (home-page "https://cr.yp.to/daemontools.html")))
+
(define-public dfc
(package
(name "dfc")
--
2.15.1
C
C
Christopher Baines wrote on 27 Jan 2018 16:00
[PATCH 03/10] gnu: Add go-github.com-jessevdk-go-flags.
(address . 30214@debbugs.gnu.org)
20180127150027.27150-3-mail@cbaines.net
* gnu/packages/golang.scm (go-github.com-jessevdk-go-flags): New variable.
---
gnu/packages/golang.scm | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)

Toggle diff (35 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index f21149a0f..323786c6d 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -446,3 +446,28 @@ interfaces in Go. The goal is to enable developers to write fast and
distributable command line applications in an expressive way.")
(home-page "https://github.com/davidjpeacock/cli")
(license license:expat))))
+
+(define-public go-github.com-jessevdk-go-flags
+ (package
+ (name "go-github.com-jessevdk-go-flags")
+ (version "1.3.0")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/jessevdk/go-flags")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1jk2k2l10lwrn1r3nxdvbs0yz656830j4khzirw8p4ahs7c5zz36"))))
+ (build-system go-build-system)
+ (arguments
+ '(#:import-path "github.com/jessevdk/go-flags"))
+ (synopsis "Go library for parsing command line arguments")
+ (description
+ "The @code{flags} package provides a command line option parser. The
+functionality is similar to the go builtin @code{flag} package, but
+@code{flags} provides more options and uses reflection to provide a succinct
+way of specifying command line options.")
+ (home-page "https://github.com/jessevdk/go-flags")
+ (license license:bsd-3)))
--
2.15.1
C
C
Christopher Baines wrote on 27 Jan 2018 16:00
[PATCH 09/10] gnu: Add go-github.com-nsf-termbox-go.
(address . 30214@debbugs.gnu.org)
20180127150027.27150-9-mail@cbaines.net
* gnu/packages/terminals.scm (go-github.com-nsf-termbox-go): New variable.
---
gnu/packages/terminals.scm | 30 ++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)

Toggle diff (50 lines)
diff --git a/gnu/packages/terminals.scm b/gnu/packages/terminals.scm
index b480844c3..13d162e1a 100644
--- a/gnu/packages/terminals.scm
+++ b/gnu/packages/terminals.scm
@@ -53,6 +53,7 @@
#:use-module (gnu packages python)
#:use-module (gnu packages python-web)
#:use-module (gnu packages qt)
+ #:use-module (gnu packages textutils)
#:use-module (gnu packages wm)
#:use-module (gnu packages xdisorg)
#:use-module (gnu packages xml)
@@ -574,6 +575,35 @@ It's a terminal emulator with few dependencies, so you don't need a full GNOME
desktop installed to have a decent terminal emulator.")
(license license:gpl2)))
+(define-public go-github.com-nsf-termbox-go
+ (let ((commit "4ed959e0540971545eddb8c75514973d670cf739")
+ (revision "0"))
+ (package
+ (name "go-github.com-nsf-termbox-go")
+ (version (git-version "0.0.0" revision commit))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/nsf/termbox-go.git")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1vx64i1mg660if3wwm81p4b7lzxfb3qbr39i7misdyld3fc486p9"))))
+ (build-system go-build-system)
+ (arguments
+ '(#:import-path "github.com/nsf/termbox-go"))
+ (propagated-inputs
+ `(("go-github.com-mattn-go-runewidth"
+ ,go-github.com-mattn-go-runewidth)))
+ (synopsis "@code{termbox} provides a minimal API for text-based user
+interfaces")
+ (description
+ "Termbox is a library that provides a minimalistic API which allows the
+programmer to write text-based user interfaces.")
+ (home-page "https://github.com/nsf/termbox-go")
+ (license license:expat))))
+
(define-public go-golang.org-x-crypto-ssh-terminal
(let ((commit "c78caca803c95773f48a844d3dcab04b9bc4d6dd")
(revision "0"))
--
2.15.1
C
C
Christopher Baines wrote on 27 Jan 2018 16:00
[PATCH 02/10] gnu: Add go-github.com-howeyc-gopass.
(address . 30214@debbugs.gnu.org)
20180127150027.27150-2-mail@cbaines.net
* gnu/packages/terminals.scm (go-github.com-howeyc-gopass): New variable.
---
gnu/packages/terminals.scm | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)

Toggle diff (38 lines)
diff --git a/gnu/packages/terminals.scm b/gnu/packages/terminals.scm
index 3baaf6612..b480844c3 100644
--- a/gnu/packages/terminals.scm
+++ b/gnu/packages/terminals.scm
@@ -609,3 +609,31 @@ desktop installed to have a decent terminal emulator.")
with terminals in Go.")
(home-page "https://go.googlesource.com/crypto/")
(license license:bsd-3))))
+
+(define-public go-github.com-howeyc-gopass
+ (let ((commit "bf9dde6d0d2c004a008c27aaee91170c786f6db8")
+ (revision "0"))
+ (package
+ (name "go-github.com-howeyc-gopass")
+ (version (git-version "0.0.0" revision commit))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/howeyc/gopass.git")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1jxzyfnqi0h1fzlsvlkn10bncic803bfhslyijcxk55mgh297g45"))))
+ (build-system go-build-system)
+ (arguments
+ '(#:import-path "github.com/howeyc/gopass"))
+ (propagated-inputs
+ `(("go-golang.org-x-crypto-ssh-terminal"
+ ,go-golang.org-x-crypto-ssh-terminal)))
+ (synopsis "Retrieve password from a terminal or piped input in Go")
+ (description
+ "@code{gopass} is a Go package for retrieving a password from user
+terminal or piped input.")
+ (home-page "https://github.com/howeyc/gopass")
+ (license license:isc))))
--
2.15.1
C
C
Christopher Baines wrote on 27 Jan 2018 16:00
[PATCH 07/10] gnu: Add go-gopkg.in-tomb.v2.
(address . 30214@debbugs.gnu.org)
20180127150027.27150-7-mail@cbaines.net
* gnu/packages/golang.scm (go-gopkg.in-tomb.v2): New variable.
---
gnu/packages/golang.scm | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)

Toggle diff (35 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 323786c6d..b8eb90ed9 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -471,3 +471,28 @@ functionality is similar to the go builtin @code{flag} package, but
way of specifying command line options.")
(home-page "https://github.com/jessevdk/go-flags")
(license license:bsd-3)))
+
+(define-public go-gopkg.in-tomb.v2
+ (let ((commit "d5d1b5820637886def9eef33e03a27a9f166942c")
+ (revision "0"))
+ (package
+ (name "go-gopkg.in-tomb.v2")
+ (version (string-append "0.0.0-" revision "." (string-take commit 7)))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/go-tomb/tomb.git")
+ (commit commit)))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32
+ "1sv15sri99szkdz1bkh0ir46w9n8prrwx5hfai13nrhkawfyfy10"))))
+ (build-system go-build-system)
+ (arguments
+ '(#:import-path "gopkg.in/tomb.v2"))
+ (synopsis "@code{tomb} handles clean goroutine tracking and termination")
+ (description
+ "The @code{tomb} package handles clean goroutine tracking and
+termination.")
+ (home-page "https://gopkg.in/tomb.v2")
+ (license license:bsd-3))))
--
2.15.1
C
C
Christopher Baines wrote on 27 Jan 2018 16:00
[PATCH 04/10] gnu: Add go-gopkg.in-check.v1.
(address . 30214@debbugs.gnu.org)
20180127150027.27150-4-mail@cbaines.net
* gnu/packages/check.scm (go-gopkg.in-check.v1): New variable.
---
gnu/packages/check.scm | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)

Toggle diff (45 lines)
diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm
index 1585948b3..564b75f8d 100644
--- a/gnu/packages/check.scm
+++ b/gnu/packages/check.scm
@@ -59,6 +59,7 @@
#:use-module (guix git-download)
#:use-module (guix build-system cmake)
#:use-module (guix build-system gnu)
+ #:use-module (guix build-system go)
#:use-module (guix build-system python)
#:use-module (guix build-system trivial))
@@ -283,6 +284,30 @@ normally do not detect. The goal is to detect only real errors in the code
(i.e. have zero false positives).")
(license license:gpl3+)))
+(define-public go-gopkg.in-check.v1
+ (let ((commit "20d25e2804050c1cd24a7eea1e7a6447dd0e74ec")
+ (revision "0"))
+ (package
+ (name "go-gopkg.in-check.v1")
+ (version (git-version "0.0.0" revision commit))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/go-check/check.git")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0k1m83ji9l1a7ng8a7v40psbymxasmssbrrhpdv2wl4rhs0nc3np"))))
+ (build-system go-build-system)
+ (arguments
+ '(#:import-path "gopkg.in/check.v1"))
+ (synopsis "Rich testing extension for Go's testing package")
+ (description
+ "@code{check} is a rich testing extension for Go's testing package.")
+ (home-page "https://github.com/go-check/check")
+ (license license:bsd-2))))
+
(define-public googletest
(package
(name "googletest")
--
2.15.1
C
C
Christopher Baines wrote on 27 Jan 2018 16:00
[PATCH 10/10] gnu: Add mongo-tools.
(address . 30214@debbugs.gnu.org)
20180127150027.27150-10-mail@cbaines.net
* gnu/packages/databases.scm (mongo-tools): New variable.
---
gnu/packages/databases.scm | 87 ++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 87 insertions(+)

Toggle diff (111 lines)
diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm
index fabfbfe5b..8004a44dd 100644
--- a/gnu/packages/databases.scm
+++ b/gnu/packages/databases.scm
@@ -68,6 +68,7 @@
#:use-module (gnu packages gnupg)
#:use-module (gnu packages guile)
#:use-module (gnu packages time)
+ #:use-module (gnu packages golang)
#:use-module (gnu packages jemalloc)
#:use-module (gnu packages language)
#:use-module (gnu packages libevent)
@@ -87,6 +88,8 @@
#:use-module (gnu packages serialization)
#:use-module (gnu packages statistics)
#:use-module (gnu packages tcl)
+ #:use-module (gnu packages terminals)
+ #:use-module (gnu packages textutils)
#:use-module (gnu packages tls)
#:use-module (gnu packages valgrind)
#:use-module (gnu packages xml)
@@ -2599,3 +2602,87 @@ transforms idiomatic python function calls to well-formed SQL queries.")
(define-public python2-sql
(package-with-python2 python-sql))
+
+(define-public mongo-tools
+ (package
+ (name "mongo-tools")
+ (version "3.4.0")
+ (source
+ (origin (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/mongodb/mongo-tools")
+ (commit (string-append "r" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "095nc57k4m4iyim0x3fgpw681qba123iyl4qz7xysbv5ngbr19mc"))))
+ (build-system go-build-system)
+ (arguments
+ `(#:tests? #f
+ #:unpack-path "github.com/mongodb"
+ #:import-path "github.com/mongodb/mongo-tools"
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'delete-bundled-source-code
+ (lambda _
+ (delete-file-recursively
+ "src/github.com/mongodb/mongo-tools/vendor")
+ #t))
+
+ ;; We don't need to install the source code for end-user application
+ (delete 'install-source)
+
+ (replace 'build
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let build ((tools
+ '("bsondump" "mongodump" "mongoexport" "mongofiles"
+ "mongoimport" "mongooplog" "mongorestore"
+ "mongostat" "mongotop")))
+ (if (null? tools)
+ #t
+ (if (let* ((tool (car tools))
+ (command
+ `("go" "install" "-v"
+ "-tags=\"ssl sasl\""
+ "-ldflags"
+ "-extldflags=-Wl,-z,now,-z,relro"
+ ,(string-append
+ "src/github.com/mongodb/mongo-tools/"
+ tool "/main/" tool ".go"))))
+ (simple-format #t "build: running ~A\n"
+ (string-join command))
+ (zero? (apply system* command)))
+ (build (cdr tools))
+ #f))))))))
+ (native-inputs
+ `(("go-github.com-howeyc-gopass" ,go-github.com-howeyc-gopass)
+ ("go-github.com-jessevdk-go-flags" ,go-github.com-jessevdk-go-flags)
+ ("go-golang.org-x-crypto-ssh-terminal" ,go-golang.org-x-crypto-ssh-terminal)
+ ("go-gopkg.in-mgo.v2" ,go-gopkg.in-mgo.v2)
+ ("go-gopkg.in-tomb.v2" ,go-gopkg.in-tomb.v2)
+ ("go-github.com-nsf-termbox-go" ,go-github.com-nsf-termbox-go)))
+ (home-page "https://github.com/mongodb/mongo-tools")
+ (synopsis "Various tools for interacting with MongoDB and BSON")
+ (description
+ "This package includes a collection of tools related to MongoDB.
+@table @code
+@item bsondump
+Display BSON files in a human-readable format
+@item mongoimport
+Convert data from JSON, TSV or CSV and insert them into a collection
+@item mongoexport
+Write an existing collection to CSV or JSON format
+@item mongodump/mongorestore
+Dump MongoDB backups to disk in the BSON format
+@item mongorestore
+Read MongoDB backups in the BSON format, and restore them to a live database
+@item mongostat
+Monitor live MongoDB servers, replica sets, or sharded clusters
+@item mongofiles
+Read, write, delete, or update files in GridFS
+@item mongooplog
+Replay oplog entries between MongoDB servers
+@item mongotop
+Monitor read/write activity on a mongo server
+@end table")
+ (license license:asl2.0)))
--
2.15.1
C
C
Christopher Baines wrote on 27 Jan 2018 16:00
[PATCH 06/10] gnu: Add go-gopkg.in-mgo.v2.
(address . 30214@debbugs.gnu.org)
20180127150027.27150-6-mail@cbaines.net
* gnu/packages/databases.scm (go-gopkg.in-mgo.v2): New variable.
---
gnu/packages/databases.scm | 44 ++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 44 insertions(+)

Toggle diff (71 lines)
diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm
index 4b2bdb6d3..fabfbfe5b 100644
--- a/gnu/packages/databases.scm
+++ b/gnu/packages/databases.scm
@@ -49,6 +49,7 @@
(define-module (gnu packages databases)
#:use-module (gnu packages)
+ #:use-module (gnu packages admin)
#:use-module (gnu packages algebra)
#:use-module (gnu packages autotools)
#:use-module (gnu packages avahi)
@@ -94,6 +95,7 @@
#:use-module (guix download)
#:use-module (guix git-download)
#:use-module (guix build-system gnu)
+ #:use-module (guix build-system go)
#:use-module (guix build-system perl)
#:use-module (guix build-system python)
#:use-module (guix build-system ruby)
@@ -173,6 +175,48 @@ store key/value pairs in a file in a manner similar to the Unix dbm library
and provides interfaces to the traditional file format.")
(license license:gpl3+)))
+(define-public go-gopkg.in-mgo.v2
+ (package
+ (name "go-gopkg.in-mgo.v2")
+ (version "2016.08.01")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/go-mgo/mgo")
+ (commit (string-append "r" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0rwbi1z63w43b0z9srm8m7iz1fdwx7bq7n2mz862d6liiaqa59jd"))))
+ (build-system go-build-system)
+ (arguments
+ `(#:import-path "gopkg.in/mgo.v2"
+ #:tests? #f
+ #:phases
+ (modify-phases %standard-phases
+ (delete 'reset-gzip-timestamps)
+ (add-before 'check 'start-mongodb
+ (lambda* (#:key tests? #:allow-other-keys)
+ (or (not tests?)
+ (with-directory-excursion "src/gopkg.in/mgo.v2"
+ (invoke "make" "startdb")))))
+ (add-after 'check 'stop'mongodb
+ (lambda* (#:key tests? #:allow-other-keys)
+ (or (not tests?)
+ (with-directory-excursion "src/gopkg.in/mgo.v2"
+ (invoke "make" "stopdb"))))))))
+ (native-inputs
+ `(("go-gopkg.in-check.v1" ,go-gopkg.in-check.v1)
+ ("mongodb" ,mongodb)
+ ("daemontools" ,daemontools)))
+ (synopsis "@code{mgo} offers a rich MongoDB driver for Go.")
+ (description
+ "@code{mgo} (pronounced as mango) is a MongoDB driver for the Go language.
+It implements a rich selection of features under a simple API following
+standard Go idioms.")
+ (home-page "http://labix.org/mgo")
+ (license license:bsd-2)))
+
(define-public bdb
(package
(name "bdb")
--
2.15.1
C
C
Christopher Baines wrote on 27 Jan 2018 16:15
Re: [bug#30214] [PATCH 03/10] gnu: Add go-github.com-jessevdk-go-flags.
(name . Leo Famulari)(address . leo@famulari.name)(address . 30214@debbugs.gnu.org)
87d11vs574.fsf@cbaines.net
Leo Famulari <leo@famulari.name> writes:

Toggle quote (37 lines)
> On Tue, Jan 23, 2018 at 08:34:23PM +0000, Christopher Baines wrote:
>>
>> Leo Famulari <leo@famulari.name> writes:
>>
>> > On Tue, Jan 23, 2018 at 07:51:06PM +0000, Christopher Baines wrote:
>> >> Leo Famulari <leo@famulari.name> writes:
>> >> > On Mon, Jan 22, 2018 at 09:08:23PM +0000, Christopher Baines wrote:
>> >> >> * gnu/packages/golang.scm (go-github.com-jessevdk-go-flags): New variable.
>> >> >
>> >> >> + (add-after 'unpack 'rename-archive
>> >> >> + (lambda _
>> >> >> + (rename-file
>> >> >> + ,(string-append "src/github.com/jessevdk/go-flags-" version)
>> >> >> + "src/github.com/jessevdk/go-flags")
>> >> >> + #t)))))
>> >> >
>> >> > Should the go-build-system try to handle this automatically?
>> >>
>> >> I believe this might be connected with what is in the source
>> >> tarball. Without this stage, the go-flags directory is called
>> >> go-flags-1.3.0, and this causes the build to fail [2].
>> >
>> > Oh right, Go expects you to use Git checkouts instead of release
>> > tarballs. I bet it works if you do that. That kind of tarball is
>> > automatically created by GitHub per tag, and can't be disabled.
>> >
>> >> I'm not sure about the wider context, but it would be good to handle
>> >> this automatically.
>> >
>> > So, I think the build system doesn't need to handle this case.
>>
>> Ok, would it be more appropriate to use a git checkout, rather than a
>> tar archive for these packages then?
>
> Yeah, I bet you can avoid the rename-archive phases if you use a Git
> checkout.

I've done this now for all the packages, and sent a new set of patches.
-----BEGIN PGP SIGNATURE-----

iQKTBAEBCgB9FiEEPonu50WOcg2XVOCyXiijOwuE9XcFAlpsl69fFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF
ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcACgkQXiijOwuE
9XfUbRAAi/cCsUPP6w9wE0J8LRIBuNtOdGBqYW9dw9zR1BqRe/OgQcsK3vlA1CdB
BQfbMTyhzLaToF3HY0fCmvzMh4fdMvi91Rx5I+uZwF7yJU+nDJV3D5JkFXsnapRf
D/6oBRO8wgrBLKqYs2MMEf6lgcFIV6a2Wt41ZPpFcDbSGVakDWl6s2oeLuHX/Uf9
bNNtGxuQIUq3nwjxxyvAPQBgvtP5I/AJPfPCuFVf1uACeNWB37r1MG0KTo1aaMd1
SqfKSz+Xse/FLGS54HR+MePiN2TXRJ3R4bdJC5V5M2L166mEILr1R3nSyhdQ1izB
w3rMrvqmZf0YBp9Rw9kf9c79eK88if4Na48JsKSVaemxwhz6d3Cs84jy0QFCPej7
ZhQQYTzX9MCIkS3g20yGS1pI25GSDL1XYd6ILHxLml/qkcBQN1uV8M315g+gh/zt
OPXNmSn5RQ7gJUmGyy+ilawnxi29GsnHiJ/Zu4TL+j3ayF+ARG2Mz3S/XyugjX5W
5jY4MyTLr+7GehinDgi+7ckf9TZvdXjfzzG4zVf5cCtAkhyBWw3wuqaD9tc5Njof
yl6wedpw02RUAj0ZS2Btz4Noxc7tvJ6x9CavtEqFjFo/R8J4oa+rOuxay/qm1bKE
z5ukgVtkSEnK1QCg+W3HbEXT+6qPRisdVQRKpnTcDURsszWfSNQ=
=KhOQ
-----END PGP SIGNATURE-----

C
C
Christopher Baines wrote on 27 Jan 2018 16:16
Re: [bug#30214] [PATCH 02/10] gnu: Add go-github.com-howeyc-gopass.
(name . Leo Famulari)(address . leo@famulari.name)(address . 30214@debbugs.gnu.org)
87bmhfs564.fsf@cbaines.net
Leo Famulari <leo@famulari.name> writes:

Toggle quote (37 lines)
> On Tue, Jan 23, 2018 at 07:45:12PM +0000, Christopher Baines wrote:
>>
>> Leo Famulari <leo@famulari.name> writes:
>>
>> > On Mon, Jan 22, 2018 at 09:08:22PM +0000, Christopher Baines wrote:
>> >> * gnu/packages/terminals.scm (go-github.com-howeyc-gopass): New variable.
>> >
>> >> + (native-inputs
>> >> + `(("go-golang.org-x-crypto-ssh-terminal"
>> >> + ,go-golang.org-x-crypto-ssh-terminal)))
>> >
>> > Is it really just a native-input? Or could it need this library later,
>> > at run-time?
>>
>> Well, the package doesn't build without it, and as far as I can tell the
>> store output doesn't reference it. I believe that
>> go-golang.org-x-crypto-ssh-terminal is a dependency of
>> go-github.com-howeyc-gopass, so if you're using
>> go-github.com-howeyc-gopass, then you'll need
>> go-golang.org-x-crypto-ssh-terminal. Maybe it should be a propagated
>> input instead?
>
> Go looks for dependencies by first looking for their source code (this
> is why the go-build-system installs the source code by default). Once it
> finds the source code, then it looks up the compiled objects.
>
> Finally, when building the end-user application (not just some library)
> it links everything together in what's basically a static archive.
>
> If everything seems to work even though x-crypto-ssh-terminal is a
> native-input, then I bet that whatever is using howeyc-gopass does not
> exercise the part of howeyc-gopass's code using x-crypto-ssh-terminal.
>
> I think it's more correct here to propagate, unless
> x-crypto-ssh-terminal is only used for howeyc-gopass's test suite or
> something like that.

Ok, I've made it a propagated input, as I think it's more than a build
time dependency.
-----BEGIN PGP SIGNATURE-----

iQKSBAEBCgB9FiEEPonu50WOcg2XVOCyXiijOwuE9XcFAlpsl9NfFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF
ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcACgkQXiijOwuE
9Xcsnw/1FfDLH1bi+Fp23ZkUfuQlFh/Cb5xfb3UY4AflVUKd45IYhM9umtYzU8hE
+EW80jZ4US969YY1zUGm0wyJw1ZGXFpdQSfYgpU2MGdjcR6anju4dI0HZh8017DB
oseOW2NwGeUzSfb0lRTBH7hVW3BQ6T27ffJ9HOyW5kObX/BD+U9X1iv9uXRIP0Sl
ZS936eKGPEeuT77OyjwrFGkZX07PT2H5lYOTzk6uOKLIctTvyl4mFggOMggKqqGX
ZWZ8yNLe3TJVzd8ugTFJ5XPGvh+cqRVWY2ujghUX8+3S17J5Xjx+9StThWD/9i2G
YYkGSDbb/XpmibRVy+JwYgXSA8w2XkTddbpPQb9/GBCTneYiNSSeCu+1W7mnWmMc
YPyQETTHmaUNRRSwTkOuEac58Lr6UGQ4W5ptG9NVSESJi71qqr/xLdNKKyzlnze1
sKrZQt4cBkilJCAlZzxywbsdNr4qmKFvzwkCAWHnopOthBk6NYThuJ/LtdCsL00n
Gfn0+QQrsG+lN0E94JVkn+CeReA2MZDDSiZMyW21mM/FSew9yzAYGzCzIIozGZ5A
Pn1XigmdrCVUZYKCyodCIp/sGbiogCaO3MhaiXawUanFHs+a1YnhD7jh3P2llNo5
wWMXa76+Iec/9oyfx+x/0wluPiTGwMNi07zh3f2Q0kM/ahOqwQ==
=7Qw3
-----END PGP SIGNATURE-----

L
L
Leo Famulari wrote on 29 Jan 2018 22:52
Re: [bug#30214] [PATCH 01/10] gnu: Add go-golang.org-x-crypto-ssh-terminal.
(name . Christopher Baines)(address . mail@cbaines.net)(address . 30214@debbugs.gnu.org)
20180129215221.GA28969@jasmine.lan
On Sat, Jan 27, 2018 at 03:00:18PM +0000, Christopher Baines wrote:
Toggle quote (3 lines)
> * gnu/packages/terminals.scm (go-golang.org-x-crypto-ssh-terminal): New
> variable.

Assuming this is all working for you, I think you should feel confident
to push the patch series.
-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEsFFZSPHn08G5gDigJkb6MLrKfwgFAlpvl5UACgkQJkb6MLrK
fwgglhAA2gcbKJs2lGhvgNg5376lE9BA1A7h1LQt+KPW1GAie4o8F08D0bwSaPqD
wkYafAR+LxOA68ByeRSDqZt0NduzGxovQnRbe8aQaW71z2t7eA5KPb/Pnh6AelEm
x2dOIv/e8qLCcqF1CeRqla1aa9IW2Q60+gsmK2aZs/vpvVTzKzXDNeOvKSqqn8lK
C86B1gva5iAw3hxtVjfA7KdCfR7x3Z8DQK9+PKVsiLYYx9PNg1K7rRPFsDcqQWij
06SPgC0a91BLy3kYByNWjhbman/MLfYUdf6gLlcA62ujlg6YCgAi58t07ZmQLTVR
P209aHJdm91vnsPYRvx+q7tlnKkyqgei01jUWdt6FqyOKIiy6+PPwKXtCujmXbl/
E996NDLl0NjxyhzX+UtLvR64IkI+TVsXCa2tkYfYy4h/MQkMiL+G5kkMYdpU+z5a
MFWGy6Ta5YR0T1KsJ4pAuWj8d/5lh8K/TGTZp37YF6j/QtADFlnJbwP6Bl65bm74
4pdUM85go4GmpkJ0dm1Sa0trGyKXCbUYlS4IxLevdOQ5hxQwMamAgKYnFYwn2mm1
t8/vojA9AV/W7m6Tv2qUCr5lQoFN7OFQefghz9BNywmpEfwopn+NSuso3Pkr9z1z
vXjJteBTahSRuC/yPDuy3LivrZUddi/DHnz+bKYNbEIzzG9sdQg=
=E5j1
-----END PGP SIGNATURE-----


C
C
Christopher Baines wrote on 30 Jan 2018 08:49
(name . Leo Famulari)(address . leo@famulari.name)(address . 30214-done@debbugs.gnu.org)
87vafjaiqw.fsf@cbaines.net
Leo Famulari <leo@famulari.name> writes:

Toggle quote (7 lines)
> On Sat, Jan 27, 2018 at 03:00:18PM +0000, Christopher Baines wrote:
>> * gnu/packages/terminals.scm (go-golang.org-x-crypto-ssh-terminal): New
>> variable.
>
> Assuming this is all working for you, I think you should feel confident
> to push the patch series.

Great, I've now pushed these patches. Thanks for your comments :)
-----BEGIN PGP SIGNATURE-----

iQKTBAEBCgB9FiEEPonu50WOcg2XVOCyXiijOwuE9XcFAlpwI5dfFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF
ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcACgkQXiijOwuE
9XfhiBAAo3MWND3K15qyFMhBLC4Rr525kru7rrOu/ZV+smb5Enx4snXCVvcpe+1Z
esNLbBNbjZzUfb3Z+BvAykatsvZmpodTtYGOAJccxsM+pc9jUPH/9MN7bR9K8bxA
+14k12MqLUTrPsw9P4tfYgpKTjhyYl61XjG3WCjojqY7b1ydeaJKu4hU0fGPmwry
EkS4FERCAtI4bfBR5YF8J24+xb8VOv1MbwpSwUhkOHz5al0He+s8kzjsN0H256AD
w7bBa5bHs51lxq1S6NtepHsnlkYlZL1kRrgVAXjherjhuQE0Kjmh9+VpOE1J9dh6
IeEUkN46oGHdX5mxFM3WErOheqt8oVtDRvi7POdp3vOHbuPedhzmPGkBGkUkxWgA
bC+NztqaTW2FzXantAZX1ha0GecFMs/tbCK/VjxkTLOoleDVYwVHOKZOrhZ0UPq8
Pi9678WWKYnocSribCOeuPyqG9Xkosm+xjmeU5gti0q24eYnjb8eQ8Al4QUHlHar
mLCiHKYCJHqdsqKV9hl2IMGNvigRvRfmKslRFv7n0Kiy2sm6sMIWP17Ee7ji2Pwu
A4VwfPzElaHaBEw00PFoxNvKt51o8Qsk/hZm4BAcSZSiTveM62cMC2Hx6qm6OVwE
O3MzbMDQHvZwMzsvLD+FARFVrAERtPO892ChsSIF3KRn1PDpprM=
=K70v
-----END PGP SIGNATURE-----

Closed
?