GNU bug report logs - #60661
[DOCUMENTATION] doc: Example of selecting package output with lisp

Previous Next

Package: guix-patches;

Reported by: Karl Hallsby <karl <at> hallsby.com>

Date: Sun, 8 Jan 2023 19:39:02 UTC

Severity: normal

Tags: patch

Done: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>

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 60661 in the body.
You can then email your comments to 60661 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#60661; Package guix-patches. (Sun, 08 Jan 2023 19:39:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Karl Hallsby <karl <at> hallsby.com>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Sun, 08 Jan 2023 19:39:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Karl Hallsby <karl <at> hallsby.com>
To: guix-patches <at> gnu.org
Cc: Karl Hallsby <karl <at> hallsby.com>
Subject: [DOCUMENTATION] doc: Example of selecting package output with lisp
Date: Sun,  8 Jan 2023 13:37:55 -0600
* doc/guix.texi (Packages with Multiple Outputs): Give example of how to
select a package's output is a Lisp-y fashion, without using a special
procedure like specification->package.
---
 doc/guix.texi | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/doc/guix.texi b/doc/guix.texi
index 293c3016aa..025a73f616 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -4315,6 +4315,23 @@ The command to install its documentation is:
 guix install glib:doc
 @end example
 
+While the colon syntax works for command-line specification of package
+outputs, it will not work when specifying the package by Guix name.
+For example, say you want to add only @code{glib}'s documentation to
+your @code{operating-system}'s globally installed packages
+(@pxref{operating-system Reference}).
+
+@lisp
+(use-modules (gnu packages glib))
+;; glib-with-documentation is the Guile symbol for the glib package
+(operating-system
+ ...
+ (packages
+  (append
+   (list (list glib-with-documentation "doc"))
+         %base-packages)))
+@end lisp
+
 Some packages install programs with different ``dependency footprints''.
 For instance, the WordNet package installs both command-line tools and
 graphical user interfaces (GUIs).  The former depend solely on the C

base-commit: 812ecf7ee673a3d619d1d3664350508c67e9d92c
-- 
2.38.1





Added tag(s) patch. Request was from Bruno Victal <mirai <at> makinata.eu> to control <at> debbugs.gnu.org. (Wed, 11 Jan 2023 17:38:01 GMT) Full text and rfc822 format available.

Reply sent to Maxim Cournoyer <maxim.cournoyer <at> gmail.com>:
You have taken responsibility. (Tue, 21 Mar 2023 20:21:02 GMT) Full text and rfc822 format available.

Notification sent to Karl Hallsby <karl <at> hallsby.com>:
bug acknowledged by developer. (Tue, 21 Mar 2023 20:21:02 GMT) Full text and rfc822 format available.

Message #12 received at 60661-done <at> debbugs.gnu.org (full text, mbox):

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: Karl Hallsby <karl <at> hallsby.com>
Cc: 60661-done <at> debbugs.gnu.org
Subject: Re: bug#60661: [DOCUMENTATION] doc: Example of selecting package
 output with lisp
Date: Tue, 21 Mar 2023 16:19:59 -0400
Hello Karl,

Karl Hallsby <karl <at> hallsby.com> writes:

> * doc/guix.texi (Packages with Multiple Outputs): Give example of how to
> select a package's output is a Lisp-y fashion, without using a special
> procedure like specification->package.
> ---
>  doc/guix.texi | 17 +++++++++++++++++
>  1 file changed, 17 insertions(+)
>
> diff --git a/doc/guix.texi b/doc/guix.texi
> index 293c3016aa..025a73f616 100644
> --- a/doc/guix.texi
> +++ b/doc/guix.texi
> @@ -4315,6 +4315,23 @@ The command to install its documentation is:
>  guix install glib:doc
>  @end example
>  
> +While the colon syntax works for command-line specification of package
> +outputs, it will not work when specifying the package by Guix name.
> +For example, say you want to add only @code{glib}'s documentation to
> +your @code{operating-system}'s globally installed packages
> +(@pxref{operating-system Reference}).
> +
> +@lisp
> +(use-modules (gnu packages glib))
> +;; glib-with-documentation is the Guile symbol for the glib package
> +(operating-system
> + ...
> + (packages
> +  (append
> +   (list (list glib-with-documentation "doc"))
> +         %base-packages)))
> +@end lisp
> +
>  Some packages install programs with different ``dependency footprints''.
>  For instance, the WordNet package installs both command-line tools and
>  graphical user interfaces (GUIs).  The former depend solely on the C
>
> base-commit: 812ecf7ee673a3d619d1d3664350508c67e9d92c

Thanks for the contribution!  I've taken the liberty to reword it
slightly, to voice it using the third person instead of "you", like
this:

--8<---------------cut here---------------start------------->8---
modified   doc/guix.texi
@@ -4318,10 +4318,12 @@ guix install glib:doc
 @end example
 
 While the colon syntax works for command-line specification of package
-outputs, it will not work when specifying the package by Guix name.
-For example, say you want to add only @code{glib}'s documentation to
-your @code{operating-system}'s globally installed packages
-(@pxref{operating-system Reference}).
+outputs, it will not work when using a package @emph{variable} in Scheme
+code.  For example, to add the documentation of @code{glib} to the
+globally installed packages of an @code{operating-system} (see
+@ref{operating-system Reference}), a list of two items, the first one
+being the package @emph{variable} and the second one the name of the
+output to select (a string), must be used instead:
--8<---------------cut here---------------end--------------->8---

I also added your name to the list of contributors to 'guix.texi'.  I
hope you like it.

The change has now been installed.

-- 
Thanks,
Maxim




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 19 Apr 2023 11:24:15 GMT) Full text and rfc822 format available.

This bug report was last modified 344 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.