about summary refs log tree commit diff
path: root/nixpkgs/nixos/lib/testing/run.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/nixos/lib/testing/run.nix')
-rw-r--r--nixpkgs/nixos/lib/testing/run.nix4
1 files changed, 3 insertions, 1 deletions
diff --git a/nixpkgs/nixos/lib/testing/run.nix b/nixpkgs/nixos/lib/testing/run.nix
index 9440c1acdfd8..de5a9b97e61d 100644
--- a/nixpkgs/nixos/lib/testing/run.nix
+++ b/nixpkgs/nixos/lib/testing/run.nix
@@ -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