1{ lib
2, buildPythonPackage
3, pythonOlder
4, fetchFromGitHub
5, aiocoap
6, dtlssocket
7, pydantic
8, pytestCheckHook
9}:
10
11buildPythonPackage rec {
12 pname = "pytradfri";
13 version = "13.0.0";
14 format = "setuptools";
15
16 disabled = pythonOlder "3.9";
17
18 src = fetchFromGitHub {
19 owner = "home-assistant-libs";
20 repo = "pytradfri";
21 rev = "refs/tags/${version}";
22 hash = "sha256-CWv3ebDulZuiFP+nJ2Xr7U/HTDFTqA9VYC0USLkpWR0=";
23 };
24
25 propagatedBuildInputs = [
26 pydantic
27 ];
28
29 passthru.optional-dependencies = {
30 async = [
31 aiocoap
32 dtlssocket
33 ];
34 };
35
36 nativeCheckInputs = [
37 pytestCheckHook
38 ]
39 ++ passthru.optional-dependencies.async;
40
41 pythonImportsCheck = [
42 "pytradfri"
43 ];
44
45 meta = with lib; {
46 description = "Python package to communicate with the IKEA Trådfri ZigBee Gateway";
47 homepage = "https://github.com/home-assistant-libs/pytradfri";
48 changelog = "https://github.com/home-assistant-libs/pytradfri/releases/tag/${version}";
49 license = licenses.mit;
50 maintainers = with maintainers; [ dotlambda ];
51 };
52}