Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions pkgs/development/python-modules/pilight/default.nix
Original file line number Diff line number Diff line change
@@ -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 ];
};
}
4 changes: 3 additions & 1 deletion pkgs/servers/home-assistant/component-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4456,7 +4456,8 @@
];
"pilight" =
ps: with ps; [
]; # missing inputs: pilight
pilight
];
"pinecil" =
ps: with ps; [
];
Expand Down Expand Up @@ -7505,6 +7506,7 @@
"philips_js"
"pi_hole"
"picnic"
"pilight"
"ping"
"pjlink"
"plaato"
Expand Down
2 changes: 2 additions & 0 deletions pkgs/top-level/python-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Loading