From 2be1adac5740debd251da5a35608a8b5b9054642 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 20 Nov 2021 22:59:48 +0100 Subject: [PATCH 1/5] python3Packages.python-google-nest: init at 5.1.1 --- .../python-google-nest/default.nix | 37 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 39 insertions(+) create mode 100644 pkgs/development/python-modules/python-google-nest/default.nix diff --git a/pkgs/development/python-modules/python-google-nest/default.nix b/pkgs/development/python-modules/python-google-nest/default.nix new file mode 100644 index 000000000000..a1e612e1f74e --- /dev/null +++ b/pkgs/development/python-modules/python-google-nest/default.nix @@ -0,0 +1,37 @@ +{ lib +, buildPythonPackage +, fetchPypi +, pythonOlder +, requests_oauthlib +}: + +buildPythonPackage rec { + pname = "python-google-nest"; + version = "5.1.1"; + format = "setuptools"; + + disabled = pythonOlder "3.6"; + + src = fetchPypi { + inherit pname version; + sha256 = "y3BOhorVkJ3rFPifNOopLMqk6y1fHX5vxHGiqWvWHhE="; + }; + + propagatedBuildInputs = [ + requests_oauthlib + ]; + + # Project has no tests + doCheck = false; + + pythonImportsCheck = [ + "nest" + ]; + + meta = with lib; { + description = "Python API and command line tool for talking to Nest thermostats"; + homepage = "https://github.com/axlan/python-nest/"; + license = licenses.cc-by-nc-sa-30; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 9798dbfd55ba..102b8b1d2ee9 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -5813,6 +5813,8 @@ in { python-glanceclient = callPackage ../development/python-modules/python-glanceclient { }; + python-google-nest = callPackage ../development/python-modules/python-google-nest { }; + python-heatclient = callPackage ../development/python-modules/python-heatclient { }; python-ipmi = callPackage ../development/python-modules/python-ipmi { }; From 96901a019cca4fa512f33e4017da87e48881d284 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 20 Nov 2021 23:09:23 +0100 Subject: [PATCH 2/5] python3Packages.google-nest-sdm: init 0.3.9 --- .../google-nest-sdm/default.nix | 51 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 53 insertions(+) create mode 100644 pkgs/development/python-modules/google-nest-sdm/default.nix diff --git a/pkgs/development/python-modules/google-nest-sdm/default.nix b/pkgs/development/python-modules/google-nest-sdm/default.nix new file mode 100644 index 000000000000..c5a7721c5271 --- /dev/null +++ b/pkgs/development/python-modules/google-nest-sdm/default.nix @@ -0,0 +1,51 @@ +{ lib +, aiohttp +, buildPythonPackage +, fetchFromGitHub +, google-auth +, google-auth-oauthlib +, google-cloud-pubsub +, pythonOlder +, requests_oauthlib +, pytest-aiohttp +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "google-nest-sdm"; + version = "0.3.9"; + format = "setuptools"; + + disabled = pythonOlder "3.8"; + + src = fetchFromGitHub { + owner = "allenporter"; + repo = "python-google-nest-sdm"; + rev = version; + sha256 = "+ACuhw0cgIsEJZWNynobrx21rt/LVrBzTt6ZO53gWU0="; + }; + + propagatedBuildInputs = [ + aiohttp + google-auth + google-auth-oauthlib + google-cloud-pubsub + requests_oauthlib + ]; + + checkInputs = [ + pytest-aiohttp + pytestCheckHook + ]; + + pythonImportsCheck = [ + "google_nest_sdm" + ]; + + meta = with lib; { + description = "Python module for Google Nest Device Access using the Smart Device Management API"; + homepage = "https://github.com/allenporter/python-google-nest-sdm"; + license = licenses.asl20; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 102b8b1d2ee9..0118ecc4ec3d 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -3264,6 +3264,8 @@ in { google-i18n-address = callPackage ../development/python-modules/google-i18n-address { }; + google-nest-sdm = callPackage ../development/python-modules/google-nest-sdm { }; + googlemaps = callPackage ../development/python-modules/googlemaps { }; google-pasta = callPackage ../development/python-modules/google-pasta { }; From 7afd674bfa4d8459728915d06d0388d4379e6316 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 20 Nov 2021 23:10:20 +0100 Subject: [PATCH 3/5] 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 1d10fa3f796e..ff1e664889c2 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -560,7 +560,7 @@ "neato" = ps: with ps; [ aiohttp-cors pybotvac ]; "nederlandse_spoorwegen" = ps: with ps; [ nsapi ]; "ness_alarm" = ps: with ps; [ nessclient ]; - "nest" = ps: with ps; [ aiohttp-cors ha-ffmpeg python-nest ]; # missing inputs: google-nest-sdm + "nest" = ps: with ps; [ aiohttp-cors google-nest-sdm ha-ffmpeg python-nest ]; "netatmo" = ps: with ps; [ pyturbojpeg aiohttp-cors hass-nabucasa pyatmo ]; "netdata" = ps: with ps; [ netdata ]; "netgear" = ps: with ps; [ ]; # missing inputs: pynetgear From 717ddc6c38c60cce70088920f1f8785fafa50ffe Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 20 Nov 2021 23:12:11 +0100 Subject: [PATCH 4/5] home-assistant: enable nest tests --- pkgs/servers/home-assistant/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/servers/home-assistant/default.nix b/pkgs/servers/home-assistant/default.nix index 0ee7fcd6b315..0f2142d1370a 100644 --- a/pkgs/servers/home-assistant/default.nix +++ b/pkgs/servers/home-assistant/default.nix @@ -537,6 +537,7 @@ in with py.pkgs; buildPythonApplication rec { "namecheapdns" "neato" "ness_alarm" + "nest" "netatmo" "nexia" "nightscout" From c9fe608abda6af4d91bb6223b7686a2882e4eb5d Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 21 Nov 2021 16:48:48 +0100 Subject: [PATCH 5/5] python3Packages.google-nest-sdm: 0.3.9 -> 0.4.0 --- pkgs/development/python-modules/google-nest-sdm/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/google-nest-sdm/default.nix b/pkgs/development/python-modules/google-nest-sdm/default.nix index c5a7721c5271..befc07ca37df 100644 --- a/pkgs/development/python-modules/google-nest-sdm/default.nix +++ b/pkgs/development/python-modules/google-nest-sdm/default.nix @@ -13,7 +13,7 @@ buildPythonPackage rec { pname = "google-nest-sdm"; - version = "0.3.9"; + version = "0.4.0"; format = "setuptools"; disabled = pythonOlder "3.8"; @@ -22,7 +22,7 @@ buildPythonPackage rec { owner = "allenporter"; repo = "python-google-nest-sdm"; rev = version; - sha256 = "+ACuhw0cgIsEJZWNynobrx21rt/LVrBzTt6ZO53gWU0="; + sha256 = "sha256-mm1FhR10asxJI8MQfQipqmQbHQfO3z49jpnnrz38Clo="; }; propagatedBuildInputs = [