diff options
author | tljuniper <48209000+tljuniper@users.noreply.github.com> | 2022-05-23 11:08:13 +0200 |
---|---|---|
committer | tljuniper <48209000+tljuniper@users.noreply.github.com> | 2022-05-29 11:22:23 +0200 |
commit | a99736e399c68db364485f127ae86e7ce3970f75 (patch) | |
tree | 6bcdc3a483d7434dff75767f49e0d9640543baa6 /nixos/lib/testing-python.nix | |
parent | 5862243e1ab8c0a19cb448f523c27c167dcd826b (diff) |
nixos/test-driver: add option to add extra python packages to test code
Diffstat (limited to 'nixos/lib/testing-python.nix')
-rw-r--r-- | nixos/lib/testing-python.nix | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/nixos/lib/testing-python.nix b/nixos/lib/testing-python.nix index 4ab3cf53045af..79b55f8d1d682 100644 --- a/nixos/lib/testing-python.nix +++ b/nixos/lib/testing-python.nix @@ -52,12 +52,13 @@ rec { , skipLint ? false , passthru ? {} , interactive ? false + , extraPythonPackages ? (_ :[]) }: let # Reifies and correctly wraps the python test driver for # the respective qemu version and with or without ocr support testDriver = pkgs.callPackage ./test-driver { - inherit enableOCR; + inherit enableOCR extraPythonPackages; qemu_pkg = qemu_test; imagemagick_light = imagemagick_light.override { inherit libtiff; }; tesseract4 = tesseract4.override { enableLanguages = [ "eng" ]; }; @@ -161,6 +162,7 @@ rec { (if meta.description or null != null then builtins.unsafeGetAttrPos "description" meta else builtins.unsafeGetAttrPos "testScript" t) + , extraPythonPackages ? (_ : []) } @ t: let mkNodes = qemu_pkg: @@ -213,13 +215,13 @@ rec { ); driver = setupDriverForTest { - inherit testScript enableOCR skipLint passthru; + inherit testScript enableOCR skipLint passthru extraPythonPackages; testName = name; qemu_pkg = pkgs.qemu_test; nodes = mkNodes pkgs.qemu_test; }; driverInteractive = setupDriverForTest { - inherit testScript enableOCR skipLint passthru; + inherit testScript enableOCR skipLint passthru extraPythonPackages; testName = name; qemu_pkg = pkgs.qemu; nodes = mkNodes pkgs.qemu; |