runInLinuxVM emulates the hostPlatform?

Can’t tell if this is intended behaviour or just a case of runInLinuxVM being rarely used and not designed for cross-compilation scenarios (or if my understanding of the platform triplet is just plain wrong). The kernel it passes to QEMU is explicitly the kernel for the hostPlatform, and the QEMU target arch also seems to be set to the hostPlatform (due to this). However, if it’s intended to replicate derivations as faithfully as possible, as the documentation seems to imply, shouldn’t it try to emulate the buildPlatform instead? This would, for instance, entail disabling KVM if buildPlatform != hostPlatform.

1 Like