Files
nixpkgs/nixos/lib/test-driver/default.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

72 lines
1.2 KiB
Nix

{
lib,
python3Packages,
enableOCR ? false,
qemu_pkg ? qemu_test,
coreutils,
imagemagick_light,
netpbm,
qemu_test,
socat,
ruff,
tesseract4,
vde2,
extraPythonPackages ? (_: [ ]),
nixosTests,
}:
python3Packages.buildPythonApplication {
pname = "nixos-test-driver";
version = "1.1";
pyproject = true;
src = ./src;
build-system = with python3Packages; [
setuptools
];
dependencies =
with python3Packages;
[
colorama
junit-xml
ptpython
ipython
remote-pdb
]
++ extraPythonPackages python3Packages;
propagatedBuildInputs = [
coreutils
netpbm
qemu_pkg
socat
vde2
]
++ lib.optionals enableOCR [
imagemagick_light
tesseract4
];
passthru.tests = {
inherit (nixosTests.nixos-test-driver) driver-timeout;
};
doCheck = true;
nativeCheckInputs = with python3Packages; [
mypy
ruff
];
checkPhase = ''
echo -e "\x1b[32m## run mypy\x1b[0m"
mypy test_driver extract-docstrings.py
echo -e "\x1b[32m## run ruff check\x1b[0m"
ruff check .
echo -e "\x1b[32m## run ruff format\x1b[0m"
ruff format --check --diff .
'';
}