Files

64 lines
1.2 KiB
Nix

{
lib,
aiohttp,
aresponses,
buildPythonPackage,
fetchFromGitHub,
pyprojectVersionPatchHook,
pytest-asyncio,
pytest-cov-stub,
pytest-freezer,
pytestCheckHook,
syrupy,
uv-build,
yarl,
}:
buildPythonPackage rec {
pname = "energyzero";
version = "5.1.1";
pyproject = true;
src = fetchFromGitHub {
owner = "klaasnicolaas";
repo = "python-energyzero";
tag = "v${version}";
hash = "sha256-UNY2JZd9ck7SfdGudW7Ujg0MjO/l9OgohzH2yfOeIW8=";
};
postPatch = ''
substituteInPlace pyproject.toml \
--replace-fail 'uv_build>=0.13,<0.14' uv_build
'';
nativeBuildInputs = [
pyprojectVersionPatchHook
];
build-system = [ uv-build ];
dependencies = [
aiohttp
yarl
];
nativeCheckInputs = [
aresponses
pytest-asyncio
pytest-cov-stub
pytest-freezer
pytestCheckHook
syrupy
];
pythonImportsCheck = [ "energyzero" ];
meta = {
description = "Module for getting the dynamic prices from EnergyZero";
homepage = "https://github.com/klaasnicolaas/python-energyzero";
changelog = "https://github.com/klaasnicolaas/python-energyzero/releases/tag/v${version}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ fab ];
};
}