1{
2 lib,
3 aiohttp,
4 buildPythonPackage,
5 colorlog,
6 fetchFromGitHub,
7 pint,
8 poetry-core,
9 pytestCheckHook,
10 pythonOlder,
11}:
12
13buildPythonPackage rec {
14 pname = "aiocomelit";
15 version = "0.9.1";
16 pyproject = true;
17
18 disabled = pythonOlder "3.10";
19
20 src = fetchFromGitHub {
21 owner = "chemelli74";
22 repo = "aiocomelit";
23 rev = "refs/tags/v${version}";
24 hash = "sha256-3r9DyvzqtQ88VwKCghAC9nn5kXbBzbR8drTFTnWC/bM=";
25 };
26
27 postPatch = ''
28 substituteInPlace pyproject.toml \
29 --replace-fail " --cov=aiocomelit --cov-report=term-missing:skip-covered" ""
30 '';
31
32 nativeBuildInputs = [ poetry-core ];
33
34 propagatedBuildInputs = [
35 aiohttp
36 pint
37 ];
38
39 nativeCheckInputs = [
40 colorlog
41 pytestCheckHook
42 ];
43
44 pythonImportsCheck = [ "aiocomelit" ];
45
46 meta = with lib; {
47 description = "Library to control Comelit Simplehome";
48 homepage = "https://github.com/chemelli74/aiocomelit";
49 changelog = "https://github.com/chemelli74/aiocomelit/blob/${version}/CHANGELOG.md";
50 license = licenses.asl20;
51 maintainers = with maintainers; [ fab ];
52 };
53}