1{
2 lib,
3 aiohttp,
4 buildPythonPackage,
5 fetchFromGitHub,
6 meteocalc,
7 pytest-aiohttp,
8 pytestCheckHook,
9 pythonOlder,
10 setuptools,
11}:
12
13buildPythonPackage rec {
14 pname = "aioecowitt";
15 version = "2024.2.2";
16 pyproject = true;
17
18 disabled = pythonOlder "3.9";
19
20 src = fetchFromGitHub {
21 owner = "home-assistant-libs";
22 repo = pname;
23 rev = "refs/tags/${version}";
24 hash = "sha256-QfUawUtkNl2molropV8NSU7Kfm/D5/xuaPCjgm2TVOs=";
25 };
26
27 nativeBuildInputs = [ setuptools ];
28
29 propagatedBuildInputs = [
30 aiohttp
31 meteocalc
32 ];
33
34 nativeCheckInputs = [
35 pytest-aiohttp
36 pytestCheckHook
37 ];
38
39 pythonImportsCheck = [ "aioecowitt" ];
40
41 meta = with lib; {
42 description = "Wrapper for the EcoWitt protocol";
43 mainProgram = "ecowitt-testserver";
44 homepage = "https://github.com/home-assistant-libs/aioecowitt";
45 changelog = "https://github.com/home-assistant-libs/aioecowitt/releases/tag/${version}";
46 license = with licenses; [ asl20 ];
47 maintainers = with maintainers; [ fab ];
48 };
49}