Revert "nixos/lib/testing: avoid generating darwin VM tests"

This reverts commit 72155225aa.
This commit is contained in:
Robert Hensing
2025-05-09 16:00:18 +02:00
parent 0719ce0002
commit 18e2327aa7
2 changed files with 8 additions and 12 deletions

View File

@@ -9,15 +9,13 @@ let
};
runTest =
module:
# Infra issue: virtualization on darwin doesn't seem to work yet.
lib.addMetaAttrs { hydraPlatforms = lib.platforms.linux; }
(evalTest (
{ config, ... }:
{
imports = [ module ];
result = config.test;
}
)).config.result;
(evalTest (
{ config, ... }:
{
imports = [ module ];
result = config.test;
}
)).config.result;
testModules = [
./call-test.nix

View File

@@ -36,9 +36,7 @@ in
};
platforms = lib.mkOption {
type = types.listOf types.raw;
# darwin could be added, but it would add VM tests that don't work on Hydra.nixos.org (so far)
# see https://github.com/NixOS/nixpkgs/pull/303597#issuecomment-2128782362
default = lib.platforms.linux;
default = lib.platforms.linux ++ lib.platforms.darwin;
description = ''
Sets the [`meta.platforms`](https://nixos.org/manual/nixpkgs/stable/#var-meta-platforms) attribute on the [{option}`test`](#test-opt-test) derivation.
'';