1{
2 lib,
3 aiohttp,
4 buildPythonPackage,
5 fetchFromGitHub,
6 fetchpatch,
7 poetry-core,
8 pytest-aiohttp,
9 pytestCheckHook,
10 pythonOlder,
11}:
12
13buildPythonPackage rec {
14 pname = "aioeafm";
15 version = "1.0.0";
16 pyproject = true;
17
18 disabled = pythonOlder "3.7";
19
20 src = fetchFromGitHub {
21 owner = "Jc2k";
22 repo = "aioeafm";
23 tag = version;
24 hash = "sha256-bL59EPvFd5vjay2sqBPGx+iL5sE/0n/EtR4K7obtDBE=";
25 };
26
27 patches = [
28 # Switch to poetry-core, https://github.com/Jc2k/aioeafm/pull/4
29 (fetchpatch {
30 name = "use-poetry-core.patch";
31 url = "https://github.com/Jc2k/aioeafm/commit/549590e2ed465be40e2406416d89b8a8cd8c6185.patch";
32 hash = "sha256-cG/vQI1XQO8LVvWsHrAj8KlPGRulvO7Ny+k0CKUpPqQ=";
33 })
34 ];
35
36 build-system = [ poetry-core ];
37
38 dependencies = [ aiohttp ];
39
40 doCheck = false; # Failed: async def functions are not natively supported.
41
42 nativeCheckInputs = [
43 pytest-aiohttp
44 pytestCheckHook
45 ];
46
47 pythonImportsCheck = [ "aioeafm" ];
48
49 meta = with lib; {
50 description = "Python client for access the Real Time flood monitoring API";
51 homepage = "https://github.com/Jc2k/aioeafm";
52 changelog = "https://github.com/Jc2k/aioeafm/releases/tag/${version}";
53 license = with licenses; [ asl20 ];
54 maintainers = with maintainers; [ fab ];
55 };
56}