2024-04-21 15:54:59 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
aiofiles,
|
|
|
|
aiohttp,
|
|
|
|
aioresponses,
|
|
|
|
aiounittest,
|
|
|
|
buildPythonPackage,
|
|
|
|
ciso8601,
|
|
|
|
fetchFromGitHub,
|
|
|
|
pubnub,
|
|
|
|
pyjwt,
|
|
|
|
pytestCheckHook,
|
|
|
|
python-dateutil,
|
|
|
|
pythonOlder,
|
|
|
|
requests,
|
|
|
|
requests-mock,
|
2024-06-20 14:57:18 +00:00
|
|
|
poetry-core,
|
|
|
|
typing-extensions,
|
2021-04-08 16:26:57 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "yalexs";
|
2024-07-27 06:49:29 +00:00
|
|
|
version = "6.4.2";
|
2024-02-29 20:09:43 +00:00
|
|
|
pyproject = true;
|
2021-12-21 02:18:32 +00:00
|
|
|
|
2023-02-22 10:55:15 +00:00
|
|
|
disabled = pythonOlder "3.9";
|
2021-04-08 16:26:57 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "bdraco";
|
2024-02-29 20:09:43 +00:00
|
|
|
repo = "yalexs";
|
2023-02-22 10:55:15 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-07-27 06:49:29 +00:00
|
|
|
hash = "sha256-0EvQj+aKzpnehvI5IS3DBaJOp4wYpAWwkkaOLgwtdJs=";
|
2021-04-08 16:26:57 +00:00
|
|
|
};
|
|
|
|
|
2024-02-29 20:09:43 +00:00
|
|
|
postPatch = ''
|
2024-06-20 14:57:18 +00:00
|
|
|
substituteInPlace pyproject.toml \
|
|
|
|
--replace-fail "-v -Wdefault --cov=yalexs --cov-report=term-missing:skip-covered" ""
|
2024-02-29 20:09:43 +00:00
|
|
|
'';
|
|
|
|
|
2024-06-20 14:57:18 +00:00
|
|
|
build-system = [ poetry-core ];
|
2024-02-29 20:09:43 +00:00
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
dependencies = [
|
2021-04-08 16:26:57 +00:00
|
|
|
aiofiles
|
|
|
|
aiohttp
|
2023-05-24 13:37:59 +00:00
|
|
|
ciso8601
|
2021-04-08 16:26:57 +00:00
|
|
|
pubnub
|
2022-02-20 05:27:41 +00:00
|
|
|
pyjwt
|
2021-04-08 16:26:57 +00:00
|
|
|
python-dateutil
|
|
|
|
requests
|
2024-06-20 14:57:18 +00:00
|
|
|
typing-extensions
|
2021-04-08 16:26:57 +00:00
|
|
|
];
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
# aiounittest is not supported on 3.12
|
|
|
|
doCheck = pythonOlder "3.12";
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-04-08 16:26:57 +00:00
|
|
|
aioresponses
|
|
|
|
aiounittest
|
|
|
|
pytestCheckHook
|
|
|
|
requests-mock
|
|
|
|
];
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
pythonImportsCheck = [ "yalexs" ];
|
2021-04-08 16:26:57 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python API for Yale Access (formerly August) Smart Lock and Doorbell";
|
|
|
|
homepage = "https://github.com/bdraco/yalexs";
|
2023-02-22 10:55:15 +00:00
|
|
|
changelog = "https://github.com/bdraco/yalexs/releases/tag/v${version}";
|
2021-04-08 16:26:57 +00:00
|
|
|
license = with licenses; [ mit ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|