1{
2 buildPythonPackage,
3 fetchFromGitHub,
4 lib,
5 poetry-core,
6 pytest-cov-stub,
7 pytest-xdist,
8 pytestCheckHook,
9 requests,
10}:
11
12buildPythonPackage 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}