Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{
2 lib,
3 aiofiles,
4 aiohttp,
5 aioresponses,
6 asyncclick,
7 buildPythonPackage,
8 fetchpatch,
9 fetchPypi,
10 firebase-messaging,
11 freezegun,
12 hatchling,
13 oauthlib,
14 pytest-asyncio,
15 pytest-freezer,
16 pytest-mock,
17 pytest-socket,
18 pytestCheckHook,
19 pytz,
20 typing-extensions,
21 websockets,
22}:
23
24buildPythonPackage rec {
25 pname = "ring-doorbell";
26 version = "0.9.13";
27 pyproject = true;
28
29 src = fetchPypi {
30 pname = "ring_doorbell";
31 inherit version;
32 hash = "sha256-M8lHODHdWXLvrDbQMeEgGaQMYCXicHTQta+XjJxSQlM=";
33 };
34
35 patches = [
36 # https://github.com/python-ring-doorbell/python-ring-doorbell/pull/494
37 (fetchpatch {
38 name = "replace-async-timeout-with-asyncio.timeout.patch";
39 url = "https://github.com/python-ring-doorbell/python-ring-doorbell/commit/771243153921ec2cfb5f103b08ed08cccbe2e760.patch";
40 excludes = [
41 ".github/workflows/ci.yml"
42 "uv.lock"
43 ];
44 hash = "sha256-l6CUg3J6FZ0c0v0SSqvndjl4XeBhGFy/uWHPkExCM50=";
45 })
46 ];
47
48 pythonRelaxDeps = [ "requests-oauthlib" ];
49
50 build-system = [ hatchling ];
51
52 dependencies = [
53 aiofiles
54 aiohttp
55 asyncclick
56 firebase-messaging
57 oauthlib
58 pytz
59 typing-extensions
60 websockets
61 ];
62
63 nativeCheckInputs = [
64 aioresponses
65 freezegun
66 pytest-asyncio
67 pytest-freezer
68 pytest-mock
69 pytest-socket
70 pytestCheckHook
71 ];
72
73 pythonImportsCheck = [ "ring_doorbell" ];
74
75 meta = {
76 description = "Library to communicate with Ring Door Bell";
77 homepage = "https://github.com/tchellomello/python-ring-doorbell";
78 changelog = "https://github.com/tchellomello/python-ring-doorbell/blob/${version}/CHANGELOG.md";
79 license = lib.licenses.lgpl3Plus;
80 maintainers = with lib.maintainers; [ graham33 ];
81 mainProgram = "ring-doorbell";
82 };
83}