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