unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>
To: Leo Famulari <leo@famulari.name>
Cc: guix-devel@gnu.org
Subject: Re: [PATCH 5/5] gnu: python-acme: Generate and install documentation.
Date: Thu, 18 Feb 2016 13:51:40 +0100	[thread overview]
Message-ID: <idj8u2i5ggz.fsf@bimsb-sys02.mdc-berlin.net> (raw)
In-Reply-To: <482da9ee97c7605e078a3e089a6c475c72570a34.1455767577.git.leo@famulari.name>


Leo Famulari <leo@famulari.name> writes:

> * gnu/packages/tls.scm (acme)[arguments]: Add 'docs' phase.
> [native-inputs]: Add python-sphinx, python-sphinxcontrib-programoutput,
> python-sphinx-rtd-theme, python-setuptools, texinfo.
> ---
>  gnu/packages/tls.scm | 19 ++++++++++++++++---
>  1 file changed, 16 insertions(+), 3 deletions(-)
>
> diff --git a/gnu/packages/tls.scm b/gnu/packages/tls.scm
> index 00d4805..dc6f9b4 100644
> --- a/gnu/packages/tls.scm
> +++ b/gnu/packages/tls.scm
> @@ -340,11 +340,24 @@ security, and applying best practice development processes.")
>                 (display "\n[easy_install]\nzip_ok = 0\n"
>                          port)
>                 (close-port port)
> -               #t))))))
> -    ;; TODO: Add optional inputs for testing and building documentation.
> +               #t)))
> +         (add-after 'install 'docs
> +           (lambda* (#:key outputs #:allow-other-keys)
> +             (let* ((out (assoc-ref outputs "out"))
> +                    (man (string-append out "/share/man/man1"))
> +                    (info (string-append out "/info")))
> +               (and (zero? (system* "make" "-C" "docs" "man" "info"))
> +                    (install-file "docs/_build/texinfo/acme-python.info" info)
> +                    (install-file "docs/_build/man/acme-python.1" man))))))))

“install-file” calls “copy-file” last and according to the Guile manual
the return value of “copy-file” is unspecified.  In practise this is not
#f, of course, so all the three arguments to “(and ...)” will be
evaluated as long as “make” does not fail.

However, “and” just returns the return value of its last argument
(unless one of the arguments evaluates to “#f”), which is unspecified,
not “#t”.  As we want successful phases to return “#t” you could
explicitly add “#t” as a fourth argument to “(and ...)”.

Not sure if that’s really necessary, but you did ask for comments about
your use of “and”... :)

~~ Ricardo

  reply	other threads:[~2016-02-18 12:51 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-18  3:53 [PATCH 0/5] Install docs for Let's Encrypt Leo Famulari
2016-02-18  3:53 ` [PATCH 1/5] gnu: Add python-sphinxcontrib-programoutput Leo Famulari
2016-02-18  3:53 ` [PATCH 2/5] licenses: Add repoze license Leo Famulari
2016-02-18  3:53 ` [PATCH 3/5] gnu: Add python-sphinx-repoze-autointerface Leo Famulari
2016-02-18  8:28   ` Alex Kost
2016-02-18 17:40     ` Leo Famulari
2016-02-18  3:53 ` [PATCH 4/5] gnu: letsencrypt: Generate and install documentation Leo Famulari
2016-02-18  3:53 ` [PATCH 5/5] gnu: python-acme: " Leo Famulari
2016-02-18 12:51   ` Ricardo Wurmus [this message]
2016-02-18 17:46     ` Leo Famulari
2016-02-18 19:36       ` Andreas Enge
2016-02-20  7:48 ` [PATCH 0/5] Install docs for Let's Encrypt 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=idj8u2i5ggz.fsf@bimsb-sys02.mdc-berlin.net \
    --to=ricardo.wurmus@mdc-berlin.de \
    --cc=guix-devel@gnu.org \
    --cc=leo@famulari.name \
    /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).