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.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 62754 in the body.
You can then email your comments to 62754 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
guix-patches <at> gnu.org
:
bug#62754
; Package
guix-patches
.
(Mon, 10 Apr 2023 15:14:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Bruno Victal <mirai <at> makinata.eu>
:
New bug report received and forwarded. Copy sent to
guix-patches <at> gnu.org
.
(Mon, 10 Apr 2023 15:14:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
* 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
Information forwarded
to
guix-patches <at> gnu.org
:
bug#62754
; Package
guix-patches
.
(Mon, 10 Apr 2023 19:01:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 62754 <at> debbugs.gnu.org (full text, mbox):
Bruno Victal <mirai <at> makinata.eu> writes:
> * 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
inputs parameter has not previously appeared in the documentation, the
sentence before last does not make sense anymore.
Information forwarded
to
guix-patches <at> gnu.org
:
bug#62754
; Package
guix-patches
.
(Tue, 11 Apr 2023 12:26:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 62754 <at> debbugs.gnu.org (full text, mbox):
* 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
Information forwarded
to
guix-patches <at> gnu.org
:
bug#62754
; Package
guix-patches
.
(Fri, 21 Apr 2023 08:22:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 62754 <at> debbugs.gnu.org (full text, mbox):
Hello,
Bruno Victal <mirai <at> 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 <at> xref{Build Utilities}, for more...
WDYT?
Regards,
--
Nicolas Goaziou
Information forwarded
to
guix-patches <at> gnu.org
:
bug#62754
; Package
guix-patches
.
(Fri, 05 May 2023 14:17:03 GMT)
Full text and
rfc822 format available.
Message #17 received at 62754 <at> debbugs.gnu.org (full text, mbox):
Hi,
On ven., 21 avril 2023 at 10:21, Nicolas Goaziou <mail <at> nicolasgoaziou.fr> wrote:
>> 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 <at> xref{Build Utilities}, for more...
This tweak looks better to me. Well, Bruno could you send a v3? Or
Nicolas, could you amend the patch and directly apply it?
(Note the typo in « before <at> xref{Build Utilities} », I guess.)
Cheers,
simon
Information forwarded
to
guix-patches <at> gnu.org
:
bug#62754
; Package
guix-patches
.
(Sat, 06 May 2023 14:28:01 GMT)
Full text and
rfc822 format available.
Message #20 received at 62754 <at> debbugs.gnu.org (full text, mbox):
* doc/guix.texi (Build Phases): Use G-Expressions for example.
Co-authored-by: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
---
doc/guix.texi | 36 ++++++++++++++++++++++--------------
1 file changed, 22 insertions(+), 14 deletions(-)
diff --git a/doc/guix.texi b/doc/guix.texi
index 55221a10c3..e4b664aba9 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -10140,23 +10140,31 @@ 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*}; it looks for the @file{xmllint}
+executable under a @file{/bin} directory among the package's inputs
+(@pxref{package Reference}). It also 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}.
@cindex code staging
@cindex staging, of code
base-commit: 1cb0dee3a31c6d235389d4d9787fa583c2babc30
--
2.39.2
Reply sent
to
Ludovic Courtès <ludo <at> gnu.org>
:
You have taken responsibility.
(Sat, 06 May 2023 16:09:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Bruno Victal <mirai <at> makinata.eu>
:
bug acknowledged by developer.
(Sat, 06 May 2023 16:09:02 GMT)
Full text and
rfc822 format available.
Message #25 received at 62754-done <at> debbugs.gnu.org (full text, mbox):
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’.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sun, 04 Jun 2023 11:24:08 GMT)
Full text and
rfc822 format available.
This bug report was last modified 1 year and 342 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.