2021-12-06 13:49:23 +01:00
|
|
|
{ lib
|
|
|
|
, python3Packages
|
|
|
|
, enableOCR ? false
|
|
|
|
, qemu_pkg ? qemu_test
|
|
|
|
, coreutils
|
|
|
|
, imagemagick_light
|
|
|
|
, libtiff
|
|
|
|
, netpbm
|
|
|
|
, qemu_test
|
|
|
|
, socat
|
|
|
|
, tesseract4
|
|
|
|
, vde2
|
|
|
|
}:
|
|
|
|
|
|
|
|
python3Packages.buildPythonApplication rec {
|
|
|
|
pname = "nixos-test-driver";
|
2022-01-01 23:06:07 +01:00
|
|
|
version = "1.1";
|
2021-12-06 13:49:23 +01:00
|
|
|
src = ./.;
|
|
|
|
|
|
|
|
propagatedBuildInputs = [ coreutils netpbm python3Packages.colorama python3Packages.ptpython qemu_pkg socat vde2 ]
|
|
|
|
++ (lib.optionals enableOCR [ imagemagick_light tesseract4 ]);
|
|
|
|
|
|
|
|
doCheck = true;
|
|
|
|
checkInputs = with python3Packages; [ mypy pylint black ];
|
|
|
|
checkPhase = ''
|
|
|
|
mypy --disallow-untyped-defs \
|
|
|
|
--no-implicit-optional \
|
|
|
|
--ignore-missing-imports ${src}/test_driver
|
2022-01-02 23:12:21 +01:00
|
|
|
pylint --errors-only --enable=unused-import ${src}/test_driver
|
2021-12-06 13:49:23 +01:00
|
|
|
black --check --diff ${src}/test_driver
|
|
|
|
'';
|
|
|
|
}
|