How to enable cross compilation on Hydra?

Hi all.

I run a hydra server that builds x86 targets perfectly. The jobset is configured with a github repo that uses flake.nix, and besides x86 in it is also enabled with aarch64. But the builds fail for aarch64 jobs, which makes me believe there is a server side configuration to be added on hydra’s configuration.nix that will enable cross compilation. The status of the failed jobs are “unsupported system type”.

I’m running hydra 2022-10-22 using nix-2.11.0.

In NixPkgs there’s a difference between native and cross builds. I.e. during evaluation you already choose. If you choose cross, you’ll get a different derivation and different results – and you won’t need a machine with the “host” platform (only “build”).

1 Like

Hi vcunat, thanks. You mentioned

If you choose cross, you’ll get a different derivation and different results

While configuring the evaluation in Hydra, I cannot see any specific option to choose cross compilation. Could you specify where this option can be chosen while configuring the job.

That’s because it’s nothing specific. You don’t even have specific choice for which native platforms to use.

In NixPkgs the crossSystem thing is exposed, and in Hydra’s jobset you can click to add overrides for any parameters.