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-01-02 11:29:13 +00:00
|
|
|
version = "4.1.1";
|
2022-06-16 17:23:12 +00:00
|
|
|
format = "pyproject";
|
|
|
|
|
|
|
|
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-01-02 11:29:13 +00:00
|
|
|
hash = "sha256-p7uwodjC+wTGrlKf4i4ZRTPg9Qh9krsmwPpWNdF6J4U=";
|
2022-06-16 17:23:12 +00:00
|
|
|
};
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
|
|
|
--replace 'version = "0.0.0"' 'version = "${version}"'
|
|
|
|
'';
|
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|