686ce24904
GitOrigin-RevId: ac1f5b72a9e95873d1de0233fddcb56f99884b37
55 lines
1.1 KiB
Nix
55 lines
1.1 KiB
Nix
{ lib
|
|
, buildPythonPackage
|
|
, fetchFromGitHub
|
|
, mock
|
|
, noiseprotocol
|
|
, protobuf
|
|
, pytest-asyncio
|
|
, pytestCheckHook
|
|
, pythonOlder
|
|
, zeroconf
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "aioesphomeapi";
|
|
version = "13.3.1";
|
|
format = "setuptools";
|
|
|
|
disabled = pythonOlder "3.9";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "esphome";
|
|
repo = pname;
|
|
rev = "refs/tags/v${version}";
|
|
hash = "sha256-Pca+SMuUL3XyQpLAL6SOYPnztc95WF2o0v4+5Nc5Nxg=";
|
|
};
|
|
|
|
postPatch = ''
|
|
substituteInPlace requirements.txt \
|
|
--replace "protobuf>=3.12.2,<4.0" "protobuf>=3.12.2"
|
|
'';
|
|
|
|
propagatedBuildInputs = [
|
|
noiseprotocol
|
|
protobuf
|
|
zeroconf
|
|
];
|
|
|
|
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 ];
|
|
};
|
|
}
|