blob: ab150e657a10572cebbb02570329248090200935 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
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 ];
};
}
|