c7cb07f092
GitOrigin-RevId: 1536926ef5621b09bba54035ae2bb6d806d72ac8
70 lines
1.2 KiB
Nix
70 lines
1.2 KiB
Nix
{ lib
|
|
, buildPythonPackage
|
|
, fetchFromGitHub
|
|
, pythonOlder
|
|
|
|
# build-system
|
|
, cython_3
|
|
, setuptools
|
|
|
|
# dependencies
|
|
, aiohappyeyeballs
|
|
, async-timeout
|
|
, chacha20poly1305-reuseable
|
|
, noiseprotocol
|
|
, protobuf
|
|
, zeroconf
|
|
|
|
# tests
|
|
, mock
|
|
, pytest-asyncio
|
|
, pytestCheckHook
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "aioesphomeapi";
|
|
version = "21.0.2";
|
|
pyproject = true;
|
|
|
|
disabled = pythonOlder "3.9";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "esphome";
|
|
repo = pname;
|
|
rev = "refs/tags/v${version}";
|
|
hash = "sha256-uNVf0wnqVntjTxkNTilvb0v6h3VBCjd91wbLQJ6q71g=";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
setuptools
|
|
cython_3
|
|
];
|
|
|
|
propagatedBuildInputs = [
|
|
aiohappyeyeballs
|
|
chacha20poly1305-reuseable
|
|
noiseprotocol
|
|
protobuf
|
|
zeroconf
|
|
] ++ lib.optionals (pythonOlder "3.11") [
|
|
async-timeout
|
|
];
|
|
|
|
nativeCheckInputs = [
|
|
mock
|
|
pytest-asyncio
|
|
pytestCheckHook
|
|
];
|
|
|
|
pythonImportsCheck = [
|
|
"aioesphomeapi"
|
|
];
|
|
|
|
meta = with lib; {
|
|
description = "Python Client for ESPHome native API";
|
|
homepage = "https://github.com/esphome/aioesphomeapi";
|
|
changelog = "https://github.com/esphome/aioesphomeapi/releases/tag/v${version}";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ fab hexa ];
|
|
};
|
|
}
|