1{ 2 lib, 3 aiohttp, 4 aioresponses, 5 buildPythonPackage, 6 fetchFromGitHub, 7 mashumaro, 8 orjson, 9 pytest-aiohttp, 10 pytest-cov-stub, 11 pytest-timeout, 12 pytestCheckHook, 13 pythonOlder, 14 setuptools, 15 yarl, 16}: 17 18buildPythonPackage rec { 19 pname = "aiohasupervisor"; 20 version = "0.3.3b0"; 21 pyproject = true; 22 23 disabled = pythonOlder "3.12"; 24 25 src = fetchFromGitHub { 26 owner = "home-assistant-libs"; 27 repo = "python-supervisor-client"; 28 tag = version; 29 hash = "sha256-Uv9chL9GxP5vJu1P6RB7B2b0pRQMeNtE6t1XFr2tBI4="; 30 }; 31 32 postPatch = '' 33 substituteInPlace pyproject.toml \ 34 --replace-fail 'version = "0.0.0"' 'version = "${version}"' \ 35 --replace-fail "setuptools>=68.0,<80.10" "setuptools" 36 ''; 37 38 build-system = [ setuptools ]; 39 40 dependencies = [ 41 aiohttp 42 mashumaro 43 orjson 44 yarl 45 ]; 46 47 nativeCheckInputs = [ 48 aioresponses 49 pytest-aiohttp 50 pytest-cov-stub 51 pytest-timeout 52 pytestCheckHook 53 ]; 54 55 pythonImportsCheck = [ "aiohasupervisor" ]; 56 57 meta = { 58 description = "Client for Home Assistant Supervisor"; 59 homepage = "https://github.com/home-assistant-libs/python-supervisor-client"; 60 changelog = "https://github.com/home-assistant-libs/python-supervisor-client/releases/tag/${src.tag}"; 61 license = lib.licenses.asl20; 62 maintainers = with lib.maintainers; [ fab ]; 63 }; 64}