diff mbox series

[bug#59520] doc: Note that guix package can operate on outputs.

Message ID 20221123184750.4305-1-abhi@quic.us
State New
Headers show
Series [bug#59520] doc: Note that guix package can operate on outputs. | expand

Commit Message

Abhishek Cherath Nov. 23, 2022, 6:47 p.m. UTC
* doc/guix.texi ("Package Management")
["Invoking guix package"]: Mention support for operating
on store paths.
---
 doc/guix.texi | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)


base-commit: 7a2082023ad9c7479bfedf39537606a088222d48

Comments

zimoun Nov. 23, 2022, 8:35 p.m. UTC | #1
Hi,

On Wed, 23 Nov 2022 at 13:47, Abhishek Cherath <abhi@quic.us> wrote:

> -@code{guile}, or a package name followed by an at-sign and version number,
> +@code{guile}; a package name followed by an at-sign and version number,
              -^
Why this change comma -> semicolon ?

>  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).
> +case, the newest version prefixed by @code{1.8} is selected); or a store path,
> +such as @file{/gnu/store/...-guile-1.8.8}.
                                                              -^

Idem here.

BTW, I am not convinced that people would install a package by referring
by its store path.  I mean, it is impossible to know beforehand the
hash.

What is your use case?

Cheers,
simon
Abhishek Cherath Nov. 23, 2022, 9:02 p.m. UTC | #2
Hello,

That change was to make the hierarchy of clauses a bit clearer (A such 
as a, or b; B such as a, or b; or C such as a, or b), that being said
it is just a style thing, I can change it back if preferred.

Well I had to do it today! (rust 1.65 is defined but not exported, so to 
install it I ran `guix build -e '(@@ (gnu packages rust rust-1.65)'`, 
then `guix install /gnu/store/...-rust-1.6.5`

I do agree that it's maybe not the best to have it in the same sentence 
though, but it'd be nice to have this behavior documented.

Thanks,
Abhishek.

(Sorry forgot to reply all on previous email)

On 11/23/22 15:35, zimoun wrote:
> Hi,
> 
> On Wed, 23 Nov 2022 at 13:47, Abhishek Cherath <abhi@quic.us> wrote:
> 
>> -@code{guile}, or a package name followed by an at-sign and version number,
>> +@code{guile}; a package name followed by an at-sign and version number,
>                -^
> Why this change comma -> semicolon ?
> 
>>   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).
>> +case, the newest version prefixed by @code{1.8} is selected); or a store path,
>> +such as @file{/gnu/store/...-guile-1.8.8}.
>                                                                -^
> 
> Idem here.
> 
> BTW, I am not convinced that people would install a package by referring
> by its store path.  I mean, it is impossible to know beforehand the
> hash.
> 
> What is your use case?
> 
> Cheers,
> simon
Tobias Geerinckx-Rice Nov. 23, 2022, 9:42 p.m. UTC | #3
zimoun 写道:
> BTW, I am not convinced that people would install a package by 
> referring
> by its store path.

OK?  I do it all the time.

Kind regards,

T G-R
zimoun Nov. 23, 2022, 11:22 p.m. UTC | #4
Hi,

On Wed, 23 Nov 2022 at 22:42, Tobias Geerinckx-Rice via Guix-patches via <guix-patches@gnu.org> wrote:
> zimoun 写道:
>> BTW, I am not convinced that people would install a package by 
>> referring
>> by its store path.
>
> OK?  I do it all the time.

How do you get the store path in the first place?


Because from my understanding…

On Wed, 23 Nov 2022 at 16:02, Abhishek Cherath <abhi@quic.us> wrote:

> Well I had to do it today! (rust 1.65 is defined but not exported, so to 
> install it I ran `guix build -e '(@@ (gnu packages rust rust-1.65)'`, 
> then `guix install /gnu/store/...-rust-1.6.5`

…what is missing is a way to provide an expression to “guix package” or
“guix install”.  Something like,

    guix install --expression='(@@ (gnu packages rust) rust-1.65)'


Indeed, it costs nothing to document the “feature” as you, Abhishek, are
proposing. :-)

Cheers,
simon
Tobias Geerinckx-Rice Nov. 24, 2022, midnight UTC | #5
Heyo,

zimoun 写道:
> How do you get the store path in the first place?

‘guix build’, for example.

> …what is missing is a way to provide an expression to “guix 
> package” or
> “guix install”.

Indeed, but as it would address only a subset of such use cases, 
it should be a separate proposal.

Kind regards,

T G-R
Abhishek Cherath Nov. 24, 2022, 12:09 a.m. UTC | #6
Hello,

guix package has --install-from-expression, but I guess that doesn't 
propagate to guix install because that's an alias for guix package -i

Right?
Abhishek.
zimoun Nov. 24, 2022, 10:27 a.m. UTC | #7
Hi,

On Wed, 23 Nov 2022 at 19:09, Abhishek Cherath <abhi@quic.us> wrote:

> guix package has --install-from-expression, but I guess that doesn't 
> propagate to guix install because that's an alias for guix package -i

Yes, this appears to me covering your use case for hidden packages.
Well, I even missed it in my previous message [1]. :-)

So I still miss what is the use case.  For instance,

    guix package -e '(@@ (gnu packages rust) rust-1.65)'

works and all the transformation options are also available in “guix
package”.  Therefore, in the command line,

    guix package -i $(guix build …)

I miss what the … (dots) could be that cannot be expressed without “guix
build”.  Maybe cross-compiled packages with --system or --target?


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

Cheers,
simon
diff mbox series

Patch

diff --git a/doc/guix.texi b/doc/guix.texi
index c0cb24d709..61f323446b 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -3424,9 +3424,10 @@  The @var{options} can be among the following:
 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,
+@code{guile}; 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).
+case, the newest version prefixed by @code{1.8} is selected); or a store path,
+such as @file{/gnu/store/...-guile-1.8.8}.
 
 If no version number is specified, the
 newest available version will be selected.  In addition, @var{package}