Merge pull request #176143 from fabaff/pyunifiprotect
python310Packages.pyunifiprotect: init at 3.7.0, python310Packages.unifi-discovery: init at 1.1.3
This commit is contained in:
commit
403db8d41c
50
pkgs/development/python-modules/aioshutil/default.nix
Normal file
50
pkgs/development/python-modules/aioshutil/default.nix
Normal file
@ -0,0 +1,50 @@
|
||||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchFromGitHub
|
||||
, pytest-asyncio
|
||||
, pytestCheckHook
|
||||
, pythonOlder
|
||||
, setuptools-scm
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "aioshutil";
|
||||
version = "1.1";
|
||||
format = "pyproject";
|
||||
|
||||
disabled = pythonOlder "3.7";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "kumaraditya303";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
hash = "sha256-CQIzNu1NrGDOh2uVif/EzB5C5t/Y/h9oT56Gp6jrOPQ=";
|
||||
};
|
||||
|
||||
SETUPTOOLS_SCM_PRETEND_VERSION = version;
|
||||
|
||||
nativeBuildInputs = [
|
||||
setuptools-scm
|
||||
];
|
||||
|
||||
checkInputs = [
|
||||
pytest-asyncio
|
||||
pytestCheckHook
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace setup.cfg \
|
||||
--replace " --cov aioshutil --cov-report xml" ""
|
||||
'';
|
||||
|
||||
pythonImportsCheck = [
|
||||
"aioshutil"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Asynchronous version of function of shutil module";
|
||||
homepage = "https://github.com/kumaraditya303/aioshutil";
|
||||
license = with licenses; [ bsd3 ];
|
||||
maintainers = with maintainers; [ fab ];
|
||||
};
|
||||
}
|
85
pkgs/development/python-modules/pyunifiprotect/default.nix
Normal file
85
pkgs/development/python-modules/pyunifiprotect/default.nix
Normal file
@ -0,0 +1,85 @@
|
||||
{ lib
|
||||
, aiohttp
|
||||
, aioshutil
|
||||
, buildPythonPackage
|
||||
, fetchFromGitHub
|
||||
, packaging
|
||||
, pillow
|
||||
, poetry-core
|
||||
, pydantic
|
||||
, pyjwt
|
||||
, pytest-aiohttp
|
||||
, pytest-asyncio
|
||||
, pytest-benchmark
|
||||
, pytest-timeout
|
||||
, pytest-xdist
|
||||
, pytestCheckHook
|
||||
, python-dotenv
|
||||
, pythonOlder
|
||||
, pytz
|
||||
, typer
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "pyunifiprotect";
|
||||
version = "3.7.0";
|
||||
format = "pyproject";
|
||||
|
||||
disabled = pythonOlder "3.9";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "briis";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
hash = "sha256-0adbUKTkbgA4pKrIVFGowD4Wf8brjfkLpfCT/+Mw6vs=";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [
|
||||
aiohttp
|
||||
aioshutil
|
||||
packaging
|
||||
pillow
|
||||
pydantic
|
||||
pyjwt
|
||||
python-dotenv
|
||||
pytz
|
||||
typer
|
||||
];
|
||||
|
||||
checkInputs = [
|
||||
pytest-aiohttp
|
||||
pytest-asyncio
|
||||
pytest-benchmark
|
||||
pytest-timeout
|
||||
pytest-xdist
|
||||
pytestCheckHook
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
# https://github.com/briis/pyunifiprotect/pull/176
|
||||
substituteInPlace setup.cfg \
|
||||
--replace "asyncio" "aiohttp"
|
||||
substituteInPlace pyproject.toml \
|
||||
--replace "--cov=pyunifiprotect --cov-append" ""
|
||||
'';
|
||||
|
||||
pythonImportsCheck = [
|
||||
"pyunifiprotect"
|
||||
];
|
||||
|
||||
pytestFlagsArray = [
|
||||
"--benchmark-disable"
|
||||
];
|
||||
|
||||
disabledTests = [
|
||||
# Tests require ffprobe
|
||||
"test_get_camera_video"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Library for interacting with the Unifi Protect API";
|
||||
homepage = "https://github.com/briis/pyunifiprotect";
|
||||
license = with licenses; [ mit ];
|
||||
maintainers = with maintainers; [ fab ];
|
||||
};
|
||||
}
|
57
pkgs/development/python-modules/unifi-discovery/default.nix
Normal file
57
pkgs/development/python-modules/unifi-discovery/default.nix
Normal file
@ -0,0 +1,57 @@
|
||||
{ lib
|
||||
, aiohttp
|
||||
, aioresponses
|
||||
, buildPythonPackage
|
||||
, fetchFromGitHub
|
||||
, poetry-core
|
||||
, pyroute2
|
||||
, pytest-asyncio
|
||||
, pytestCheckHook
|
||||
, pythonOlder
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "unifi-discovery";
|
||||
version = "1.1.3";
|
||||
format = "pyproject";
|
||||
|
||||
disabled = pythonOlder "3.9";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "bdraco";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
hash = "sha256-++5Rg3cCyH4h6zzEXbsQM5tRnUsnV3RCzuOctcjA/x4=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
poetry-core
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [
|
||||
aiohttp
|
||||
pyroute2
|
||||
];
|
||||
|
||||
checkInputs = [
|
||||
aioresponses
|
||||
pytest-asyncio
|
||||
pytestCheckHook
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace pyproject.toml \
|
||||
--replace "--cov=unifi_discovery --cov-report=term-missing:skip-covered" ""
|
||||
'';
|
||||
|
||||
pythonImportsCheck = [
|
||||
"unifi_discovery"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Module to discover Unifi devices";
|
||||
homepage = "https://github.com/bdraco/unifi-discovery";
|
||||
license = with licenses; [ asl20 ];
|
||||
maintainers = with maintainers; [ fab ];
|
||||
};
|
||||
}
|
@ -2876,7 +2876,9 @@
|
||||
];
|
||||
"unifiprotect" = ps: with ps; [
|
||||
aiohttp-cors
|
||||
]; # missing inputs: pyunifiprotect unifi-discovery
|
||||
pyunifiprotect
|
||||
unifi-discovery
|
||||
];
|
||||
"universal" = ps: with ps; [
|
||||
];
|
||||
"upb" = ps: with ps; [
|
||||
@ -3779,6 +3781,7 @@
|
||||
"ukraine_alarm"
|
||||
"unifi"
|
||||
"unifi_direct"
|
||||
"unifiprotect"
|
||||
"universal"
|
||||
"upb"
|
||||
"upcloud"
|
||||
|
@ -403,6 +403,8 @@ in {
|
||||
|
||||
aioshelly = callPackage ../development/python-modules/aioshelly { };
|
||||
|
||||
aioshutil = callPackage ../development/python-modules/aioshutil { };
|
||||
|
||||
aiosignal = callPackage ../development/python-modules/aiosignal { };
|
||||
|
||||
aioslimproto = callPackage ../development/python-modules/aioslimproto { };
|
||||
@ -8763,6 +8765,8 @@ in {
|
||||
|
||||
pyunifi = callPackage ../development/python-modules/pyunifi { };
|
||||
|
||||
pyunifiprotect = callPackage ../development/python-modules/pyunifiprotect { };
|
||||
|
||||
pyupdate = callPackage ../development/python-modules/pyupdate { };
|
||||
|
||||
pyupgrade = callPackage ../development/python-modules/pyupgrade { };
|
||||
@ -10780,6 +10784,8 @@ in {
|
||||
|
||||
unifi = callPackage ../development/python-modules/unifi { };
|
||||
|
||||
unifi-discovery = callPackage ../development/python-modules/unifi-discovery { };
|
||||
|
||||
unify = callPackage ../development/python-modules/unify { };
|
||||
|
||||
unifiled = callPackage ../development/python-modules/unifiled { };
|
||||
|
Loading…
Reference in New Issue
Block a user