* [bug#62754] [PATCH] doc: Use G-Expressions for package definition example.
@ 2023-04-10 15:13 Bruno Victal
2023-04-10 19:00 ` Ivan Sokolov
2023-04-11 12:19 ` [bug#62754] [PATCH v2] " Bruno Victal
0 siblings, 2 replies; 7+ messages in thread
From: Bruno Victal @ 2023-04-10 15:13 UTC (permalink / raw)
To: 62754; +Cc: Bruno Victal
* 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
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [bug#62754] [PATCH] doc: Use G-Expressions for package definition example.
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
1 sibling, 0 replies; 7+ messages in thread
From: Ivan Sokolov @ 2023-04-10 19:00 UTC (permalink / raw)
To: Bruno Victal; +Cc: 62754
Bruno Victal <mirai@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.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [bug#62754] [PATCH v2] doc: Use G-Expressions for package definition example.
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
2023-04-21 8:21 ` Nicolas Goaziou
2023-05-06 14:19 ` [bug#62754] [PATCH v3] " Bruno Victal
1 sibling, 2 replies; 7+ messages in thread
From: Bruno Victal @ 2023-04-11 12:19 UTC (permalink / raw)
To: 62754; +Cc: Bruno Victal, ivan-p-sokolov
* 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
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [bug#62754] [PATCH v2] doc: Use G-Expressions for package definition example.
2023-04-11 12:19 ` [bug#62754] [PATCH v2] " Bruno Victal
@ 2023-04-21 8:21 ` Nicolas Goaziou
2023-05-05 14:06 ` Simon Tournier
2023-05-06 14:19 ` [bug#62754] [PATCH v3] " Bruno Victal
1 sibling, 1 reply; 7+ messages in thread
From: Nicolas Goaziou @ 2023-04-21 8:21 UTC (permalink / raw)
To: Bruno Victal; +Cc: 62754, ivan-p-sokolov
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
^ permalink raw reply [flat|nested] 7+ messages in thread
* [bug#62754] [PATCH v2] doc: Use G-Expressions for package definition example.
2023-04-21 8:21 ` Nicolas Goaziou
@ 2023-05-05 14:06 ` Simon Tournier
0 siblings, 0 replies; 7+ messages in thread
From: Simon Tournier @ 2023-05-05 14:06 UTC (permalink / raw)
To: Nicolas Goaziou, Bruno Victal; +Cc: 62754, ivan-p-sokolov
Hi,
On ven., 21 avril 2023 at 10:21, Nicolas Goaziou <mail@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@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@xref{Build Utilities} », I guess.)
Cheers,
simon
^ permalink raw reply [flat|nested] 7+ messages in thread
* [bug#62754] [PATCH v3] doc: Use G-Expressions for package definition example.
2023-04-11 12:19 ` [bug#62754] [PATCH v2] " Bruno Victal
2023-04-21 8:21 ` Nicolas Goaziou
@ 2023-05-06 14:19 ` Bruno Victal
2023-05-06 16:08 ` bug#62754: [PATCH] " Ludovic Courtès
1 sibling, 1 reply; 7+ messages in thread
From: Bruno Victal @ 2023-05-06 14:19 UTC (permalink / raw)
To: 62754; +Cc: Bruno Victal, mail, zimon.toutoune
* doc/guix.texi (Build Phases): Use G-Expressions for example.
Co-authored-by: Nicolas Goaziou <mail@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
^ permalink raw reply related [flat|nested] 7+ messages in thread
* bug#62754: [PATCH] doc: Use G-Expressions for package definition example.
2023-05-06 14:19 ` [bug#62754] [PATCH v3] " Bruno Victal
@ 2023-05-06 16:08 ` Ludovic Courtès
0 siblings, 0 replies; 7+ messages in thread
From: Ludovic Courtès @ 2023-05-06 16:08 UTC (permalink / raw)
To: Bruno Victal; +Cc: 62754-done, mail, zimon.toutoune
Hi,
Bruno Victal <mirai@makinata.eu> skribis:
> * doc/guix.texi (Build Phases): Use G-Expressions for example.
>
> Co-authored-by: Nicolas Goaziou <mail@nicolasgoaziou.fr>
Applied, thank you, and thanks Simon and Nicolas!
Ludo’.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2023-05-06 16:09 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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
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.