Merge pull request #207441 from hercules-ci/nixos-testing-python-no-more-specialArgs

nixos/testing-python.nix: Help users who need specialArgs

Changed files
+9 -1
nixos
+9 -1
nixos/lib/testing-python.nix
···
{ system
, pkgs ? import ../.. { inherit system config; }
# Use a minimal kernel?
···
# Ignored
, config ? { }
# !!! See comment about args in lib/modules.nix
-
, specialArgs ? { }
# Modules to add to each VM
, extraConfigurations ? [ ]
}:
···
nixos-lib = import ./default.nix { inherit (pkgs) lib; };
in
rec {
inherit pkgs;
···
+
args@
{ system
, pkgs ? import ../.. { inherit system config; }
# Use a minimal kernel?
···
# Ignored
, config ? { }
# !!! See comment about args in lib/modules.nix
+
, specialArgs ? throw "legacy - do not use, see error below"
# Modules to add to each VM
, extraConfigurations ? [ ]
}:
···
nixos-lib = import ./default.nix { inherit (pkgs) lib; };
in
+
pkgs.lib.throwIf (args?specialArgs) ''
+
testing-python.nix: `specialArgs` is not supported anymore. If you're looking
+
for the public interface to the NixOS test framework, use `runTest`, and
+
`node.specialArgs`.
+
See https://nixos.org/manual/nixos/unstable/index.html#sec-calling-nixos-tests
+
and https://nixos.org/manual/nixos/unstable/index.html#test-opt-node.specialArgs
+
''
rec {
inherit pkgs;