nixos/test-driver: modernize
This commit is contained in:
@@ -20,6 +20,8 @@ in
|
|||||||
python3Packages.buildPythonApplication {
|
python3Packages.buildPythonApplication {
|
||||||
pname = "nixos-test-driver";
|
pname = "nixos-test-driver";
|
||||||
version = "1.1";
|
version = "1.1";
|
||||||
|
pyproject = true;
|
||||||
|
|
||||||
src = fs.toSource {
|
src = fs.toSource {
|
||||||
root = ./.;
|
root = ./.;
|
||||||
fileset = fs.unions [
|
fileset = fs.unions [
|
||||||
@@ -28,39 +30,45 @@ python3Packages.buildPythonApplication {
|
|||||||
./extract-docstrings.py
|
./extract-docstrings.py
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
pyproject = true;
|
|
||||||
|
build-system = with python3Packages; [
|
||||||
|
setuptools
|
||||||
|
];
|
||||||
|
|
||||||
|
dependencies =
|
||||||
|
with python3Packages;
|
||||||
|
[
|
||||||
|
colorama
|
||||||
|
junit-xml
|
||||||
|
ptpython
|
||||||
|
]
|
||||||
|
++ extraPythonPackages python3Packages;
|
||||||
|
|
||||||
propagatedBuildInputs =
|
propagatedBuildInputs =
|
||||||
[
|
[
|
||||||
coreutils
|
coreutils
|
||||||
netpbm
|
netpbm
|
||||||
python3Packages.colorama
|
|
||||||
python3Packages.junit-xml
|
|
||||||
python3Packages.ptpython
|
|
||||||
qemu_pkg
|
qemu_pkg
|
||||||
socat
|
socat
|
||||||
vde2
|
vde2
|
||||||
]
|
]
|
||||||
++ (lib.optionals enableOCR [
|
++ lib.optionals enableOCR [
|
||||||
imagemagick_light
|
imagemagick_light
|
||||||
tesseract4
|
tesseract4
|
||||||
])
|
];
|
||||||
++ extraPythonPackages python3Packages;
|
|
||||||
|
|
||||||
nativeBuildInputs = [
|
|
||||||
python3Packages.setuptools
|
|
||||||
];
|
|
||||||
|
|
||||||
passthru.tests = {
|
passthru.tests = {
|
||||||
inherit (nixosTests.nixos-test-driver) driver-timeout;
|
inherit (nixosTests.nixos-test-driver) driver-timeout;
|
||||||
};
|
};
|
||||||
|
|
||||||
doCheck = true;
|
doCheck = true;
|
||||||
|
|
||||||
nativeCheckInputs = with python3Packages; [
|
nativeCheckInputs = with python3Packages; [
|
||||||
mypy
|
mypy
|
||||||
ruff
|
ruff
|
||||||
black
|
black
|
||||||
];
|
];
|
||||||
|
|
||||||
checkPhase = ''
|
checkPhase = ''
|
||||||
echo -e "\x1b[32m## run mypy\x1b[0m"
|
echo -e "\x1b[32m## run mypy\x1b[0m"
|
||||||
mypy test_driver extract-docstrings.py
|
mypy test_driver extract-docstrings.py
|
||||||
|
|||||||
Reference in New Issue
Block a user