1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, aiohttp
5, pythonOlder
6, requests
7, websocket-client
8, websockets
9}:
10
11buildPythonPackage rec {
12 pname = "sense-energy";
13 version = "0.10.4";
14 format = "setuptools";
15
16 disabled = pythonOlder "3.7";
17
18 src = fetchFromGitHub {
19 owner = "scottbonline";
20 repo = "sense";
21 rev = version;
22 hash = "sha256-yflI17lLZMXXB0ye+jz3VWWMdZtcBTwbg8deA4ENmWw=";
23 };
24
25 propagatedBuildInputs = [
26 aiohttp
27 requests
28 websocket-client
29 websockets
30 ];
31
32 # no tests implemented
33 doCheck = false;
34
35 pythonImportsCheck = [
36 "sense_energy"
37 ];
38
39 meta = with lib; {
40 description = "API for the Sense Energy Monitor";
41 homepage = "https://github.com/scottbonline/sense";
42 license = licenses.mit;
43 maintainers = with maintainers; [ dotlambda ];
44 };
45}