1{ 2 lib, 3 aiohttp, 4 aresponses, 5 buildPythonPackage, 6 fetchFromGitHub, 7 poetry-core, 8 pytest-asyncio, 9 pytest-freezer, 10 pytestCheckHook, 11 pythonOlder, 12 syrupy, 13 yarl, 14}: 15 16buildPythonPackage rec { 17 pname = "energyzero"; 18 version = "2.1.1"; 19 pyproject = true; 20 21 disabled = pythonOlder "3.11"; 22 23 src = fetchFromGitHub { 24 owner = "klaasnicolaas"; 25 repo = "python-energyzero"; 26 tag = "v${version}"; 27 hash = "sha256-KOeYdTruD8AN/NkLEKKJDUB/JkOoQwfAMZkp/RvvUQE="; 28 }; 29 30 postPatch = '' 31 substituteInPlace pyproject.toml \ 32 --replace-fail '"0.0.0"' '"${version}"' \ 33 --replace-fail 'addopts = "--cov"' "" 34 ''; 35 36 build-system = [ poetry-core ]; 37 38 propagatedBuildInputs = [ 39 aiohttp 40 yarl 41 ]; 42 43 nativeCheckInputs = [ 44 aresponses 45 pytest-asyncio 46 pytest-freezer 47 pytestCheckHook 48 syrupy 49 ]; 50 51 pythonImportsCheck = [ "energyzero" ]; 52 53 meta = with lib; { 54 description = "Module for getting the dynamic prices from EnergyZero"; 55 homepage = "https://github.com/klaasnicolaas/python-energyzero"; 56 changelog = "https://github.com/klaasnicolaas/python-energyzero/releases/tag/v${version}"; 57 license = with licenses; [ mit ]; 58 maintainers = with maintainers; [ fab ]; 59 }; 60}