d5f4a57cbf
GitOrigin-RevId: ce5e4a6ef2e59d89a971bc434ca8ca222b9c7f5e
61 lines
1.2 KiB
Nix
61 lines
1.2 KiB
Nix
{ lib
|
|
, aiohttp
|
|
, aresponses
|
|
, buildPythonPackage
|
|
, fetchFromGitHub
|
|
, poetry-core
|
|
, pytest-asyncio
|
|
, pytest-freezer
|
|
, pytestCheckHook
|
|
, pythonOlder
|
|
, yarl
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "energyzero";
|
|
version = "0.5.0";
|
|
format = "pyproject";
|
|
|
|
disabled = pythonOlder "3.9";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "klaasnicolaas";
|
|
repo = "python-energyzero";
|
|
rev = "refs/tags/v${version}";
|
|
hash = "sha256-UFmchPFAO5azvLKgbKLbPooGhQ4SZHzrCe6jBo0X3bw=";
|
|
};
|
|
|
|
postPatch = ''
|
|
substituteInPlace pyproject.toml \
|
|
--replace '"0.0.0"' '"${version}"' \
|
|
--replace 'addopts = "--cov"' ""
|
|
'';
|
|
|
|
nativeBuildInputs = [
|
|
poetry-core
|
|
];
|
|
|
|
propagatedBuildInputs = [
|
|
aiohttp
|
|
yarl
|
|
];
|
|
|
|
nativeCheckInputs = [
|
|
aresponses
|
|
pytest-asyncio
|
|
pytest-freezer
|
|
pytestCheckHook
|
|
];
|
|
|
|
pythonImportsCheck = [
|
|
"energyzero"
|
|
];
|
|
|
|
meta = with lib; {
|
|
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 = with licenses; [ mit ];
|
|
maintainers = with maintainers; [ fab ];
|
|
};
|
|
}
|