1{
2 lib,
3 aiofiles,
4 asyncio-mqtt,
5 awesomeversion,
6 buildPythonPackage,
7 click,
8 fetchFromGitHub,
9 marshmallow,
10 poetry-core,
11 pyserial-asyncio,
12 pytest-asyncio,
13 pytestCheckHook,
14 pythonOlder,
15}:
16
17buildPythonPackage rec {
18 pname = "aiomysensors";
19 version = "0.3.15";
20 pyproject = true;
21
22 disabled = pythonOlder "3.9";
23
24 src = fetchFromGitHub {
25 owner = "MartinHjelmare";
26 repo = "aiomysensors";
27 rev = "refs/tags/v${version}";
28 hash = "sha256-kgfz8VUTtOFN1hPkNJhPdRUKQn01BJn+92Ez6lgVGbc=";
29 };
30
31 postPatch = ''
32 substituteInPlace pyproject.toml \
33 --replace-fail " --cov=src --cov-report=term-missing:skip-covered" ""
34 '';
35
36 build-system = [ poetry-core ];
37
38 dependencies = [
39 aiofiles
40 asyncio-mqtt
41 awesomeversion
42 click
43 marshmallow
44 pyserial-asyncio
45 ];
46
47 nativeCheckInputs = [
48 pytest-asyncio
49 pytestCheckHook
50 ];
51
52 pythonImportsCheck = [ "aiomysensors" ];
53
54 meta = with lib; {
55 description = "Library to connect to MySensors gateways";
56 homepage = "https://github.com/MartinHjelmare/aiomysensors";
57 changelog = "https://github.com/MartinHjelmare/aiomysensors/releases/tag/v${version}";
58 license = with licenses; [ asl20 ];
59 maintainers = with maintainers; [ fab ];
60 mainProgram = "aiomysensors";
61 };
62}