* Referring to an origin input in a package variant
@ 2024-09-15 12:52 Jake
2024-09-20 16:47 ` Simon Tournier
0 siblings, 1 reply; 2+ messages in thread
From: Jake @ 2024-09-15 12:52 UTC (permalink / raw)
To: help-guix
Hello
From [1], the old input style (which is now deprecated) allows us to assign
a string label to an origin. E.g. if we have an origin called my-input
(define my-input (origin ...))
then the old input style allows us to provide it as an input to a package
and give it a label at the same time, like so:
(define pkg-a
(package (inputs `(("my-input-label" ,my-input)))))
This label can be useful when defining a package variant. E.g.
(inputs (modify-inputs (package-inputs pkg-a)
(delete "my-input-label")))
With the new input style, we write:
(package (inputs (list my-input)))
Does our input still have a label we can refer to in a package variant? If
the input was a package, we could refer to it by the package's name
string. But what about for an origin input?
Thanks
Jake
[1] https://guix.gnu.org/manual/en/html_node/package-Reference.html
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Referring to an origin input in a package variant
2024-09-15 12:52 Referring to an origin input in a package variant Jake
@ 2024-09-20 16:47 ` Simon Tournier
0 siblings, 0 replies; 2+ messages in thread
From: Simon Tournier @ 2024-09-20 16:47 UTC (permalink / raw)
To: Jake, help-guix
Hi,
On dim., 15 sept. 2024 at 12:52, Jake <jforst.mailman@gmail.com> wrote:
> Does our input still have a label we can refer to in a package variant? If
> the input was a package, we could refer to it by the package's name
> string. But what about for an origin input?
Yes, the current internal for the new style works with ’package-name’ as
the label.
> But what about for an origin input?
If there is only one ’origin’ then you can use ’_’ to refer to it.
Since that’s not handy and does not work when there is more than one,
please see patch proposal v2 [1]; still WIP and v3 should come. :-)
Cheers,
simon
1: [bug#73073] [PATCH v2 0/8] Allow origin inside inputs with "new style".
Simon Tournier <zimon.toutoune@gmail.com>
Tue, 10 Sep 2024 03:27:08 +0200
id:cover.1725930587.git.zimon.toutoune@gmail.com
https://issues.guix.gnu.org/73073
https://issues.guix.gnu.org/msgid/cover.1725930587.git.zimon.toutoune@gmail.com
https://yhetil.org/guix/cover.1725930587.git.zimon.toutoune@gmail.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-09-20 17:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-15 12:52 Referring to an origin input in a package variant Jake
2024-09-20 16:47 ` Simon Tournier
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).