From e3f2857596c35a00346908c47bf92daa9602860c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Tue, 6 Feb 2024 15:06:45 -0800 Subject: [PATCH 1/2] python311Packages.py-aosmith: init at 1.0.6 --- .../python-modules/py-aosmith/default.nix | 42 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 44 insertions(+) create mode 100644 pkgs/development/python-modules/py-aosmith/default.nix diff --git a/pkgs/development/python-modules/py-aosmith/default.nix b/pkgs/development/python-modules/py-aosmith/default.nix new file mode 100644 index 000000000000..28faca5e96fb --- /dev/null +++ b/pkgs/development/python-modules/py-aosmith/default.nix @@ -0,0 +1,42 @@ +{ lib +, buildPythonPackage +, pythonOlder +, fetchFromGitHub +, poetry-core +, aiohttp +}: + +buildPythonPackage rec { + pname = "py-aosmith"; + version = "1.0.6"; + pyproject = true; + + disabled = pythonOlder "3.10"; + + src = fetchFromGitHub { + owner = "bdr99"; + repo = "py-aosmith"; + rev = "refs/tags/${version}"; + hash = "sha256-4KODe+urqYMbN0+tNwQnvO3A9Zc/Xdo4uhJErn3BYS4="; + }; + + nativeBuildInputs = [ + poetry-core + ]; + + propagatedBuildInputs = [ + aiohttp + ]; + + pythonImportsCheck = [ "py_aosmith" ]; + + # upstream has no tests + doCheck = false; + + meta = { + description = "Python client library for A. O. Smith water heaters"; + homepage = "https://github.com/bdr99/py-aosmith"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ dotlambda ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 70f3665d5e42..991d272b60b0 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -8567,6 +8567,8 @@ self: super: with self; { python-youtube = callPackage ../development/python-modules/python-youtube { }; + py-aosmith = callPackage ../development/python-modules/py-aosmith { }; + py-deprecate = callPackage ../development/python-modules/py-deprecate { }; py-ecc = callPackage ../development/python-modules/py-ecc { }; From df9510216f94f1b0a29537b6591eaf42f2c09caa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Tue, 6 Feb 2024 15:08:42 -0800 Subject: [PATCH 2/2] home-assistant: support aosmith component --- pkgs/servers/home-assistant/component-packages.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/servers/home-assistant/component-packages.nix b/pkgs/servers/home-assistant/component-packages.nix index 3375151ae042..f5b8ab19c446 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -183,7 +183,8 @@ "anwb_energie" = ps: with ps; [ ]; "aosmith" = ps: with ps; [ - ]; # missing inputs: py-aosmith + py-aosmith + ]; "apache_kafka" = ps: with ps; [ aiokafka ]; @@ -5752,6 +5753,7 @@ "androidtv_remote" "anova" "anthemav" + "aosmith" "apache_kafka" "apcupsd" "api"