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.4";
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-duUqDioIBo2QQP/4VGGwklDt4F8pDm/sHrvOx4wcTWQ=";
37 };
38
39 outputs = [
40 "out"
41 "doc"
42 ];
43
44 build-system = [
45 hatchling
46 ];
47
48 nativeBuildInputs = [
49 sphinxHook
50 ] ++ optional-dependencies.docs;
51
52 pythonRelaxDeps = [
53 "http-ece"
54 "protobuf"
55 ];
56
57 dependencies = [
58 aiohttp
59 cryptography
60 http-ece
61 protobuf
62 ];
63
64 optional-dependencies = {
65 docs = [
66 myst-parser
67 sphinx
68 sphinx-autodoc-typehints
69 sphinx-rtd-theme
70 ];
71 };
72
73 pythonImportsCheck = [ "firebase_messaging" ];
74
75 nativeCheckInputs = [
76 aioresponses
77 async-timeout
78 requests-mock
79 pytest-asyncio
80 pytest-mock
81 pytest-socket
82 pytestCheckHook
83 ];
84
85 meta = with lib; {
86 description = "Library to subscribe to GCM/FCM and receive notifications within a python application";
87 homepage = "https://github.com/sdb9696/firebase-messaging";
88 changelog = "https://github.com/sdb9696/firebase-messaging/releases/tag/${version}";
89 license = licenses.mit;
90 maintainers = [ ];
91 };
92}