Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / aioesphomeapi / default.nix
blobb22090a7593daf3aa5228b82ea0211fff7f5ad72
1 { lib
2 , buildPythonPackage
3 , fetchFromGitHub
4 , pythonOlder
6 # build-system
7 , cython_3
8 , setuptools
10 # dependencies
11 , async-timeout
12 , chacha20poly1305-reuseable
13 , noiseprotocol
14 , protobuf
15 , zeroconf
17 # tests
18 , mock
19 , pytest-asyncio
20 , pytestCheckHook
23 buildPythonPackage rec {
24   pname = "aioesphomeapi";
25   version = "18.5.2";
26   pyproject = true;
28   disabled = pythonOlder "3.9";
30   src = fetchFromGitHub {
31     owner = "esphome";
32     repo = pname;
33     rev = "refs/tags/v${version}";
34     hash = "sha256-kj4FHsNsGsMxK+EI1jgqBfvldkyAoBkCTGT1yiZMmzY=";
35   };
37   nativeBuildInputs = [
38     setuptools
39     cython_3
40   ];
42   propagatedBuildInputs = [
43     chacha20poly1305-reuseable
44     noiseprotocol
45     protobuf
46     zeroconf
47   ] ++ lib.optionals (pythonOlder "3.11") [
48     async-timeout
49   ];
51   pythonImportsCheck = [
52     "aioesphomeapi"
53   ];
54   nativeCheckInputs = [
55     mock
56     pytest-asyncio
57     pytestCheckHook
58   ];
60   meta = with lib; {
61     changelog = "https://github.com/esphome/aioesphomeapi/releases/tag/v${version}";
62     description = "Python Client for ESPHome native API";
63     homepage = "https://github.com/esphome/aioesphomeapi";
64     license = licenses.mit;
65     maintainers = with maintainers; [ fab hexa ];
66   };