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