1{ 2 lib, 3 aiohttp, 4 aioresponses, 5 buildPythonPackage, 6 fetchFromGitHub, 7 mashumaro, 8 orjson, 9 poetry-core, 10 pytest-asyncio, 11 pytest-cov-stub, 12 pytestCheckHook, 13 pythonOlder, 14 syrupy, 15}: 16 17buildPythonPackage rec { 18 pname = "aioelectricitymaps"; 19 version = "1.1.1"; 20 pyproject = true; 21 22 disabled = pythonOlder "3.11"; 23 24 src = fetchFromGitHub { 25 owner = "jpbede"; 26 repo = "aioelectricitymaps"; 27 tag = "v${version}"; 28 hash = "sha256-6d9StqUMOGWyK5KAY+S0QE0c6Mi+XDUUAyzRt9RG52Q="; 29 }; 30 31 postPatch = '' 32 substituteInPlace pyproject.toml \ 33 --replace-fail 'version = "0.0.0"' 'version = "${version}"' 34 ''; 35 36 build-system = [ poetry-core ]; 37 38 dependencies = [ 39 aiohttp 40 mashumaro 41 orjson 42 ]; 43 44 nativeCheckInputs = [ 45 aioresponses 46 pytest-asyncio 47 pytest-cov-stub 48 pytestCheckHook 49 syrupy 50 ]; 51 52 pythonImportsCheck = [ "aioelectricitymaps" ]; 53 54 # https://github.com/jpbede/aioelectricitymaps/pull/415 55 pytestFlags = [ "--snapshot-update" ]; 56 57 meta = with lib; { 58 description = "Module for interacting with Electricity maps"; 59 homepage = "https://github.com/jpbede/aioelectricitymaps"; 60 changelog = "https://github.com/jpbede/aioelectricitymaps/releases/tag/v${version}"; 61 license = licenses.mit; 62 maintainers = with maintainers; [ fab ]; 63 }; 64}