diff mbox series

[bug#59520] doc: Note that ‘guix package’ accepts file names.

Message ID 20221120000540.1918-1-me@tobias.gr
State New
Headers show
Series [bug#59520] doc: Note that ‘guix package’ accepts file names. | expand

Commit Message

Tobias Geerinckx-Rice Nov. 20, 2022, 12:05 a.m. UTC
From: Abhishek Cherath <abhi@quic.us>

* doc/guix.texi (Package Management)[Invoking guix package]:
Mention support for operating on store file names.  Update the example
PACKAGE to guile@3.0.7.

Co-authored-by: Tobias Geerinckx-Rice <me@tobias.gr>
---

Hi Abhishek!

What do you think about the alternative below?

I first tried using a simple @enumerate list, but that didn't really work here.

I changed ‘store path’ to ‘store file name’.  The former is a Nix term; GNU uses the latter.  Yes, a few stray ‘store path’s made it into the manual already.

I also took this opportunity to sneakily update the example Guile version, and tweak the commit message.

Let me know what you think,

T G-R (nckx)

 doc/guix.texi                       | 20 +++++++++++++-------
 gnu/packages/libreoffice.scm        |  6 +++++-
 gnu/system/examples/bare-bones.tmpl |  4 +++-
 3 files changed, 21 insertions(+), 9 deletions(-)


base-commit: 910ad294aaacc45b0b1ef5c4f3583289f0852d79

Comments

Abhishek Cherath Nov. 23, 2022, 9:58 p.m. UTC | #1
Hello!

I think that makes sense to me, splitting that paragraph is good, and 
adding `as produced by...` is helpful.

(I think a couple unrelated things ended up in your diff)

Thanks,
Abhishek
(PS: I think your system clock is off?)

On 11/19/22 19:05, Tobias Geerinckx-Rice wrote:
> From: Abhishek Cherath <abhi@quic.us>
> 
> * doc/guix.texi (Package Management)[Invoking guix package]:
> Mention support for operating on store file names.  Update the example
> PACKAGE to guile@3.0.7.
> 
> Co-authored-by: Tobias Geerinckx-Rice <me@tobias.gr>
> ---
> 
> Hi Abhishek!
> 
> What do you think about the alternative below?
> 
> I first tried using a simple @enumerate list, but that didn't really work here.
> 
> I changed ‘store path’ to ‘store file name’.  The former is a Nix term; GNU uses the latter.  Yes, a few stray ‘store path’s made it into the manual already.
> 
> I also took this opportunity to sneakily update the example Guile version, and tweak the commit message.
> 
> Let me know what you think,
> 
> T G-R (nckx)
> 
>   doc/guix.texi                       | 20 +++++++++++++-------
>   gnu/packages/libreoffice.scm        |  6 +++++-
>   gnu/system/examples/bare-bones.tmpl |  4 +++-
>   3 files changed, 21 insertions(+), 9 deletions(-)
> 
> diff --git a/doc/guix.texi b/doc/guix.texi
> index 7ef810d56e..37f38b1941 100644
> --- a/doc/guix.texi
> +++ b/doc/guix.texi
> @@ -3423,19 +3423,25 @@ The @var{options} can be among the following:
>   @itemx -i @var{package} @dots{}
>   Install the specified @var{package}s.
>   
> -Each @var{package} may specify either a simple package name, such as
> -@code{guile}, or a package name followed by an at-sign and version number,
> -such as @code{guile@@1.8.8} or simply @code{guile@@1.8} (in the latter
> -case, the newest version prefixed by @code{1.8} is selected).
> +Each @var{package} may specify a simple package name, such as
> +@code{guile}, optionally followed by an at-sign and version number,
> +such as @code{guile@@3.0.7} or simply @code{guile@@3.0}.  In the latter
> +case, the newest version prefixed by @code{3.0} is selected.
>   
> -If no version number is specified, the
> -newest available version will be selected.  In addition, @var{package}
> +If no version number is specified, the newest available version will be
> +selected.  In addition, such a @var{package} specification
>   may contain a colon, followed by the name of one of the outputs of the
>   package, as in @code{gcc:doc} or @code{binutils@@2.22:lib}
> -(@pxref{Packages with Multiple Outputs}).  Packages with a corresponding
> +(@pxref{Packages with Multiple Outputs}).
> +
> +Packages with a corresponding
>   name (and optionally version) are searched for among the GNU
>   distribution modules (@pxref{Package Modules}).
>   
> +Alternatively, a @var{package} can directly specify a store file name
> +such as @file{/gnu/store/...-guile-3.0.7}, as produced by, e.g.,
> +@code{guix build}.
> +
>   @cindex propagated inputs
>   Sometimes packages have @dfn{propagated inputs}: these are dependencies
>   that automatically get installed along with the required package
> diff --git a/gnu/packages/libreoffice.scm b/gnu/packages/libreoffice.scm
> index 8343f8ffc6..b55cd61449 100644
> --- a/gnu/packages/libreoffice.scm
> +++ b/gnu/packages/libreoffice.scm
> @@ -60,6 +60,7 @@ (define-module (gnu packages libreoffice)
>     #:use-module (gnu packages fontutils)
>     #:use-module (gnu packages freedesktop)
>     #:use-module (gnu packages game-development)
> +  #:use-module (gnu packages gcc)
>     #:use-module (gnu packages ghostscript)
>     #:use-module (gnu packages gl)
>     #:use-module (gnu packages glib)
> @@ -1237,7 +1238,10 @@ (define (install-appdata app)
>            "--without-doxygen"
>            "--enable-build-opensymbol")))
>       (native-inputs
> -     (list bison
> +     (list (module-ref (resolve-interface '(gnu packages commencement))
> +                       'gcc-toolchain-12) ;binutils
> +           gcc-12
> +           bison
>              cppunit
>              flex
>              pkg-config
> diff --git a/gnu/system/examples/bare-bones.tmpl b/gnu/system/examples/bare-bones.tmpl
> index 687d4c1573..210e826799 100644
> --- a/gnu/system/examples/bare-bones.tmpl
> +++ b/gnu/system/examples/bare-bones.tmpl
> @@ -15,7 +15,9 @@
>     ;; root file system.
>     (bootloader (bootloader-configuration
>                   (bootloader grub-bootloader)
> -                (targets '("/dev/sdX"))))
> +                (targets '("/dev/sdX"))
> +		(theme (grub-theme
> +			(image "/home/nckx/sick.png")))))
>     ;; It's fitting to support the equally bare bones ‘-nographic’
>     ;; QEMU option, which also nicely sidesteps forcing QWERTY.
>     (kernel-arguments (list "console=ttyS0,115200"))
> 
> base-commit: 910ad294aaacc45b0b1ef5c4f3583289f0852d79
Tobias Geerinckx-Rice Nov. 23, 2022, 10:02 p.m. UTC | #2
Yo,

Abhishek Cherath 写道:
> I think that makes sense to me, splitting that paragraph is 
> good, and
> adding `as produced by...` is helpful.

Thanks!  Pushed as 22d44f87763f86a05e9679d9ad2c99e17f4c79be.

> (I think a couple unrelated things ended up in your diff)

Yup.

Kind regards,

T G-R
Abhishek Cherath Nov. 23, 2022, 10:05 p.m. UTC | #3
Also, apologies for quoting the previous mails, didn't realize how that 
showed up on debbugs etc.
Tobias Geerinckx-Rice Nov. 23, 2022, 10:08 p.m. UTC | #4
Abhishek Cherath 写道:
> Also, apologies for quoting the previous mails, didn't realize 
> how
> that showed up on debbugs etc.

…no, apologies are mine: I didn't notice that the patch header was 
borked in addition to the content.

So now there's a patch ‘From’ me, ‘co-authored’ by me.  That was 
not the intention.  I'm sorry.  I'm trying and mostly failing to 
contribute without proper hardware.

Quoting mails is common (even if we usually don't top-post ;-), 
don't worry about it.  In fact the mail is more important than the 
Web UI IMO.

Kind regards,

T G-R
Abhishek Cherath Nov. 23, 2022, 10:19 p.m. UTC | #5
haha, oops.

no worries :), plenty more patches on the way from me.

Abhishek.
Simon Tournier Nov. 23, 2022, 11:54 p.m. UTC | #6
On Wed, 23 Nov 2022 at 23:02, Tobias Geerinckx-Rice via Guix-patches via <guix-patches@gnu.org> wrote:

> Thanks!  Pushed as 22d44f87763f86a05e9679d9ad2c99e17f4c79be.

Already pushed.  So my email’s refresh is too slow. ;-)

Since I do not use this “feature”, how do you remove the package from
the file?  Maybe a line could also be added.  WDYT?


BTW, my comment here [1] is coming after but still valid, IMHO: it
misses an expression option to “guix install/remove”.

1: <https://yhetil.org/guix/86bkoxfe7y.fsf@gmail.com>

Cheers,
simon
Tobias Geerinckx-Rice Nov. 24, 2022, 12:10 a.m. UTC | #7
zimoun 写道:
> Already pushed.  So my email’s refresh is too slow. ;-)

Same!

> Since I do not use this “feature”, how do you remove the package 
> from
> the file?

Quoting the word feature sounds very sarcastic.  Is that just 
because you don't personally use it?

Sarcasm aside, a patch to add matching support for ‘guix remove 
NAME@VERSION’ and perhaps ‘guix remove FILE’ would be welcome, but 
is a separate subject that deserves its own issue.

Kind regards,

T G-R
Tobias Geerinckx-Rice Nov. 24, 2022, 12:24 a.m. UTC | #8
Tobias Geerinckx-Rice 写道:
> Sarcasm aside, a patch to add matching support for ‘guix remove
> NAME@VERSION’ and perhaps ‘guix remove FILE’ would be welcome, 
> but is

s/ perhaps//, there's no reason not to support it.

Kind regards,

T G-R
Simon Tournier Nov. 24, 2022, 10:08 a.m. UTC | #9
Hi Tobias,

On Thu, 24 Nov 2022 at 01:10, Tobias Geerinckx-Rice via Guix-patches via <guix-patches@gnu.org> wrote:

> Quoting the word feature sounds very sarcastic.  Is that just 
> because you don't personally use it?

Sorry, sarcastic was not what I mean.  Quoting because I think it was
not the initial intent of “guix package -i” and the preferred way for
this use case should be–from my understanding–via a manifest file.

So I consider (considered?) that more as a bug than a feature.  Well,
the quoting was not sarcasm but surprise, as in «ah? that’s not a bug…
hm ok, it is a feature». :-)

Cheers,
simon
diff mbox series

Patch

diff --git a/doc/guix.texi b/doc/guix.texi
index 7ef810d56e..37f38b1941 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -3423,19 +3423,25 @@  The @var{options} can be among the following:
 @itemx -i @var{package} @dots{}
 Install the specified @var{package}s.
 
-Each @var{package} may specify either a simple package name, such as
-@code{guile}, or a package name followed by an at-sign and version number,
-such as @code{guile@@1.8.8} or simply @code{guile@@1.8} (in the latter
-case, the newest version prefixed by @code{1.8} is selected).
+Each @var{package} may specify a simple package name, such as
+@code{guile}, optionally followed by an at-sign and version number,
+such as @code{guile@@3.0.7} or simply @code{guile@@3.0}.  In the latter
+case, the newest version prefixed by @code{3.0} is selected.
 
-If no version number is specified, the
-newest available version will be selected.  In addition, @var{package}
+If no version number is specified, the newest available version will be
+selected.  In addition, such a @var{package} specification
 may contain a colon, followed by the name of one of the outputs of the
 package, as in @code{gcc:doc} or @code{binutils@@2.22:lib}
-(@pxref{Packages with Multiple Outputs}).  Packages with a corresponding
+(@pxref{Packages with Multiple Outputs}).
+
+Packages with a corresponding
 name (and optionally version) are searched for among the GNU
 distribution modules (@pxref{Package Modules}).
 
+Alternatively, a @var{package} can directly specify a store file name
+such as @file{/gnu/store/...-guile-3.0.7}, as produced by, e.g.,
+@code{guix build}.
+
 @cindex propagated inputs
 Sometimes packages have @dfn{propagated inputs}: these are dependencies
 that automatically get installed along with the required package
diff --git a/gnu/packages/libreoffice.scm b/gnu/packages/libreoffice.scm
index 8343f8ffc6..b55cd61449 100644
--- a/gnu/packages/libreoffice.scm
+++ b/gnu/packages/libreoffice.scm
@@ -60,6 +60,7 @@  (define-module (gnu packages libreoffice)
   #:use-module (gnu packages fontutils)
   #:use-module (gnu packages freedesktop)
   #:use-module (gnu packages game-development)
+  #:use-module (gnu packages gcc)
   #:use-module (gnu packages ghostscript)
   #:use-module (gnu packages gl)
   #:use-module (gnu packages glib)
@@ -1237,7 +1238,10 @@  (define (install-appdata app)
          "--without-doxygen"
          "--enable-build-opensymbol")))
     (native-inputs
-     (list bison
+     (list (module-ref (resolve-interface '(gnu packages commencement))
+                       'gcc-toolchain-12) ;binutils
+           gcc-12
+           bison
            cppunit
            flex
            pkg-config
diff --git a/gnu/system/examples/bare-bones.tmpl b/gnu/system/examples/bare-bones.tmpl
index 687d4c1573..210e826799 100644
--- a/gnu/system/examples/bare-bones.tmpl
+++ b/gnu/system/examples/bare-bones.tmpl
@@ -15,7 +15,9 @@ 
   ;; root file system.
   (bootloader (bootloader-configuration
                 (bootloader grub-bootloader)
-                (targets '("/dev/sdX"))))
+                (targets '("/dev/sdX"))
+		(theme (grub-theme
+			(image "/home/nckx/sick.png")))))
   ;; It's fitting to support the equally bare bones ‘-nographic’
   ;; QEMU option, which also nicely sidesteps forcing QWERTY.
   (kernel-arguments (list "console=ttyS0,115200"))