From: Bruno Victal <mirai@makinata.eu>
To: 62754@debbugs.gnu.org
Cc: Bruno Victal <mirai@makinata.eu>, ivan-p-sokolov@ya.ru
Subject: [bug#62754] [PATCH v2] doc: Use G-Expressions for package definition example.
Date: Tue, 11 Apr 2023 13:19:15 +0100 [thread overview]
Message-ID: <2db67ea84f7a23bf04280ad1e365ac8709167d66.1681215490.git.mirai@makinata.eu> (raw)
In-Reply-To: <f895ae0c822a33051cdd9bb23e43a8fda412d962.1681139577.git.mirai@makinata.eu>
* doc/guix.texi (Build Phases): Use G-Expressions for example.
---
doc/guix.texi | 33 +++++++++++++++++++--------------
1 file changed, 19 insertions(+), 14 deletions(-)
diff --git a/doc/guix.texi b/doc/guix.texi
index fa6c9f46a3..62513a4182 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -10131,23 +10131,28 @@ Build Phases
;; other fields omitted
(build-system gnu-build-system)
(arguments
- '(#:phases (modify-phases %standard-phases
- (delete 'configure)
- (add-before 'build 'set-prefix-in-makefile
- (lambda* (#:key outputs #:allow-other-keys)
- ;; Modify the makefile so that its
- ;; 'PREFIX' variable points to "out".
- (let ((out (assoc-ref outputs "out")))
- (substitute* "Makefile"
- (("PREFIX =.*")
- (string-append "PREFIX = "
- out "\n")))))))))))
+ (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}.
@cindex code staging
@cindex staging, of code
base-commit: 0356087f4e669a79d62d413498c32e4ecb79ba6b
--
2.39.2
next prev parent reply other threads:[~2023-04-11 12:26 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 ` Bruno Victal [this message]
2023-04-21 8:21 ` [bug#62754] [PATCH v2] " Nicolas Goaziou
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=2db67ea84f7a23bf04280ad1e365ac8709167d66.1681215490.git.mirai@makinata.eu \
--to=mirai@makinata.eu \
--cc=62754@debbugs.gnu.org \
--cc=ivan-p-sokolov@ya.ru \
/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.