Subject: [bug#77033] [PATCH] deploy: Support --target and --system.

From: Maxim Cournoyer <[email-masked]>
Date: Thu, 20 Mar 2025 16:07:44 +0900

Hi Sergey, Roman,

Sergey Trofimov <[email-masked]> writes:

[...]

>>> I don't see a "system" field in the machine or operating system
>>> record. So I'm not sure if we have a way to infer that yet.
>>>
>>> Would it make sense to add such a field and chose the target
>>> architecture per machine?
>>>
>
> This totally makes sense to me and is the correct way. However I wonder
> if both the `system` and the `target` fields should be added, so that
> the user could choose either native or cross build.

We already have platform-system->target and platform-target->system, so
I assume having one or the other could be enough?.  Looking at
machine-ssh-configuration, I also see we already have a 'system' field.

Perhaps 'guix deploy' could have a '--cross-build' option, or the record
could have a 'cross-build?' field, or both, with the CLI taking
precedence over the later, and the target type would be inferred from
the system via platform-system->target?

In my experience, assuming a powerful x86_64 workstation,
cross-compilation > native-compilation (on lower spec ARM machine) >
emulated native compilation (QEMU).

I hope I understood the context correctly :-).

-- 
Thanks,
Maxim