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