From 96800982d9f27f72e6aa8600658108fbd1a773c4 Mon Sep 17 00:00:00 2001 From: Jamie Magee Date: Fri, 15 Aug 2025 22:59:13 -0700 Subject: [PATCH 1/2] python3Packages.pilight: init at 0.1.1 --- .../python-modules/pilight/default.nix | 39 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 41 insertions(+) create mode 100644 pkgs/development/python-modules/pilight/default.nix diff --git a/pkgs/development/python-modules/pilight/default.nix b/pkgs/development/python-modules/pilight/default.nix new file mode 100644 index 000000000000..ab150e657a10 --- /dev/null +++ b/pkgs/development/python-modules/pilight/default.nix @@ -0,0 +1,39 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + pytestCheckHook, + setuptools, +}: + +buildPythonPackage rec { + pname = "pilight"; + version = "0.1.1"; + pyproject = true; + + src = fetchFromGitHub { + owner = "DavidLP"; + repo = "pilight"; + tag = version; + hash = "sha256-8KLEeyf1uwYjsBfIoi+736cu+We6OjLvptCXL539bDA="; + }; + + build-system = [ setuptools ]; + + nativeCheckInputs = [ pytestCheckHook ]; + + postPatch = '' + substituteInPlace pilight/test/test_client.py \ + --replace-fail "from mock import patch, call" "from unittest.mock import patch, call" \ + --replace-fail "pilight_client.isAlive()" "pilight_client.is_alive()" + ''; + + pythonImportsCheck = [ "pilight" ]; + + meta = { + description = "Pure python module to connect to a pilight daemon to send and receive commands"; + homepage = "https://github.com/DavidLP/pilight"; + license = lib.licenses.mit; + maintainers = [ lib.maintainers.jamiemagee ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 74ca9d727350..3cc8a89ddf4a 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -11628,6 +11628,8 @@ self: super: with self; { pikepdf = callPackage ../development/python-modules/pikepdf { }; + pilight = callPackage ../development/python-modules/pilight { }; + pilkit = callPackage ../development/python-modules/pilkit { }; pillow = callPackage ../development/python-modules/pillow { From 2fed4c1cdfcfc8922bdf55572e262a0172e72739 Mon Sep 17 00:00:00 2001 From: Jamie Magee Date: Fri, 15 Aug 2025 22:59:54 -0700 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 c32e542c7e50..100badeca63e 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -4456,7 +4456,8 @@ ]; "pilight" = ps: with ps; [ - ]; # missing inputs: pilight + pilight + ]; "pinecil" = ps: with ps; [ ]; @@ -7505,6 +7506,7 @@ "philips_js" "pi_hole" "picnic" + "pilight" "ping" "pjlink" "plaato"