From 6e64297712c83b18cc26756d6a88cf8da755d5f9 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 20 Nov 2021 22:12:53 +0100 Subject: [PATCH 1/2] python3Packages.oemthermostat: init at 1.1.1 --- .../python-modules/oemthermostat/default.nix | 48 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 50 insertions(+) create mode 100644 pkgs/development/python-modules/oemthermostat/default.nix diff --git a/pkgs/development/python-modules/oemthermostat/default.nix b/pkgs/development/python-modules/oemthermostat/default.nix new file mode 100644 index 000000000000..7a2ecfc26c03 --- /dev/null +++ b/pkgs/development/python-modules/oemthermostat/default.nix @@ -0,0 +1,48 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, pytestCheckHook +, pythonOlder +, requests +, setuptools-scm +}: + +buildPythonPackage rec { + pname = "oemthermostat"; + version = "1.1.1"; + format = "setuptools"; + + disabled = pythonOlder "3.8"; + + src = fetchFromGitHub { + owner = "Cadair"; + repo = "openenergymonitor_thermostat"; + rev = "v${version}"; + sha256 = "vrMw3/X8MtejO1WyUA1DOlfVCPTCPgcK5p3+OlTWcM4="; + }; + + SETUPTOOLS_SCM_PRETEND_VERSION = version; + + nativeBuildInputs = [ + setuptools-scm + ]; + + propagatedBuildInputs = [ + requests + ]; + + checkInputs = [ + pytestCheckHook + ]; + + pythonImportsCheck = [ + "oemthermostat" + ]; + + meta = with lib; { + description = "Python module to interact with OpenEnergyMonitor thermostats"; + homepage = "https://github.com/Cadair/openenergymonitor_thermostat"; + license = licenses.bsd3; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 87b06b9eb148..63252cf21955 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -5289,6 +5289,8 @@ in { ofxtools = callPackage ../development/python-modules/ofxtools { }; + oemthermostat = callPackage ../development/python-modules/oemthermostat { }; + olefile = callPackage ../development/python-modules/olefile { }; omegaconf = callPackage ../development/python-modules/omegaconf { }; From c564882ee8342c3968fad64f4eb086f3fc6d6d00 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 20 Nov 2021 22:13:56 +0100 Subject: [PATCH 2/2] home-assistant: update component-packages --- pkgs/servers/home-assistant/component-packages.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/servers/home-assistant/component-packages.nix b/pkgs/servers/home-assistant/component-packages.nix index a84ad21775fc..d42632f42094 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -597,7 +597,7 @@ "oasa_telematics" = ps: with ps; [ ]; # missing inputs: oasatelematics "obihai" = ps: with ps; [ pyobihai ]; "octoprint" = ps: with ps; [ ]; # missing inputs: pyoctoprintapi - "oem" = ps: with ps; [ ]; # missing inputs: oemthermostat + "oem" = ps: with ps; [ oemthermostat ]; "ohmconnect" = ps: with ps; [ defusedxml ]; "ombi" = ps: with ps; [ pyombi ]; "omnilogic" = ps: with ps; [ omnilogic ];