channels: Add a #:system argument to channel-instances->manifest.
authorChristopher Baines <mail@cbaines.net>
Sat, 24 Apr 2021 07:04:14 +0000 (08:04 +0100)
committerChristopher Baines <mail@cbaines.net>
Wed, 12 May 2021 07:34:07 +0000 (08:34 +0100)
commit34985fb6ae7deffd40443766f5408649a0cbbff2
tree942c76f7a51b8168097ded3f52edd4c870a6efc3
parentb7cbca221f74e9e9ef43c228dca9fa9930babec5
channels: Add a #:system argument to channel-instances->manifest.

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).

This new argument adds the possibility of computing derivations for non-native
systems, without having to run non-native code.

I'm looking at this as it will enable the Guix Data Service to compute channel
instance derivations without relying on QEMU emulation for non-native
systems (it should be faster as well).

* guix/channels.scm (build-from-source): Add #:system argument and pass to
build.
(build-channel-instance): Add system argument and pass to build-from-source.
(channel-instance-derivations): Add #:system argument and pass to
build-channel-instance, also rename system to current-system-value.
(channel-instances->manifest): Add #:system argument and pass to
channel-instance-derivations.
guix/channels.scm