commit
f3d6aa00e5
@ -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 ]; |
||||
}; |
||||
} |
@ -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 ]; |
||||
}; |
||||
} |
@ -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 ]; |
||||
}; |
||||
} |
Loading…
Reference in new issue