Skip to content

Commit fd8c29a

Browse files
authored
test driver: normalize callpackage call (NixOS#468717)
2 parents 889ec76 + 0024056 commit fd8c29a

File tree

2 files changed

+28
-19
lines changed

2 files changed

+28
-19
lines changed

nixos/lib/test-driver/default.nix

Lines changed: 27 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,50 @@
11
{
22
lib,
3-
python3Packages,
4-
enableOCR ? false,
5-
qemu_pkg ? qemu_test,
3+
4+
buildPythonApplication,
5+
colorama,
66
coreutils,
77
imagemagick_light,
8+
ipython,
9+
junit-xml,
10+
mypy,
11+
ptpython,
12+
python,
13+
ruff,
14+
remote-pdb,
15+
816
netpbm,
17+
nixosTests,
18+
qemu_pkg ? qemu_test,
919
qemu_test,
20+
setuptools,
1021
socat,
11-
ruff,
1222
tesseract4,
1323
vde2,
24+
25+
enableOCR ? false,
1426
extraPythonPackages ? (_: [ ]),
15-
nixosTests,
1627
}:
1728

18-
python3Packages.buildPythonApplication {
29+
buildPythonApplication {
1930
pname = "nixos-test-driver";
2031
version = "1.1";
2132
pyproject = true;
2233

2334
src = ./src;
2435

25-
build-system = with python3Packages; [
36+
build-system = [
2637
setuptools
2738
];
2839

29-
dependencies =
30-
with python3Packages;
31-
[
32-
colorama
33-
junit-xml
34-
ptpython
35-
ipython
36-
remote-pdb
37-
]
38-
++ extraPythonPackages python3Packages;
40+
dependencies = [
41+
colorama
42+
ipython
43+
junit-xml
44+
ptpython
45+
remote-pdb
46+
]
47+
++ extraPythonPackages python.pkgs;
3948

4049
propagatedBuildInputs = [
4150
coreutils
@@ -55,7 +64,7 @@ python3Packages.buildPythonApplication {
5564

5665
doCheck = true;
5766

58-
nativeCheckInputs = with python3Packages; [
67+
nativeCheckInputs = [
5968
mypy
6069
ruff
6170
];

nixos/lib/testing/driver.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ let
99

1010
# Reifies and correctly wraps the python test driver for
1111
# the respective qemu version and with or without ocr support
12-
testDriver = hostPkgs.callPackage ../test-driver {
12+
testDriver = hostPkgs.python3Packages.callPackage ../test-driver {
1313
inherit (config) enableOCR extraPythonPackages;
1414
qemu_pkg = config.qemu.package;
1515
imagemagick_light = hostPkgs.imagemagick_light.override { inherit (hostPkgs) libtiff; };

0 commit comments

Comments
 (0)