1{ lib
2, aiohttp
3, aioresponses
4, buildPythonPackage
5, fetchFromGitHub
6, orjson
7, pytest-asyncio
8, pytest-error-for-skips
9, pytestCheckHook
10, pythonOlder
11}:
12
13buildPythonPackage rec {
14 pname = "nextdns";
15 version = "2.0.1";
16 format = "setuptools";
17
18 disabled = pythonOlder "3.10";
19
20 src = fetchFromGitHub {
21 owner = "bieniu";
22 repo = "nextdns";
23 rev = "refs/tags/${version}";
24 hash = "sha256-NJjnk/FadD4QUqPYxbbS7gsIKVxwR5tpnBth1HFLkr0=";
25 };
26
27 propagatedBuildInputs = [
28 aiohttp
29 orjson
30 ];
31
32 nativeCheckInputs = [
33 aioresponses
34 pytest-asyncio
35 pytest-error-for-skips
36 pytestCheckHook
37 ];
38
39 pythonImportsCheck = [
40 "nextdns"
41 ];
42
43 meta = with lib; {
44 description = "Module for the NextDNS API";
45 homepage = "https://github.com/bieniu/nextdns";
46 changelog = "https://github.com/bieniu/nextdns/releases/tag/${version}";
47 license = licenses.asl20;
48 maintainers = with maintainers; [ fab ];
49 };
50}