1{
2 lib,
3 aiohttp,
4 aioresponses,
5 async-timeout,
6 buildPythonPackage,
7 cryptography,
8 fetchFromGitHub,
9 hatchling,
10 http-ece,
11 myst-parser,
12 protobuf,
13 pytest-asyncio,
14 pytest-mock,
15 pytest-socket,
16 pytestCheckHook,
17 pythonOlder,
18 requests-mock,
19 sphinx,
20 sphinx-autodoc-typehints,
21 sphinx-rtd-theme,
22 sphinxHook,
23}:
24
25buildPythonPackage rec {
26 pname = "firebase-messaging";
27 version = "0.4.5";
28 pyproject = true;
29
30 disabled = pythonOlder "3.9";
31
32 src = fetchFromGitHub {
33 owner = "sdb9696";
34 repo = "firebase-messaging";
35 tag = version;
36 hash = "sha256-O1A+hGEhnNcvdXw5QJx+3zYKB+m36N0Ge0XB6cZ6930=";
37 };
38
39 outputs = [
40 "out"
41 "doc"
42 ];
43
44 build-system = [
45 hatchling
46 ];
47
48 nativeBuildInputs = [
49 sphinxHook
50 ]
51 ++ optional-dependencies.docs;
52
53 pythonRelaxDeps = [
54 "http-ece"
55 "protobuf"
56 ];
57
58 dependencies = [
59 aiohttp
60 cryptography
61 http-ece
62 protobuf
63 ];
64
65 optional-dependencies = {
66 docs = [
67 myst-parser
68 sphinx
69 sphinx-autodoc-typehints
70 sphinx-rtd-theme
71 ];
72 };
73
74 pythonImportsCheck = [ "firebase_messaging" ];
75
76 nativeCheckInputs = [
77 aioresponses
78 async-timeout
79 requests-mock
80 pytest-asyncio
81 pytest-mock
82 pytest-socket
83 pytestCheckHook
84 ];
85
86 meta = with lib; {
87 description = "Library to subscribe to GCM/FCM and receive notifications within a python application";
88 homepage = "https://github.com/sdb9696/firebase-messaging";
89 changelog = "https://github.com/sdb9696/firebase-messaging/releases/tag/${src.tag}";
90 license = licenses.mit;
91 maintainers = [ ];
92 };
93}