On Thu, 2021-04-15 at 17:11 +0000, Peter Stuge wrote:
How does Nix deal with other cross-toolchains? That's essentially what the coreboot toolchain is, so maybe you can find inspiration there.
The short story is: It doesn't deal very well with software that tries to build its own toolchain. :)
I got a bit lost in trying to make Coreboot build with the normal Nix toolchain. But once I gave that up and embraced building the toolchain in a custom chroot, I got everything working and it came out reasonably clean:
https://github.com/blitz/nix-coreboot/blob/main/default.nix
I've also pointed the Coreboot Nix wiki page there to spare someone else the headscratching.
Thanks! Julian