From a16ce1577e3577b63559106e8ee26cab0d28a935 Mon Sep 17 00:00:00 2001 From: Pyrox Date: Mon, 29 Jul 2024 17:07:47 -0400 Subject: [PATCH 1/2] python312Packages.py-ccm15: init at 0.0.9 --- .../python-modules/py-ccm15/default.nix | 45 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 47 insertions(+) create mode 100644 pkgs/development/python-modules/py-ccm15/default.nix diff --git a/pkgs/development/python-modules/py-ccm15/default.nix b/pkgs/development/python-modules/py-ccm15/default.nix new file mode 100644 index 000000000000..aa4ccf9928e2 --- /dev/null +++ b/pkgs/development/python-modules/py-ccm15/default.nix @@ -0,0 +1,45 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + pytestCheckHook, + setuptools, + httpx, + xmltodict, + aiohttp, +}: + +buildPythonPackage { + pname = "py-ccm15"; + version = "0.0.9"; + pyproject = true; + + src = fetchFromGitHub { + owner = "ocalvo"; + repo = "py-ccm15"; + # Upstream does not have a tag for this release and this is the exact release commit + # Therefore it should not be marked unstable + # upstream issue: https://github.com/ocalvo/py-ccm15/issues/10 + rev = "3891d840e69d241c85bf9486e7fe0bb3c7443980"; + hash = "sha256-I2/AdG07PAvuC8rQKOIAUk7u3pJpANMaFpvEsejWeBU="; + }; + + build-system = [ setuptools ]; + + dependencies = [ + httpx + xmltodict + aiohttp + ]; + + nativeCheckInputs = [ pytestCheckHook ]; + + pythonImportsCheck = [ "ccm15" ]; + + meta = { + description = "Python Library to access a Midea CCM15 data converter"; + homepage = "https://github.com/ocalvo/py-ccm15"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ pyrox0 ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 45a878a6b735..8f5a07dabce6 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -9246,6 +9246,8 @@ self: super: with self; { py-aosmith = callPackage ../development/python-modules/py-aosmith { }; + py-ccm15 = callPackage ../development/python-modules/py-ccm15 { }; + py-deprecate = callPackage ../development/python-modules/py-deprecate { }; py-ecc = callPackage ../development/python-modules/py-ecc { }; From ca6ede4a1d8cd365892960c4025c126be90a5a6c Mon Sep 17 00:00:00 2001 From: Pyrox Date: Mon, 29 Jul 2024 17:07:55 -0400 Subject: [PATCH 2/2] home-assistant: support ccm15 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 1409778d625e..c6193e2d2800 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -629,7 +629,8 @@ zeroconf ]; "ccm15" = ps: with ps; [ - ]; # missing inputs: py-ccm15 + py-ccm15 + ]; "cert_expiry" = ps: with ps; [ ]; "channels" = ps: with ps; [ @@ -5334,6 +5335,7 @@ "camera" "canary" "cast" + "ccm15" "cert_expiry" "clicksend_tts" "climate"