help-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Questions regarding substitutes with debug output


From: zimoun
Subject: Re: Questions regarding substitutes with debug output
Date: Thu, 28 Apr 2022 10:13:44 +0200

Hi,

On Fri, 22 Apr 2022 at 10:29, Olivier Dion via <help-guix@gnu.org> wrote:
> On Fri, 22 Apr 2022, Maxim Cournoyer <maxim.cournoyer@gmail.com> wrote:

>> Channels can only extend, not override the default Guix channel (the
>> world would be a bit of a mess if it did).  So the easiest path is to
>> use a different name; alternatively for graph rewriting you could use
>> the various APIs to effect package transformations.
>
> Would be nice to have some way to specify channel in a package
> specification.  I don't think that it would break things if we
> considerer channels as namespaces, i.e. different graph.  A
> specification like:
>
>   {channel}package@version:output
>
> would be useful.  For now I will just rename them to "my/package".

What do you mean by «different graph»?  From my understanding, the
additions of channels makes just the graph bigger: extending the initial
(upstream) graph with more nodes (channel). :-)

IIUC, the question is how to refer to these nodes, and from my
understanding, we use basically two ways:

 1. by symbol; and thanks to Guile modules, this way provides
 namespaces, somehow.

 2. by metadata (name, version, output); and here I am not convinced it
 is doable to have a namespace but maybe mimic it.


Therefore, since your question is rooted from GWL:

        I need to specify the package programmatically as a string in
        Guile.  More specifically in the process packages field of Guix
        Workflow Language.

maybe GWL could also accept a symbol instead of a name string.  Well, I
have not used GWL since many months and I do not remember but I think it
is doable.  Ricardo?


Last, back to the feature you would like – be able to write:

    (specifications->manifest (list "foo"))

and select "foo" from your channel instead from upstream, right?  Or a
way to specify the channel using the symbol from the name field in
<channel>, right?

Aside the syntax of the string – why not the one your are proposing –
and so adapt ’package-name->name+version’ (or similar), the function
’find-best-packages-by-name’ requires some improvements.

What I am missing is the mapping from channel name to package.  Well,
Guix does not track this information at pull time.  And I miss how to
implement such mapping.

Therefore, assuming this mapping, the package cache (%package-cache-file)
could be updated to also track such map.  Such feature would also
simplify when searching; especially for variants (same as upstream but
other arguments).


WDYT?


Cheers,
simon



reply via email to

[Prev in Thread] Current Thread [Next in Thread]