[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#30214] [PATCH 10/10] gnu: Add mongo-tools.
From: |
Leo Famulari |
Subject: |
[bug#30214] [PATCH 10/10] gnu: Add mongo-tools. |
Date: |
Mon, 22 Jan 2018 17:01:33 -0500 |
User-agent: |
Mutt/1.9.2 (2017-12-15) |
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"))
> + (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.
> + "-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?
signature.asc
Description: PGP signature
- [bug#30214] [PATCH 03/10] gnu: Add go-github.com-jessevdk-go-flags., (continued)
- [bug#30214] [PATCH 03/10] gnu: Add go-github.com-jessevdk-go-flags., Leo Famulari, 2018/01/22
- [bug#30214] [PATCH 03/10] gnu: Add go-github.com-jessevdk-go-flags., Christopher Baines, 2018/01/23
- [bug#30214] [PATCH 03/10] gnu: Add go-github.com-jessevdk-go-flags., Leo Famulari, 2018/01/23
- [bug#30214] [PATCH 03/10] gnu: Add go-github.com-jessevdk-go-flags., Christopher Baines, 2018/01/23
- [bug#30214] [PATCH 03/10] gnu: Add go-github.com-jessevdk-go-flags., Leo Famulari, 2018/01/23
- [bug#30214] [PATCH 03/10] gnu: Add go-github.com-jessevdk-go-flags., Christopher Baines, 2018/01/27
[bug#30214] [PATCH 06/10] gnu: Add go-gopkg.in-mgo.v2., Christopher Baines, 2018/01/22
[bug#30214] [PATCH 08/10] gnu: Add go-github.com-mattn-go-runewidth., Christopher Baines, 2018/01/22
[bug#30214] [PATCH 07/10] gnu: Add go-gopkg.in-tomb.v2., Christopher Baines, 2018/01/22
[bug#30214] [PATCH 10/10] gnu: Add mongo-tools., Christopher Baines, 2018/01/22
[bug#30214] [PATCH 05/10] gnu: Add daemontools., Christopher Baines, 2018/01/22
[bug#30214] [PATCH 09/10] gnu: Add go-github.com-nsf-termbox-go., Christopher Baines, 2018/01/22
[bug#30214] [PATCH 01/10] gnu: Add go-golang.org-x-crypto-ssh-terminal., Leo Famulari, 2018/01/22
[bug#30214] [PATCH]: Add mongo-tools., Leo Famulari, 2018/01/22