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