2021-07-24 12:14:16 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2021-08-05 21:33:18 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, mock
|
2021-09-18 10:52:07 +00:00
|
|
|
, noiseprotocol
|
2021-07-24 12:14:16 +00:00
|
|
|
, protobuf
|
2021-08-05 21:33:18 +00:00
|
|
|
, pytest-asyncio
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
2021-07-24 12:14:16 +00:00
|
|
|
, zeroconf
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "aioesphomeapi";
|
2022-11-04 12:27:35 +00:00
|
|
|
version = "11.4.3";
|
2021-07-24 12:14:16 +00:00
|
|
|
format = "setuptools";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-10-06 18:32:54 +00:00
|
|
|
disabled = pythonOlder "3.9";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-08-05 21:33:18 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "esphome";
|
|
|
|
repo = pname;
|
2022-07-14 12:49:19 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2022-11-04 12:27:35 +00:00
|
|
|
hash = "sha256-g901qWU6aiaV0kLmtWJffXZrOsKjvOGI0TOgQFzuuPA=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-09-30 11:47:45 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace requirements.txt \
|
|
|
|
--replace "protobuf>=3.12.2,<4.0" "protobuf>=3.12.2"
|
|
|
|
'';
|
|
|
|
|
2021-07-24 12:14:16 +00:00
|
|
|
propagatedBuildInputs = [
|
2021-09-18 10:52:07 +00:00
|
|
|
noiseprotocol
|
2021-07-24 12:14:16 +00:00
|
|
|
protobuf
|
|
|
|
zeroconf
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-08-05 21:33:18 +00:00
|
|
|
checkInputs = [
|
|
|
|
mock
|
|
|
|
pytest-asyncio
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-07-24 12:14:16 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"aioesphomeapi"
|
|
|
|
];
|
2020-09-25 04:45:31 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Python Client for ESPHome native API";
|
|
|
|
homepage = "https://github.com/esphome/aioesphomeapi";
|
|
|
|
license = licenses.mit;
|
2021-05-04 21:07:42 +00:00
|
|
|
maintainers = with maintainers; [ fab hexa ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|