1{ 2 lib, 3 aiohttp, 4 aioresponses, 5 buildPythonPackage, 6 fetchFromGitHub, 7 orjson, 8 pytest-aiohttp, 9 pytestCheckHook, 10 pythonOlder, 11 setuptools, 12 wheel, 13}: 14 15buildPythonPackage rec { 16 pname = "pydeconz"; 17 version = "115"; 18 pyproject = true; 19 20 disabled = pythonOlder "3.11"; 21 22 src = fetchFromGitHub { 23 owner = "Kane610"; 24 repo = "deconz"; 25 rev = "refs/tags/v${version}"; 26 hash = "sha256-NjzONVSJ4GEaIeC5ytnTi8JpZY1yIq3LN8vbMy3n0vs="; 27 }; 28 29 postPatch = '' 30 substituteInPlace pyproject.toml \ 31 --replace "--cov=pydeconz --cov-report term-missing" "" \ 32 --replace "setuptools==" "setuptools>=" \ 33 --replace "wheel==" "wheel>=" 34 ''; 35 36 nativeBuildInputs = [ 37 setuptools 38 wheel 39 ]; 40 41 propagatedBuildInputs = [ 42 aiohttp 43 orjson 44 ]; 45 46 nativeCheckInputs = [ 47 aioresponses 48 pytest-aiohttp 49 pytestCheckHook 50 ]; 51 52 pythonImportsCheck = [ "pydeconz" ]; 53 54 meta = with lib; { 55 description = "Python library wrapping the Deconz REST API"; 56 mainProgram = "pydeconz"; 57 homepage = "https://github.com/Kane610/deconz"; 58 changelog = "https://github.com/Kane610/deconz/releases/tag/v${version}"; 59 license = with licenses; [ mit ]; 60 maintainers = with maintainers; [ fab ]; 61 }; 62}