all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
To: Bruno Victal <mirai@makinata.eu>
Cc: 62754@debbugs.gnu.org, ivan-p-sokolov@ya.ru
Subject: [bug#62754] [PATCH v2] doc: Use G-Expressions for package definition example.
Date: Fri, 21 Apr 2023 10:21:50 +0200	[thread overview]
Message-ID: <87edod63xd.fsf@nicolasgoaziou.fr> (raw)
In-Reply-To: <2db67ea84f7a23bf04280ad1e365ac8709167d66.1681215490.git.mirai@makinata.eu> (Bruno Victal's message of "Tue, 11 Apr 2023 13:19:15 +0100")

Hello,

Bruno Victal <mirai@makinata.eu> writes:

> +     (list
> +      #:phases
> +      #~(modify-phases %standard-phases
> +          (delete 'configure)
> +          (add-before 'build 'set-prefix-in-makefile
> +            (lambda* (#:key inputs #:allow-other-keys)
> +              ;; Modify the makefile so that its
> +              ;; 'PREFIX' variable points to #$output and
> +              ;; 'XMLLINT' points to the correct path.
> +              (substitute* "Makefile"
> +                (("PREFIX =.*")
> +                 (string-append "PREFIX = " #$output "\n"))
> +                (("XMLLINT =.*")
> +                 (string-append "XMLLINT = "
> +                                (search-input-file inputs "/bin/xmllint")
> +                                "\n"))))))))))
>  @end lisp
>  
>  The new phase that is inserted is written as an anonymous procedure,
> -introduced with @code{lambda*}; it honors the @code{outputs} parameter
> -we have seen before.  @xref{Build Utilities}, for more about the helpers
> -used by this phase, and for more examples of @code{modify-phases}.
> +introduced with @code{lambda*}.  @xref{Build Utilities}, for more about
> +the helpers used by this phase, and for more examples of
> +@code{modify-phases}.

I think it still makes sense to refer to `inputs'; it could be
unsettling otherwise. Maybe something along those lines:

    ... introduced with @code{lambda*}; it looks for the @file{xmllint}
    executable in a @file{"/bin"} directory among package's inputs
    (@pxref{package Reference}).  It also honors the @code{outputs}
    parameter we have seen before@xref{Build Utilities}, for more...


WDYT?

Regards,
-- 
Nicolas Goaziou




  reply	other threads:[~2023-04-21  8:22 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-10 15:13 [bug#62754] [PATCH] doc: Use G-Expressions for package definition example Bruno Victal
2023-04-10 19:00 ` Ivan Sokolov
2023-04-11 12:19 ` [bug#62754] [PATCH v2] " Bruno Victal
2023-04-21  8:21   ` Nicolas Goaziou [this message]
2023-05-05 14:06     ` Simon Tournier
2023-05-06 14:19   ` [bug#62754] [PATCH v3] " Bruno Victal
2023-05-06 16:08     ` bug#62754: [PATCH] " Ludovic Courtès

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87edod63xd.fsf@nicolasgoaziou.fr \
    --to=mail@nicolasgoaziou.fr \
    --cc=62754@debbugs.gnu.org \
    --cc=ivan-p-sokolov@ya.ru \
    --cc=mirai@makinata.eu \
    /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 external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.