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 rev = "refs/tags/${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 ];
55
56 dependencies = [
57 aiohttp
58 cryptography
59 http-ece
60 protobuf
61 ];
62
63 optional-dependencies = {
64 docs = [
65 myst-parser
66 sphinx
67 sphinx-autodoc-typehints
68 sphinx-rtd-theme
69 ];
70 };
71
72 pythonImportsCheck = [ "firebase_messaging" ];
73
74 nativeCheckInputs = [
75 aioresponses
76 async-timeout
77 requests-mock
78 pytest-asyncio
79 pytest-mock
80 pytest-socket
81 pytestCheckHook
82 ];
83
84 meta = with lib; {
85 description = "Library to subscribe to GCM/FCM and receive notifications within a python application";
86 homepage = "https://github.com/sdb9696/firebase-messaging";
87 changelog = "https://github.com/sdb9696/firebase-messaging/releases/tag/${version}";
88 license = licenses.mit;
89 maintainers = [ ];
90 };
91}