1{
2 lib,
3 stdenv,
4 buildPythonPackage,
5 fetchPypi,
6 replaceVars,
7 xorg,
8
9 # build-system
10 setuptools,
11
12 # tests
13 easyprocess,
14 entrypoint2,
15 pillow,
16 psutil,
17 pytest-timeout,
18 pytest-xdist,
19 pytestCheckHook,
20 vncdo,
21}:
22
23buildPythonPackage rec {
24 pname = "pyvirtualdisplay";
25 version = "3.0";
26 pyproject = true;
27
28 src = fetchPypi {
29 pname = "PyVirtualDisplay";
30 inherit version;
31 hash = "sha256-CXVbw86263JfsH7KVCX0PyNY078I4A0qm3kqGu3RYVk=";
32 };
33
34 patches = lib.optionals stdenv.hostPlatform.isLinux [
35 (replaceVars ./paths.patch {
36 xauth = lib.getExe xorg.xauth;
37 xdpyinfo = lib.getExe xorg.xdpyinfo;
38 })
39 ];
40
41 build-system = [ setuptools ];
42
43 doCheck = stdenv.hostPlatform.isLinux;
44
45 nativeCheckInputs = [
46 easyprocess
47 entrypoint2
48 pillow
49 psutil
50 pytest-timeout
51 pytestCheckHook
52 (vncdo.overridePythonAttrs { doCheck = false; })
53 xorg.xorgserver
54 xorg.xmessage
55 xorg.xvfb
56 ];
57
58 pytestFlags = [ "-v" ];
59
60 meta = with lib; {
61 description = "Python wrapper for Xvfb, Xephyr and Xvnc";
62 homepage = "https://github.com/ponty/pyvirtualdisplay";
63 license = licenses.bsdOriginal;
64 maintainers = with maintainers; [ layus ];
65 };
66}