GNU bug report logs -
#62754
[PATCH] doc: Use G-Expressions for package definition example.
Previous Next
Reported by: Bruno Victal <mirai <at> makinata.eu>
Date: Mon, 10 Apr 2023 15:14:02 UTC
Severity: normal
Tags: patch
Done: Ludovic Courtès <ludo <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your bug report
#62754: [PATCH] doc: Use G-Expressions for package definition example.
which was filed against the guix-patches package, has been closed.
The explanation is attached below, along with your original report.
If you require more details, please reply to 62754 <at> debbugs.gnu.org.
--
62754: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=62754
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
Hi,
Bruno Victal <mirai <at> makinata.eu> skribis:
> * doc/guix.texi (Build Phases): Use G-Expressions for example.
>
> Co-authored-by: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
Applied, thank you, and thanks Simon and Nicolas!
Ludo’.
[Message part 3 (message/rfc822, inline)]
* doc/guix.texi (Build Phases): Use G-Expressions for example.
---
doc/guix.texi | 29 +++++++++++++++++------------
1 file changed, 17 insertions(+), 12 deletions(-)
diff --git a/doc/guix.texi b/doc/guix.texi
index ed42488882..100ad93a3e 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -10131,21 +10131,26 @@ 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 "out" 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
+introduced with @code{lambda*}; it honors the @code{inputs} 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}.
base-commit: b78d6ceaa07be3c7582627cd28712b67102e521c
--
2.39.2
This bug report was last modified 2 years and 17 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.