me
/
guix
Archived
1
0
Fork 0

guix: modify-input: Recommend prepend instead of append.

* doc/guix.texi (Defining Package Variants): Document the "prepend" clause of
modify-inputs first.
* guix/packages.scm (modify-inputs): use "prepend" in the docstring.

Signed-off-by: Christopher Baines <mail@cbaines.net>
Vivien Kraus 2022-11-05 12:59:01 +01:00 committed by Christopher Baines
parent 4d05c5fa57
commit 9283c80e60
No known key found for this signature in database
GPG Key ID: 5E28A33B0B84F577
2 changed files with 8 additions and 8 deletions

View File

@ -8080,20 +8080,20 @@ following forms:
@item (delete @var{name}@dots{}) @item (delete @var{name}@dots{})
Delete from the inputs packages with the given @var{name}s (strings). 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{}) @item (prepend @var{package}@dots{})
Add @var{package}s to the front of the input list. 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 @end table
The example below removes the GMP and ACL inputs of Coreutils and adds 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 @lisp
(modify-inputs (package-inputs coreutils) (modify-inputs (package-inputs coreutils)
(delete "gmp" "acl") (delete "gmp" "acl")
(append libcap)) (prepend libcap))
@end lisp @end lisp
The example below replaces the @code{guile} package from the inputs of The example below replaces the @code{guile} package from the inputs of
@ -8104,7 +8104,7 @@ The example below replaces the @code{guile} package from the inputs of
(replace "guile" guile-2.2)) (replace "guile" guile-2.2))
@end lisp @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. the list.
@end deffn @end deffn

View File

@ -1176,9 +1176,9 @@ inputs of Coreutils and adds libcap:
(modify-inputs (package-inputs coreutils) (modify-inputs (package-inputs coreutils)
(delete \"gmp\" \"acl\") (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 The first argument must be a labeled input list; the result is also a labeled
input list." input list."