1{ ansicolors
2, attrs
3, autobahn
4, buildPythonPackage
5, fetchFromGitHub
6, jinja2
7, lib
8, mock
9, pexpect
10, psutil
11, pyserial
12, pytestCheckHook
13, pytest-dependency
14, pytest-mock
15, pyudev
16, pyusb
17, pyyaml
18, requests
19, setuptools-scm
20, xmodem
21}:
22
23buildPythonPackage rec {
24 pname = "labgrid";
25 version = "0.3.3";
26
27 src = fetchFromGitHub {
28 owner = "labgrid-project";
29 repo = "labgrid";
30 rev = "v${version}";
31 sha256 = "03dg0c5vahrdj1153pmd4653hjisq3cc6niqnwayjx5pjb15ikxk";
32 };
33
34 patches = [
35 # Pyserial within Nixpkgs already includes the necessary fix, remove the
36 # pyserial version check from labgrid.
37 ./0001-serialdriver-remove-pyserial-version-check.patch
38 ];
39
40 nativeBuildInputs = [ setuptools-scm ];
41
42 propagatedBuildInputs = [
43 ansicolors
44 attrs
45 autobahn
46 jinja2
47 pexpect
48 pyserial
49 pyudev
50 pyusb
51 pyyaml
52 requests
53 xmodem
54 ];
55
56 preBuild = ''
57 export SETUPTOOLS_SCM_PRETEND_VERSION="${version}"
58 '';
59
60 checkInputs = [
61 mock
62 psutil
63 pytestCheckHook
64 pytest-mock
65 pytest-dependency
66 ];
67
68 disabledTests = [
69 "docker"
70 "sshmanager"
71 ];
72
73 meta = with lib; {
74 description = "Embedded control & testing library";
75 homepage = "https://labgrid.org";
76 license = licenses.lgpl21Plus;
77 maintainers = with maintainers; [ emantor ];
78 platforms = with platforms; linux;
79 };
80}