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 = "11.0.0"; 14 format = "setuptools"; 15 16 disabled = pythonOlder "3.8"; 17 18 src = fetchFromGitHub { 19 owner = "home-assistant-libs"; 20 repo = "pytradfri"; 21 rev = "refs/tags/${version}"; 22 hash = "sha256-+OOmoh2HLKiHAqOIH2aB4CZcW/ND/0bszgkcdRMYBlc="; 23 }; 24 25 propagatedBuildInputs = [ 26 pydantic 27 ]; 28 29 passthru.optional-dependencies = { 30 async = [ 31 aiocoap 32 dtlssocket 33 ]; 34 }; 35 36 checkInputs = [ 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 license = licenses.mit; 49 maintainers = with maintainers; [ dotlambda ]; 50 }; 51}