Ville Ilvonen writes: > On 9/20/22 14:42, Alyssa Ross wrote: >> Ville Ilvonen writes: >> >>> On 9/20/22 14:31, Alyssa Ross wrote: >>>> Ville Ilvonen writes: >>>> >>>>> with config.nix, the build of vms fails with >>>>> error: undefined variable 'pkgs' >>>>> .. >>>>> 49| >>>>> 50| kernel = pkgs.linux_latest.override { >>>>> | ^ >>>>> >>>>> This fixes the issue for all default vms >>>>> >>>>> Signed-off-by: Ville Ilvonen >>>>> --- >>>> >>>> Hi Ville, I was wondering how I'd have missed something like the default >>>> VMs not evaluating, but indeed I'm not able to reproduce this. And when >>>> I look at the default.nix files for the default VMs, I see: >>>> >>>> 50 kernel = buildPackages.linux.override { >>>> >>>> So unless I've missed something, I don't think this issue exists in the >>>> current upstream. (I checked commit 3aa2f8a.) >>> >>> I'm not testing with default but with new config.nix support. >>> Have you tested with any config.nix? >> >> I'm not sure I understand what you mean. config.nix support is already >> present in the commit I tested. >> >> I created a simple config.nix file that just set "pkgs" to "import {}" >> in case the presence of the config file made a difference, and ran: >> >> nix-instantiate vm/*/* img/live > > Interesting. I created a simple config.nix in the root of Spectrum > source tree - https://spectrum-os.org/doc/build-configuration.html > It only overrides the kernel - to imx8 - and sets crossSystem for > aarch64. Build of vms fails without this patch. Are you testing with an upstream Spectrum commit, or with one from the TII branch with cross compilation support? It's likely that making cross compilation work would have required changing line 50 you posted above, because as I explained I don't think it's correct. So if you're using that branch, that could explain why you're seeing this and I'm not.