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