From: Leo Famulari <leo@famulari.name>
To: Alex Kost <alezost@gmail.com>
Cc: guix-devel@gnu.org
Subject: Re: [PATCH 5/6] gnu: Add borg.
Date: Tue, 15 Mar 2016 05:18:45 -0400 [thread overview]
Message-ID: <20160315091845.GA9602@jasmine> (raw)
In-Reply-To: <878u1k2jik.fsf@gmail.com>
On Tue, Mar 15, 2016 at 12:11:15PM +0300, Alex Kost wrote:
> Leo Famulari (2016-03-15 02:34 +0300) wrote:
>
> > * gnu/packages/backup.scm (borg): New variable.
> > ---
> > gnu/packages/backup.scm | 53 ++++++++++++++++++++++++++++++++++++++++++++++++-
> > 1 file changed, 52 insertions(+), 1 deletion(-)
> [...]
> > +(define-public borg
> > + (package
> > + (name "borg")
> > + (version "1.0.0")
> > + (source (origin
> > + (method url-fetch)
> > + (uri (pypi-uri "borgbackup" version))
> > + (sha256
> > + (base32
> > + "0wa6cvqs3rni5nwrgagigchcly8a53rxk56z0zn8iaii2cqrw2sh"))))
> > + (build-system python-build-system)
> > + (arguments
> > + `(#:phases
> > + (modify-phases %standard-phases
> > + (add-before 'build 'set-openssl-prefix
> > + (lambda* (#:key inputs #:allow-other-keys)
> > + (setenv "BORG_OPENSSL_PREFIX" (assoc-ref inputs "openssl"))
> > + #t))
> > + (add-before 'build 'set-lz4-prefix
> > + (lambda* (#:key inputs #:allow-other-keys)
> > + (setenv "BORG_LZ4_PREFIX" (assoc-ref inputs "lz4"))
> > + #t))
>
> Would it be better to make a single 'set-env' phase instead? Or better
> yet, are these '..._PREFIX' variables used for make command? If so,
> they should be specified in #:make-flags argument.
Thank you, that makes the recipe shorter and clearer.
>
> > + (add-after 'install 'docs
> > + (lambda* (#:key outputs #:allow-other-keys)
> > + (let* ((out (assoc-ref outputs "out"))
> > + (man (string-append out "/share/man/man1")))
> > + (and
> > + (zero? (system* "make" "-C" "docs" "man"))
> > + (install-file "docs/_build/man/borg.1" man)))
>
> Since 'install-file' does not specify a returned value, and we are not
> really interested in the returned value, I think it is better to use
> 'when' instead of 'and' here:
>
> (when (zero? (system* "make" "-C" "docs" "man"))
> (install-file "docs/_build/man/borg.1" man))
Okay, that makes sense.
>
> > + #t)))))
>
> --
> Alex
next prev parent reply other threads:[~2016-03-15 9:18 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-14 23:34 [PATCH 0/6] Add borg Leo Famulari
2016-03-14 23:34 ` [PATCH 1/6] gnu: python-msgpack: Update to 0.4.7 Leo Famulari
2016-03-14 23:34 ` [PATCH 2/6] gnu: python-msgpack: Use 'python2-variant' Leo Famulari
2016-03-14 23:34 ` [PATCH 3/6] gnu: attic: Specify dependency on python-llfuse@0.41 Leo Famulari
2016-03-15 8:58 ` Alex Kost
2016-03-15 9:13 ` Leo Famulari
2016-03-14 23:34 ` [PATCH 4/6] gnu: python-llfuse: Update to 1.0, keep 0.41 variant Leo Famulari
2016-03-15 8:53 ` Alex Kost
2016-03-15 9:13 ` Leo Famulari
2016-03-15 10:12 ` Mathieu Lirzin
2016-03-15 16:25 ` Ludovic Courtès
2016-03-21 2:49 ` Leo Famulari
2016-03-21 8:52 ` Alex Kost
2016-03-14 23:34 ` [PATCH 5/6] gnu: Add borg Leo Famulari
2016-03-15 9:11 ` Alex Kost
2016-03-15 9:18 ` Leo Famulari [this message]
2016-03-21 21:31 ` Leo Famulari
2016-03-21 22:35 ` Leo Famulari
2016-03-21 22:52 ` Leo Famulari
2016-03-22 20:20 ` Alex Kost
2016-03-22 21:25 ` Leo Famulari
2016-03-23 8:14 ` Alex Kost
2016-03-23 20:49 ` Efraim Flashner
2016-03-14 23:34 ` [PATCH 6/6] gnu: python-llfuse@0.41: Update to 0.41.1 Leo Famulari
2016-03-24 21:55 ` [PATCH 0/6] Add borg Leo Famulari
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160315091845.GA9602@jasmine \
--to=leo@famulari.name \
--cc=alezost@gmail.com \
--cc=guix-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).