[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#47989] [PATCH] channels: Add a #:system argument to channel-instanc
From: |
Ludovic Courtès |
Subject: |
[bug#47989] [PATCH] channels: Add a #:system argument to channel-instances->manifest. |
Date: |
Tue, 04 May 2021 15:48:21 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) |
Hi Christopher,
Christopher Baines <mail@cbaines.net> skribis:
> Ludovic Courtès <ludo@gnu.org> writes:
>
>> Christopher Baines <mail@cbaines.net> skribis:
>>
>>> This allows computing a manifest for a specific system. Previously this was
>>> possible, but only through changing %current-system, which caused the
>>> derivation to be computed using that system as well (so computing a
>>> derivation
>>> for aarch64-linux on x86_64-linux would require running aarch64-linux code).
>>
>> I remember discussing it, but I wonder if I was confused.
>>
>> I think you can always do the equivalent of (say):
>>
>> guix time-machine -- build -s armhf-linux hello -d
>>
>> … where Guix itself is built natively but it then computes a derivation
>> for a different architecture.
>>
>> The equivalent code would be roughly:
>>
>> (let ((inferior (inferior-for-channels …)))
>> (inferior-package-derivation store
>> (car (lookup-inferior-packages inferior
>> "hello"))
>> "armhf-linux"))
>>
>> Does that make sense?
>
> Not really,
:-)
> this is just about manifests for channel instances, so nothing to do
> with package derivations as far as I'm aware.
I re-read your message and must have misunderstood. It’s the derivation
of channel instances that you want for a given system, right? (What’s
the use case though?) In that case something along the lines of the
patch makes perfect sense.
Thanks,
Ludo’.