2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
aiohttp,
|
|
|
|
aresponses,
|
|
|
|
async-timeout,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
poetry-core,
|
|
|
|
pytest-asyncio,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
|
|
|
syrupy,
|
2022-06-16 17:23:12 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "python-homewizard-energy";
|
2024-06-20 14:57:18 +00:00
|
|
|
version = "6.0.0";
|
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-06-20 14:57:18 +00:00
|
|
|
hash = "sha256-tOoNC9MysL5PcIa1N/GjzNy+4+ovZGQznYYDt1o6f4c=";
|
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
|
|
|
'';
|
|
|
|
|
2024-06-20 14:57:18 +00:00
|
|
|
build-system = [ poetry-core ];
|
2022-06-16 17:23:12 +00:00
|
|
|
|
2024-06-20 14:57:18 +00:00
|
|
|
dependencies = [
|
2022-06-16 17:23:12 +00:00
|
|
|
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
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "homewizard_energy" ];
|
2022-06-16 17:23:12 +00:00
|
|
|
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|