From: Vivien Kraus via Guix-patches via <guix-patches@gnu.org>
To: 59048@debbugs.gnu.org
Subject: [bug#59048] [PATCH v2] guix: modify-input: Recommend prepend instead of append.
Date: Sat, 5 Nov 2022 12:59:01 +0100 [thread overview]
Message-ID: <13852d418ac206841fbb2abb3c19b95641338a94.camel@planete-kraus.eu> (raw)
In-Reply-To: <7c0fbbe321c736a5757c637b33bf3a9909a6f63e.camel@planete-kraus.eu>
Most packages use prepend rather than append. If guix has to decide on an
official policy, it should favor prepend.
* doc/guix.texi (Defining Package Variants): Document the "prepend" clause of
modify-inputs first.
* guix/packages.scm (modify-inputs): use "prepend" in the docstring.
---
doc/guix.texi | 12 ++++++------
guix/packages.scm | 4 ++--
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/doc/guix.texi b/doc/guix.texi
index 7806b21a0f..f818643ecd 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -8057,20 +8057,20 @@ following forms:
@item (delete @var{name}@dots{})
Delete from the inputs packages with the given @var{name}s (strings).
-@item (append @var{package}@dots{})
-Add @var{package}s to the end of the input list.
-
@item (prepend @var{package}@dots{})
Add @var{package}s to the front of the input list.
+
+@item (append @var{package}@dots{})
+Add @var{package}s to the end of the input list.
@end table
The example below removes the GMP and ACL inputs of Coreutils and adds
-libcap to the back of the input list:
+libcap to the front of the input list:
@lisp
(modify-inputs (package-inputs coreutils)
(delete "gmp" "acl")
- (append libcap))
+ (prepend libcap))
@end lisp
The example below replaces the @code{guile} package from the inputs of
@@ -8081,7 +8081,7 @@ The example below replaces the @code{guile} package from the inputs of
(replace "guile" guile-2.2))
@end lisp
-The last type of clause is @code{prepend}, to add inputs to the front of
+The last type of clause is @code{append}, to add inputs at the back of
the list.
@end deffn
diff --git a/guix/packages.scm b/guix/packages.scm
index 704b4ee710..502df7fdd1 100644
--- a/guix/packages.scm
+++ b/guix/packages.scm
@@ -1176,9 +1176,9 @@ (define-syntax modify-inputs
(modify-inputs (package-inputs coreutils)
(delete \"gmp\" \"acl\")
- (append libcap))
+ (prepend libcap))
-Other types of clauses include 'prepend' and 'replace'.
+Other types of clauses include 'append' and 'replace'.
The first argument must be a labeled input list; the result is also a labeled
input list."
base-commit: e5a0381e6defd9c1ffd1b57d9de7f31636c87b68
--
2.38.0
next prev parent reply other threads:[~2022-11-05 20:09 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-05 11:59 [bug#59048] [PATCH] guix: modify-input: Recommend prepend instead of append Vivien Kraus via Guix-patches via
2022-11-05 11:59 ` Vivien Kraus via Guix-patches via [this message]
2022-11-21 14:36 ` bug#59048: [PATCH v2] " Christopher Baines
2022-11-05 12:06 ` [bug#59048] [PATCH] " ( via Guix-patches via
2022-11-05 19:17 ` Christopher Baines
2022-11-05 19:47 ` Vivien Kraus via Guix-patches via
2022-11-05 19:51 ` ( via Guix-patches via
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
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=13852d418ac206841fbb2abb3c19b95641338a94.camel@planete-kraus.eu \
--to=guix-patches@gnu.org \
--cc=59048@debbugs.gnu.org \
--cc=vivien@planete-kraus.eu \
/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 public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).