1{
2 lib,
3 async-timeout,
4 buildPythonPackage,
5 fetchFromGitHub,
6 pytestCheckHook,
7 pytest-cov-stub,
8 pythonOlder,
9 tenacity,
10}:
11
12buildPythonPackage rec {
13 pname = "aiokef";
14 version = "0.2.17";
15 format = "setuptools";
16 disabled = pythonOlder "3.7";
17
18 src = fetchFromGitHub {
19 owner = "basnijholt";
20 repo = "aiokef";
21 rev = "v${version}";
22 sha256 = "0ms0dwrpj80w55svcppbnp7vyl5ipnjfp1c436k5c7pph4q5pxk9";
23 };
24
25 postPatch = ''
26 substituteInPlace tox.ini \
27 --replace "--mypy" ""
28 '';
29
30 propagatedBuildInputs = [
31 async-timeout
32 tenacity
33 ];
34
35 nativeCheckInputs = [
36 pytestCheckHook
37 pytest-cov-stub
38 ];
39
40 enabledTestPaths = [ "tests" ];
41 pythonImportsCheck = [ "aiokef" ];
42
43 meta = with lib; {
44 description = "Python API for KEF speakers";
45 homepage = "https://github.com/basnijholt/aiokef";
46 license = with licenses; [ mit ];
47 maintainers = with maintainers; [ fab ];
48 };
49}