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