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,
|
|
|
|
setuptools,
|
2021-04-08 16:26:57 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "yalexs";
|
2024-05-15 15:35:15 +00:00
|
|
|
version = "3.1.0";
|
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-05-15 15:35:15 +00:00
|
|
|
hash = "sha256-+Sn+d6CuxIUEDLkDvcq7OT3AumElJFfWCwM02LPIeyg=";
|
2021-04-08 16:26:57 +00:00
|
|
|
};
|
|
|
|
|
2024-02-29 20:09:43 +00:00
|
|
|
postPatch = ''
|
|
|
|
# Not used requirement
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace-fail '"vol",' ""
|
|
|
|
'';
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
build-system = [ setuptools ];
|
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-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 ];
|
|
|
|
};
|
|
|
|
}
|