From cafb7b80a9d7851d2555e6cb41ae124540cd1ffa Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 30 Oct 2024 15:18:58 +0100 Subject: [PATCH 1/2] python312Packages.melnor-bluetooth: init at 0.0.25 Module to interact with Melnor and Eden bluetooth watering timers https://github.com/vanstinator/melnor-bluetooth --- .../melnor-bluetooth/default.nix | 64 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 66 insertions(+) create mode 100644 pkgs/development/python-modules/melnor-bluetooth/default.nix diff --git a/pkgs/development/python-modules/melnor-bluetooth/default.nix b/pkgs/development/python-modules/melnor-bluetooth/default.nix new file mode 100644 index 000000000000..649433f99795 --- /dev/null +++ b/pkgs/development/python-modules/melnor-bluetooth/default.nix @@ -0,0 +1,64 @@ +{ + lib, + aioconsole, + bleak-retry-connector, + bleak, + buildPythonPackage, + deprecated, + fetchFromGitHub, + freezegun, + poetry-core, + poetry-dynamic-versioning, + pytest-asyncio, + pytestCheckHook, + pythonOlder, + syrupy, + tzdata, + tzlocal, +}: + +buildPythonPackage rec { + pname = "melnor-bluetooth"; + version = "0.0.25"; + pyproject = true; + + disabled = pythonOlder "3.9"; + + src = fetchFromGitHub { + owner = "vanstinator"; + repo = "melnor-bluetooth"; + rev = "refs/tags/v${version}"; + hash = "sha256-BQKXQrPT/+qm9cRO7pfScPwW0iwdhliTfX4XJ/kRQG0="; + }; + + build-system = [ + poetry-core + poetry-dynamic-versioning + ]; + + dependencies = [ + aioconsole + bleak + bleak-retry-connector + deprecated + tzdata + tzlocal + ]; + + nativeCheckInputs = [ + freezegun + pytest-asyncio + pytestCheckHook + syrupy + ]; + + pythonImportsCheck = [ "melnor_bluetooth" ]; + + meta = { + description = "Module to interact with Melnor and Eden bluetooth watering timers"; + homepage = "https://github.com/vanstinator/melnor-bluetooth"; + changelog = "https://github.com/vanstinator/melnor-bluetooth/releases/tag/v${version}"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index f76e09765315..ea44aba2beae 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -7845,6 +7845,8 @@ self: super: with self; { meld3 = callPackage ../development/python-modules/meld3 { }; + melnor-bluetooth = callPackage ../development/python-modules/melnor-bluetooth { }; + memestra = callPackage ../development/python-modules/memestra { }; memory-allocator = callPackage ../development/python-modules/memory-allocator { }; From 78c09e1a687a8bb3772182363712fdbdccb29e9f Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 30 Oct 2024 15:20:48 +0100 Subject: [PATCH 2/2] home-assistant: update component-packages --- 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 c6a244127429..da29be0cfe04 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -2597,13 +2597,14 @@ hassil home-assistant-intents ifaddr + melnor-bluetooth mutagen pymicro-vad pyserial pyspeex-noise pyudev zeroconf - ]; # missing inputs: melnor-bluetooth + ]; "meraki" = ps: with ps; [ ]; "mercury_nz" = ps: with ps; [ @@ -5443,6 +5444,7 @@ "media_player" "media_source" "melcloud" + "melnor" "meraki" "met" "met_eireann"