3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/nixos/tests/make-test-python.nix
Robert Hensing 534e5629af nixos/tests/make-test-python.nix: Restore stand-alone invocation
It's an ugly solution (like before), but some of us want to

    nix-build nixos/tests/foo.nix

This PR makes that possible once more for tests are wired with `make-test-python.nix`.
2022-10-01 16:43:42 +02:00

12 lines
359 B
Nix

f: {
system ? builtins.currentSystem,
pkgs ? import ../.. { inherit system; },
...
} @ args:
with import ../lib/testing-python.nix { inherit system pkgs; };
let testConfig = makeTest (if pkgs.lib.isFunction f then f (args // { inherit pkgs; inherit (pkgs) lib; }) else f);
in testConfig.test # For nix-build
// testConfig # For all-tests.nix