Files
nixpkgs/pkgs/development/python-modules/energyzero/default.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

62 lines
1.2 KiB
Nix

{
lib,
aiohttp,
aresponses,
buildPythonPackage,
fetchFromGitHub,
poetry-core,
pytest-asyncio,
pytest-cov-stub,
pytest-freezer,
pytestCheckHook,
pythonOlder,
syrupy,
yarl,
}:
buildPythonPackage rec {
pname = "energyzero";
version = "2.1.1";
pyproject = true;
disabled = pythonOlder "3.11";
src = fetchFromGitHub {
owner = "klaasnicolaas";
repo = "python-energyzero";
tag = "v${version}";
hash = "sha256-KOeYdTruD8AN/NkLEKKJDUB/JkOoQwfAMZkp/RvvUQE=";
};
postPatch = ''
substituteInPlace pyproject.toml \
--replace-fail '"0.0.0"' '"${version}"'
'';
build-system = [ poetry-core ];
propagatedBuildInputs = [
aiohttp
yarl
];
nativeCheckInputs = [
aresponses
pytest-asyncio
pytest-cov-stub
pytest-freezer
pytestCheckHook
syrupy
];
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 ];
};
}