mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-13 13:40:28 +03:00
macOS support for NixOS tests (#282401)
Closes #193336 Closes #261694 Related to #108984 The goal here was to get the following flake to build and run on `aarch64-darwin`: ```nix { inputs.nixpkgs.url = <this branch>; outputs = { nixpkgs, ... }: { checks.aarch64-darwin.default = nixpkgs.legacyPackages.aarch64-darwin.nixosTest { name = "test"; nodes.machine = { }; testScript = ""; }; }; } ``` … and after this change it does. There's no longer a need for the user to set `nodes.*.nixpkgs.pkgs` or `nodes.*.virtualisation.host.pkgs` as the correct values are inferred from the host system.
This commit is contained in:
parent
458b097d81
commit
b8698cd8d6
9 changed files with 51 additions and 10 deletions
|
@ -41,7 +41,9 @@ in
|
|||
rawTestDerivation = hostPkgs.stdenv.mkDerivation {
|
||||
name = "vm-test-run-${config.name}";
|
||||
|
||||
requiredSystemFeatures = [ "kvm" "nixos-test" ];
|
||||
requiredSystemFeatures = [ "nixos-test" ]
|
||||
++ lib.optionals hostPkgs.stdenv.hostPlatform.isLinux [ "kvm" ]
|
||||
++ lib.optionals hostPkgs.stdenv.hostPlatform.isDarwin [ "apple-virt" ];
|
||||
|
||||
buildCommand = ''
|
||||
mkdir -p $out
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue