git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #127351 from dotlambda/sense-energy-init
commit9f78f858f567c94218b4b9a534044c8c7e93e12b authorSandro <sandro.jaeckel@gmail.com> dateFri 18 Jun 2021, 17:12 (5 years ago) parent6b08a6067ac6fd
4 files changed+45−2
pkgs/development/python-modules/sense-energy/default.nix+39 pkgs/servers/home-assistant/component-packages.nix+2−2 pkgs/servers/home-assistant/default.nix+2 pkgs/top-level/python-packages.nix+2
pkgs/development/python-modules/sense-energy/default.nixnew file+39
@@ -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+}
pkgs/servers/home-assistant/component-packages.nix+2−2
@@ -222,7 +222,7 @@
222222 "emoncms_history" = ps: with ps; [ ];
223223 "emonitor" = ps: with ps; [ aioemonitor ];
224224 "emulated_hue" = ps: with ps; [ aiohttp-cors ];
225− "emulated_kasa" = ps: with ps; [ ]; # missing inputs: sense_energy
225+ "emulated_kasa" = ps: with ps; [ sense-energy ];
226226 "emulated_roku" = ps: with ps; [ ]; # missing inputs: emulated_roku
227227 "enigma2" = ps: with ps; [ openwebifpy ];
228228 "enocean" = ps: with ps; [ ]; # missing inputs: enocean
@@ -733,7 +733,7 @@
733733 "search" = ps: with ps; [ aiohttp-cors ];
734734 "season" = ps: with ps; [ ephem ];
735735 "sendgrid" = ps: with ps; [ sendgrid ];
736− "sense" = ps: with ps; [ ]; # missing inputs: sense_energy
736+ "sense" = ps: with ps; [ sense-energy ];
737737 "sensehat" = ps: with ps; [ ]; # missing inputs: sense-hat
738738 "sensibo" = ps: with ps; [ ]; # missing inputs: pysensibo
739739 "sensor" = ps: with ps; [ sqlalchemy ];
pkgs/servers/home-assistant/default.nix+2
@@ -371,6 +371,7 @@ in with py.pkgs; buildPythonApplication rec {
371371 "elgato"
372372 "emonitor"
373373 "emulated_hue"
374+ "emulated_kasa"
374375 "enphase_envoy"
375376 "esphome"
376377 "everlights"
@@ -596,6 +597,7 @@ in with py.pkgs; buildPythonApplication rec {
596597 "script"
597598 "search"
598599 "season"
600+ "sense"
599601 "sensor"
600602 "sentry"
601603 "sharkiq"
pkgs/top-level/python-packages.nix+2
@@ -7722,6 +7722,8 @@ in {
77227722
77237723 sendgrid = callPackage ../development/python-modules/sendgrid { };
77247724
7725+ sense-energy = callPackage ../development/python-modules/sense-energy { };
7726+
77257727 sentencepiece = callPackage ../development/python-modules/sentencepiece {
77267728 inherit (pkgs) sentencepiece;
77277729 };