2022-06-16 17:23:12 +00:00
|
|
|
{ lib
|
|
|
|
, aiohttp
|
|
|
|
, aresponses
|
2024-01-02 11:29:13 +00:00
|
|
|
, async-timeout
|
2022-06-16 17:23:12 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, poetry-core
|
|
|
|
, pytest-asyncio
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
2024-01-02 11:29:13 +00:00
|
|
|
, syrupy
|
2022-06-16 17:23:12 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "python-homewizard-energy";
|
2024-02-29 20:09:43 +00:00
|
|
|
version = "4.3.1";
|
2024-02-07 01:22:34 +00:00
|
|
|
pyproject = true;
|
2022-06-16 17:23:12 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.9";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "DCSBL";
|
2024-01-02 11:29:13 +00:00
|
|
|
repo = "python-homewizard-energy";
|
2022-08-12 12:06:08 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-02-29 20:09:43 +00:00
|
|
|
hash = "sha256-LpxXTzUb+N15lGno3pAhRSEJCb4NmwBcGQ/PshI9gYA=";
|
2022-06-16 17:23:12 +00:00
|
|
|
};
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
2024-02-07 01:22:34 +00:00
|
|
|
--replace-fail 'version = "0.0.0"' 'version = "${version}"'
|
2024-01-02 11:29:13 +00:00
|
|
|
'';
|
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
poetry-core
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
aiohttp
|
2024-01-02 11:29:13 +00:00
|
|
|
async-timeout
|
2022-06-16 17:23:12 +00:00
|
|
|
];
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
__darwinAllowLocalNetworking = true;
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-06-16 17:23:12 +00:00
|
|
|
aresponses
|
|
|
|
pytest-asyncio
|
|
|
|
pytestCheckHook
|
2024-01-02 11:29:13 +00:00
|
|
|
syrupy
|
2022-06-16 17:23:12 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"homewizard_energy"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Library to communicate with HomeWizard Energy devices";
|
2024-01-02 11:29:13 +00:00
|
|
|
homepage = "https://github.com/homewizard/python-homewizard-energy";
|
|
|
|
changelog = "https://github.com/homewizard/python-homewizard-energy/releases/tag/v${version}";
|
2022-06-16 17:23:12 +00:00
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|