@@ -0,0 +1,77 @@
1+{ lib
2+, aenum
3+, aiohttp
4+, aiohttp-wsgi
5+, async-timeout
6+, buildPythonPackage
7+, fetchFromGitHub
8+, pytestCheckHook
9+, pythonOlder
10+, pytest-aiohttp
11+, pytest-asyncio
12+, requests
13+, websocket_client
14+, websockets
15+}:
16+
17+buildPythonPackage rec {
18+ pname = "homematicip";
19+ version = "1.0.0";
20+ disabled = pythonOlder "3.6";
21+
22+ src = fetchFromGitHub {
23+ owner = "coreGreenberet";
24+ repo = "homematicip-rest-api";
25+ rev = version;
26+ sha256 = "0bgvrjcf10kiqqkbl56sxx3jydd722b08q2j9c8sxpk0qdrmrinv";
27+ };
28+
29+ propagatedBuildInputs = [
30+ aenum
31+ aiohttp
32+ async-timeout
33+ requests
34+ websocket_client
35+ websockets
36+ ];
37+
38+ checkInputs = [
39+ aiohttp-wsgi
40+ pytest-aiohttp
41+ pytest-asyncio
42+ pytestCheckHook
43+ ];
44+
45+ disabledTests = [
46+ # Assert issues with datetime
47+ "test_contact_interface_device"
48+ "test_dimmer"
49+ "test_heating_failure_alert_group"
50+ "test_heating"
51+ "test_humidity_warning_rule_group"
52+ "test_meta_group"
53+ "test_pluggable_switch_measuring"
54+ "test_rotary_handle_sensor"
55+ "test_security_group"
56+ "test_shutter_device"
57+ "test_smoke_detector"
58+ "test_switching_group"
59+ "test_temperature_humidity_sensor_outdoor"
60+ "test_wall_mounted_thermostat_pro"
61+ "test_weather_sensor"
62+ # Random failures
63+ "test_home_getSecurityJournal"
64+ "test_home_unknown_types"
65+ # Requires network access
66+ "test_websocket"
67+ ];
68+
69+ pythonImportsCheck = [ "homematicip" ];
70+
71+ meta = with lib; {
72+ description = "Python module for the homematicIP REST API";
73+ homepage = "https://github.com/coreGreenberet/homematicip-rest-api";
74+ license = with licenses; [ gpl3Only ];
75+ maintainers = with maintainers; [ fab ];
76+ };
77+}