[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#62754] [PATCH v2] doc: Use G-Expressions for package definition exa
From: |
Nicolas Goaziou |
Subject: |
[bug#62754] [PATCH v2] doc: Use G-Expressions for package definition example. |
Date: |
Fri, 21 Apr 2023 10:21:50 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) |
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