1{
2 lib,
3 async-timeout,
4 buildPythonPackage,
5 cryptography,
6 fetchFromGitHub,
7 http-ece,
8 poetry-core,
9 protobuf,
10 pytest-asyncio,
11 pytest-mock,
12 pytestCheckHook,
13 pythonOlder,
14 requests,
15 requests-mock,
16 sphinx,
17 sphinx-autodoc-typehints,
18 sphinx-rtd-theme,
19 sphinxHook,
20}:
21
22buildPythonPackage rec {
23 pname = "firebase-messaging";
24 version = "0.2.1";
25 pyproject = true;
26
27 disabled = pythonOlder "3.8";
28
29 src = fetchFromGitHub {
30 owner = "sdb9696";
31 repo = "firebase-messaging";
32 rev = "refs/tags/${version}";
33 hash = "sha256-8e+S12ZMqAmK7OR7O45QsRa0UKQq6cngeaqz2ugi6iY=";
34 };
35
36 outputs = [
37 "out"
38 "doc"
39 ];
40
41 nativeBuildInputs = [
42 poetry-core
43 sphinxHook
44 ] ++ passthru.optional-dependencies.docs;
45
46 propagatedBuildInputs = [
47 cryptography
48 http-ece
49 protobuf
50 requests
51 ];
52
53 passthru.optional-dependencies = {
54 docs = [
55 sphinx
56 sphinx-autodoc-typehints
57 sphinx-rtd-theme
58 ];
59 };
60
61 pythonImportsCheck = [ "firebase_messaging" ];
62
63 nativeCheckInputs = [
64 async-timeout
65 requests-mock
66 pytest-asyncio
67 pytest-mock
68 pytestCheckHook
69 ];
70
71 meta = with lib; {
72 description = "Library to subscribe to GCM/FCM and receive notifications within a python application";
73 homepage = "https://github.com/sdb9696/firebase-messaging";
74 changelog = "https://github.com/sdb9696/firebase-messaging/releases/tag/${version}";
75 license = licenses.mit;
76 maintainers = with maintainers; [ ];
77 };
78}