1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, pytest-mock
5, pytestCheckHook
6, pythonOlder
7, requests
8, setuptools-scm
9, websocket-client
10, zeroconf
11}:
12
13buildPythonPackage rec {
14 pname = "devolo-home-control-api";
15 version = "0.18.3";
16 disabled = pythonOlder "3.6";
17
18 src = fetchFromGitHub {
19 owner = "2Fake";
20 repo = "devolo_home_control_api";
21 rev = "v${version}";
22 hash = "sha256-4AyC1DDYtKl8SwJf75BbzoOAhbZXmBZ05ma9YmLzksM=";
23 };
24
25 SETUPTOOLS_SCM_PRETEND_VERSION = version;
26
27 nativeBuildInputs = [
28 setuptools-scm
29 ];
30
31 propagatedBuildInputs = [
32 requests
33 zeroconf
34 websocket-client
35 ];
36
37 nativeCheckInputs = [
38 pytestCheckHook
39 pytest-mock
40 ];
41
42 # Disable test that requires network access
43 disabledTests = [
44 "test__on_pong"
45 "TestMprm"
46 ];
47
48 pythonImportsCheck = [ "devolo_home_control_api" ];
49
50 meta = with lib; {
51 description = "Python library to work with devolo Home Control";
52 homepage = "https://github.com/2Fake/devolo_home_control_api";
53 license = with licenses; [ gpl3Only ];
54 maintainers = with maintainers; [ fab ];
55 };
56}