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