1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 pytest-freezer,
6 pytest-mock,
7 pytestCheckHook,
8 python-dateutil,
9 pythonOlder,
10 requests,
11 requests-mock,
12 setuptools-scm,
13 setuptools,
14 syrupy,
15 websocket-client,
16 zeroconf,
17}:
18
19buildPythonPackage rec {
20 pname = "devolo-home-control-api";
21 version = "0.19.0";
22 pyproject = true;
23
24 disabled = pythonOlder "3.12";
25
26 src = fetchFromGitHub {
27 owner = "2Fake";
28 repo = "devolo_home_control_api";
29 tag = "v${version}";
30 hash = "sha256-eBJ6hdxUplc1poh7WFACWkyfReSdRSyCEoq2A6Sudgg=";
31 };
32
33 build-system = [
34 setuptools
35 setuptools-scm
36 ];
37
38 dependencies = [
39 python-dateutil
40 requests
41 zeroconf
42 websocket-client
43 ];
44
45 nativeCheckInputs = [
46 pytest-freezer
47 pytest-mock
48 pytestCheckHook
49 requests-mock
50 syrupy
51 ];
52
53 pytestFlags = [
54 "--snapshot-update"
55 ];
56
57 disabledTests = [
58 # Disable test that requires network access
59 "test__on_pong"
60 "TestMprm"
61 ];
62
63 pythonImportsCheck = [ "devolo_home_control_api" ];
64
65 meta = with lib; {
66 description = "Python library to work with devolo Home Control";
67 homepage = "https://github.com/2Fake/devolo_home_control_api";
68 changelog = "https://github.com/2Fake/devolo_home_control_api/blob/${src.tag}/docs/CHANGELOG.md";
69 license = licenses.gpl3Only;
70 maintainers = with maintainers; [ fab ];
71 };
72}