1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5
6 # build-system
7 setuptools,
8
9 # dependencies
10 aiohttp,
11 requests,
12 pytz,
13
14 # tests
15 mock,
16 pytest-aiohttp,
17 pytest-asyncio,
18 pytestCheckHook,
19}:
20
21buildPythonPackage rec {
22 pname = "pyindego";
23 version = "3.2.2";
24 pyproject = true;
25
26 src = fetchFromGitHub {
27 owner = "sander1988";
28 repo = "pyIndego";
29 tag = version;
30 hash = "sha256-x8/MSbn+urmArQCyxZU1JEUyATJsPzp7bflymE+1rkk=";
31 };
32
33 postPatch = ''
34 sed -i "/addopts/d" pytest.ini
35 '';
36
37 build-system = [ setuptools ];
38
39 dependencies = [
40 aiohttp
41 requests
42 pytz
43 ];
44
45 nativeCheckInputs = [
46 mock
47 pytest-aiohttp
48 pytest-asyncio
49 pytestCheckHook
50 ];
51
52 disabledTests = [
53 # Typeerror, presumably outdated tests
54 "test_repr"
55 "test_client_response_errors"
56 "test_update_battery"
57 ];
58
59 pythonImportsCheck = [ "pyIndego" ];
60
61 meta = with lib; {
62 description = "Python interface for Bosch API for lawnmowers";
63 homepage = "https://github.com/sander1988/pyIndego";
64 changelog = "https://github.com/sander1988/pyIndego/blob/${version}/CHANGELOG.md";
65 license = licenses.mit;
66 maintainers = with maintainers; [ hexa ];
67 };
68}