From 52bfa318e8797cffbd4750efbb59cc4d276187a6 Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Sun, 26 Jun 2022 13:57:58 +0200 Subject: nixos/testing: Support mypy through regular mechanisms Rebase / forward port of 2c8bbf33fd84d2fd9de70d66c1f50ac1b6123dd8 --- nixos/lib/testing/driver.nix | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'nixos/lib/testing') diff --git a/nixos/lib/testing/driver.nix b/nixos/lib/testing/driver.nix index 9473d888cbb..b041693686e 100644 --- a/nixos/lib/testing/driver.nix +++ b/nixos/lib/testing/driver.nix @@ -52,6 +52,7 @@ let nativeBuildInputs = [ hostPkgs.makeWrapper ] ++ lib.optionals (!config.skipTypeCheck) [ hostPkgs.mypy ]; + buildInputs = [ testDriver ]; testScript = config.testScriptString; preferLocalBuild = true; passthru = config.passthru; @@ -73,13 +74,10 @@ let cat -n testScriptWithTypes - # set pythonpath so mypy knows where to find the imports. this requires the py.typed file. - export PYTHONPATH='${../test-driver}' mypy --no-implicit-optional \ --pretty \ --no-color-output \ testScriptWithTypes - unset PYTHONPATH ''} echo -n "$testScript" >> $out/test-script -- cgit 1.4.1