From 965f4470a449924e6e2e4ab7b4bbaa75c7551cdf Mon Sep 17 00:00:00 2001 From: Pyrox Date: Sun, 14 Jul 2024 14:39:08 -0400 Subject: [PATCH 1/2] python3Packages.pyaprilaire: init at 0.7.4 --- .../python-modules/pyaprilaire/default.nix | 41 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 43 insertions(+) create mode 100644 pkgs/development/python-modules/pyaprilaire/default.nix diff --git a/pkgs/development/python-modules/pyaprilaire/default.nix b/pkgs/development/python-modules/pyaprilaire/default.nix new file mode 100644 index 000000000000..6c99394c31a3 --- /dev/null +++ b/pkgs/development/python-modules/pyaprilaire/default.nix @@ -0,0 +1,41 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + pytestCheckHook, + crc, + setuptools, + pytest-asyncio, +}: + +buildPythonPackage rec { + pname = "pyaprilaire"; + version = "0.7.4"; + pyproject = true; + + src = fetchFromGitHub { + owner = "chamberlain2007"; + repo = "pyaprilaire"; + rev = "refs/tags/${version}"; + hash = "sha256-+/yQO0JF2nkxaM71iNj6ODB8raM9s4qiLLi6/borcr4="; + }; + + build-system = [ setuptools ]; + + dependencies = [ crc ]; + + pythonImportsCheck = [ "pyaprilaire" ]; + + nativeCheckInputs = [ + pytestCheckHook + pytest-asyncio + ]; + + meta = { + changelog = "https://github.com/chamberlain2007/pyaprilaire/releases/tag/${version}"; + description = "Python library for interacting with Aprilaire thermostats."; + homepage = "https://github.com/chamberlain2007/pyaprilaire"; + 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 960a53e4f1e0..fd5062c253f9 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -9928,6 +9928,8 @@ self: super: with self; { psrpcore = callPackage ../development/python-modules/psrpcore { }; + pyaprilaire = callPackage ../development/python-modules/pyaprilaire { }; + pybars3 = callPackage ../development/python-modules/pybars3 { }; pymeta3 = callPackage ../development/python-modules/pymeta3 { }; From 3f8d5446a12a49dd3c836adec001134101900c83 Mon Sep 17 00:00:00 2001 From: Pyrox Date: Sun, 14 Jul 2024 14:40:15 -0400 Subject: [PATCH 2/2] home-assistant: support pyaprilaire 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 0b0ab903e34e..c8cdeeaaa561 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -209,7 +209,8 @@ apprise ]; "aprilaire" = ps: with ps; [ - ]; # missing inputs: pyaprilaire + pyaprilaire + ]; "aprs" = ps: with ps; [ aprslib geopy @@ -5266,6 +5267,7 @@ "apple_tv" "application_credentials" "apprise" + "aprilaire" "aprs" "aranet" "arcam_fmj"