diff mbox series

[bug#66250] doc: Document specification->package+output.

Message ID b8638c1bf31ed476e00a43f851c9293dd7fd9f09.1695893561.git.efraim@flashner.co.il
State New
Headers show
Series [bug#66250] doc: Document specification->package+output. | expand

Commit Message

Efraim Flashner Sept. 28, 2023, 9:32 a.m. UTC
Reported by nutcase on IRC.

* doc/guix.texi (Using the Configuration System): Add a section about
using specification->package+output.
---
 doc/guix.texi | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

Comments

Efraim Flashner Oct. 13, 2023, 8:53 a.m. UTC | #1
Patch pushed.
diff mbox series

Patch

diff --git a/doc/guix.texi b/doc/guix.texi
index f49ed894a7..d9865f4ac0 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -16936,6 +16936,23 @@  Using the Configuration System
                     %base-packages)))
 @end lisp
 
+@findex specification->package+output
+When a package has more than one output it can be a challenge to refer to
+specific output instead of just to the standard @code{out} output.  For these
+situations one can use the @code{specification->package+output} procedure from
+the @code{(gnu packages)} module.  For example:
+
+@lisp
+(use-modules (gnu packages))
+
+(operating-system
+  ;; ...
+  (packages (append (map specification->package+output
+                         '("nss-certs" "git" "git:send-email"))
+                    %base-packages)))
+
+@end lisp
+
 @unnumberedsubsec System Services
 
 @cindex services