blob: d527252626bbdaf8ac286dfc352d50ef196588ec (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
{
lib,
fetchFromGitHub,
fetchpatch,
buildPythonPackage,
setuptools,
pyusb,
pymodbus,
pyserial-asyncio,
pytestCheckHook,
pytest-asyncio,
}:
buildPythonPackage rec {
pname = "python-dali";
version = "0.11";
pyproject = true;
src = fetchFromGitHub {
owner = "sde1000";
repo = "python-dali";
tag = "v${version}";
hash = "sha256-F/D0wyMVCUaL2SCdPKvnGS22tSgDnvUh6rs2ToKON2c=";
};
patches = [
# pymodbus 3.x support
(fetchpatch {
url = "https://github.com/sde1000/python-dali/commit/fe85b8fd9a746d16a03de8fd8c643ef4254d1ccd.patch";
hash = "sha256-bcfr948g7M6m3AQVArcYw9a22jA5eMim+J58iKci55s=";
})
];
build-system = [ setuptools ];
optional-dependencies = {
driver-unipi = [
pyusb
pymodbus
];
driver-serial = [ pyserial-asyncio ];
};
nativeCheckInputs = [
pytestCheckHook
pytest-asyncio
]
++ lib.concatAttrValues optional-dependencies;
pythonImportsCheck = [ "dali" ];
meta = {
description = "IEC 62386 (DALI) lighting control library";
homepage = "https://github.com/sde1000/python-dali";
license = lib.licenses.lgpl3Plus;
maintainers = with lib.maintainers; [ sikmir ];
};
}
|