nixos-test-driver: unbreak eval on macOS (#512733)

This commit is contained in:
Vladimír Čunát
2026-04-23 13:07:47 +00:00
committed by GitHub
3 changed files with 9 additions and 4 deletions
+3
View File
@@ -1,5 +1,6 @@
{
lib,
stdenv,
buildPythonApplication,
colorama,
@@ -59,6 +60,8 @@ buildPythonApplication {
socat
util-linux
vde2
]
++ lib.optionals stdenv.isLinux [
vhost-device-vsock
]
++ lib.optionals enableNspawn [
+3 -3
View File
@@ -1,7 +1,7 @@
{
config,
lib,
pkgs,
hostPkgs,
...
}:
let
@@ -75,9 +75,9 @@ in
) (lib.attrValues config.nodes ++ lib.attrValues config.containers)
);
global_timeout = config.globalTimeout;
test_script = pkgs.writeText "test-script" config.testScriptString;
test_script = hostPkgs.writeText "test-script" config.testScriptString;
enable_ssh_backdoor = config.sshBackdoor.enable;
};
driverConfigurationFile = pkgs.writers.writeJSON "driverConfiguration.json" config.driverConfiguration;
driverConfigurationFile = hostPkgs.writers.writeJSON "driverConfiguration.json" config.driverConfiguration;
};
}
+3 -1
View File
@@ -9,6 +9,8 @@ let
inherit (config) sshBackdoor;
inherit (hostPkgs.stdenv.hostPlatform) isLinux;
# Reifies and correctly wraps the python test driver for
# the respective qemu version and with or without ocr support
testDriver = config.pythonTestDriverPackage.override {
@@ -251,7 +253,7 @@ in
# depending on whether debugging is enabled.
#
# If needed, this can still be turned off.
virtualisation.qemu.enableSharedMemory = lib.mkDefault true;
virtualisation.qemu.enableSharedMemory = lib.mkDefault isLinux;
assertions = [
{