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 rev = "refs/tags/${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 nativeCheckInputs = [
41 pytest-aiohttp
42 pytestCheckHook
43 ];
44
45 pythonImportsCheck = [ "aioeafm" ];
46
47 meta = with lib; {
48 description = "Python client for access the Real Time flood monitoring API";
49 homepage = "https://github.com/Jc2k/aioeafm";
50 changelog = "https://github.com/Jc2k/aioeafm/releases/tag/${version}";
51 license = with licenses; [ asl20 ];
52 maintainers = with maintainers; [ fab ];
53 };
54}