1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 pythonOlder, 6 7 # build-system 8 poetry-core, 9 10 # dependencies 11 aiohttp, 12 yarl, 13 mashumaro, 14 orjson, 15 16 # tests 17 pytestCheckHook, 18 aioresponses, 19 pytest-asyncio, 20 syrupy, 21}: 22 23buildPythonPackage rec { 24 pname = "python-homeassistant-analytics"; 25 version = "0.6.0"; 26 pyproject = true; 27 28 disabled = pythonOlder "3.11"; 29 30 src = fetchFromGitHub { 31 owner = "joostlek"; 32 repo = "python-homeassistant-analytics"; 33 rev = "refs/tags/v${version}"; 34 hash = "sha256-uGi72UCIIvb5XZl7RkiAiR/TS+5VCpyvZfBsmlPzQEs="; 35 }; 36 37 postPatch = '' 38 substituteInPlace pyproject.toml \ 39 --replace-fail "--cov" "" 40 ''; 41 42 build-system = [ poetry-core ]; 43 44 dependencies = [ 45 aiohttp 46 yarl 47 mashumaro 48 orjson 49 ]; 50 51 nativeCheckInputs = [ 52 pytestCheckHook 53 aioresponses 54 pytest-asyncio 55 syrupy 56 ]; 57 58 pythonImportsCheck = [ "python_homeassistant_analytics" ]; 59 60 meta = with lib; { 61 changelog = "https://github.com/joostlek/python-homeassistant-analytics/releases/tag/v${version}"; 62 description = "Asynchronous Python client for Homeassistant Analytics"; 63 homepage = "https://github.com/joostlek/python-homeassistant-analytics 64"; 65 license = licenses.mit; 66 maintainers = with maintainers; [ jamiemagee ]; 67 }; 68}