1{
2 lib,
3 aiofiles,
4 aiohttp,
5 aioresponses,
6 aiounittest,
7 buildPythonPackage,
8 ciso8601,
9 fetchFromGitHub,
10 pubnub,
11 pyjwt,
12 pytestCheckHook,
13 python-dateutil,
14 pythonOlder,
15 requests,
16 requests-mock,
17 poetry-core,
18 typing-extensions,
19}:
20
21buildPythonPackage rec {
22 pname = "yalexs";
23 version = "6.4.2";
24 pyproject = true;
25
26 disabled = pythonOlder "3.9";
27
28 src = fetchFromGitHub {
29 owner = "bdraco";
30 repo = "yalexs";
31 rev = "refs/tags/v${version}";
32 hash = "sha256-0EvQj+aKzpnehvI5IS3DBaJOp4wYpAWwkkaOLgwtdJs=";
33 };
34
35 postPatch = ''
36 substituteInPlace pyproject.toml \
37 --replace-fail "-v -Wdefault --cov=yalexs --cov-report=term-missing:skip-covered" ""
38 '';
39
40 build-system = [ poetry-core ];
41
42 dependencies = [
43 aiofiles
44 aiohttp
45 ciso8601
46 pubnub
47 pyjwt
48 python-dateutil
49 requests
50 typing-extensions
51 ];
52
53 # aiounittest is not supported on 3.12
54 doCheck = pythonOlder "3.12";
55
56 nativeCheckInputs = [
57 aioresponses
58 aiounittest
59 pytestCheckHook
60 requests-mock
61 ];
62
63 pythonImportsCheck = [ "yalexs" ];
64
65 meta = with lib; {
66 description = "Python API for Yale Access (formerly August) Smart Lock and Doorbell";
67 homepage = "https://github.com/bdraco/yalexs";
68 changelog = "https://github.com/bdraco/yalexs/releases/tag/v${version}";
69 license = with licenses; [ mit ];
70 maintainers = with maintainers; [ fab ];
71 };
72}