-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
Closed
Labels
6.topic: darwinRunning or building packages on DarwinRunning or building packages on Darwin6.topic: nixosIssues or PRs affecting NixOS modules, or package usability issues specific to NixOSIssues or PRs affecting NixOS modules, or package usability issues specific to NixOS6.topic: testingTooling for automated testing of packages and modulesTooling for automated testing of packages and modules
Description
Issue description
It would be great to be able to run NixOS tests on Darwin. Right now building/running NixOS tests fails on Darwin when building the Linux VMs.
If one has a Linux builder available, it should be possible to:
- Build the Linux VMs on the Linux builder.
- Run the tests on Darwin as well as running the start scripts (for interacting with the VMs locally) using hvf instead of KVM.
My interpretation is that build-vms.nix should be tweaked. buildVM should take a Linux package set (pkgs with system = "...-linux"), and the rest of the build (driver, buildVirtualNetwork) should take a Darwin package set.
nixpkgs/nixos/lib/build-vms.nix
Lines 30 to 43 in 93db55b
| buildVM = | |
| nodes: configurations: | |
| import ./eval-config.nix { | |
| inherit system; | |
| modules = configurations ++ extraConfigurations; | |
| baseModules = (import ../modules/module-list.nix) ++ | |
| [ ../modules/virtualisation/qemu-vm.nix | |
| ../modules/testing/test-instrumentation.nix # !!! should only get added for automated test runs | |
| { key = "no-manual"; documentation.nixos.enable = false; } | |
| { key = "qemu"; system.build.qemu = qemu; } | |
| { key = "nodes"; _module.args.nodes = nodes; } | |
| ] ++ optional minimal ../modules/testing/minimal-kernel.nix; | |
| }; |
Then the qemu commands should be changed to use accel=hvf (instead of =kvm) on Darwin.
CC @basvandijk
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
6.topic: darwinRunning or building packages on DarwinRunning or building packages on Darwin6.topic: nixosIssues or PRs affecting NixOS modules, or package usability issues specific to NixOSIssues or PRs affecting NixOS modules, or package usability issues specific to NixOS6.topic: testingTooling for automated testing of packages and modulesTooling for automated testing of packages and modules