Skip to content

Commit eca7c9b

Browse files
authored
home-assistant: support mfi component (NixOS#375426)
2 parents 51b1755 + 7e70bae commit eca7c9b

File tree

3 files changed

+59
-1
lines changed

3 files changed

+59
-1
lines changed
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
{
2+
buildPythonPackage,
3+
fetchFromGitHub,
4+
lib,
5+
poetry-core,
6+
pytest-cov-stub,
7+
pytest-xdist,
8+
pytestCheckHook,
9+
requests,
10+
}:
11+
12+
buildPythonPackage rec {
13+
pname = "mficlient";
14+
version = "0.5.0";
15+
pyproject = true;
16+
17+
src = fetchFromGitHub {
18+
owner = "uilibs";
19+
repo = "mficlient";
20+
tag = "v${version}";
21+
hash = "sha256-gr9E+3qYD3usK2AAk+autfFQVPL3RDtjG7vvsmZui80=";
22+
};
23+
24+
postPatch = ''
25+
cat >> pyproject.toml << EOF
26+
[build-system]
27+
requires = ["poetry-core"]
28+
build-backend = "poetry.core.masonry.api"
29+
EOF
30+
'';
31+
32+
build-system = [ poetry-core ];
33+
34+
dependencies = [
35+
requests
36+
];
37+
38+
pythonImportsCheck = [ "mficlient" ];
39+
40+
nativeCheckInputs = [
41+
pytest-cov-stub
42+
pytest-xdist
43+
pytestCheckHook
44+
];
45+
46+
meta = {
47+
changelog = "https://github.com/uilibs/mficlient/blob/${src.tag}/CHANGELOG.md";
48+
description = "Remote control client for Ubiquiti's UVC NVR";
49+
homepage = "https://github.com/uilibs/mficlient";
50+
license = lib.licenses.mit;
51+
mainProgram = "mfi";
52+
maintainers = with lib.maintainers; [ dotlambda ];
53+
};
54+
}

pkgs/servers/home-assistant/component-packages.nix

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3419,7 +3419,8 @@
34193419
];
34203420
"mfi" =
34213421
ps: with ps; [
3422-
]; # missing inputs: mficlient
3422+
mficlient
3423+
];
34233424
"microbees" =
34243425
ps: with ps; [
34253426
]; # missing inputs: microBeesPy
@@ -6964,6 +6965,7 @@
69646965
"meteo_france"
69656966
"meteoclimatic"
69666967
"metoffice"
6968+
"mfi"
69676969
"microsoft_face"
69686970
"microsoft_face_detect"
69696971
"microsoft_face_identify"

pkgs/top-level/python-packages.nix

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8158,6 +8158,8 @@ self: super: with self; {
81588158

81598159
mf2py = callPackage ../development/python-modules/mf2py { };
81608160

8161+
mficlient = callPackage ../development/python-modules/mficlient { };
8162+
81618163
mhcflurry = callPackage ../development/python-modules/mhcflurry { };
81628164

81638165
mhcgnomes = callPackage ../development/python-modules/mhcgnomes { };

0 commit comments

Comments
 (0)