1{
2 lib,
3 babel,
4 buildPythonPackage,
5 click,
6 cryptography,
7 fetchPypi,
8 gntp,
9 installShellFiles,
10 markdown,
11 paho-mqtt,
12 pytest-mock,
13 pytest-xdist,
14 pytestCheckHook,
15 pythonOlder,
16 pyyaml,
17 requests,
18 requests-oauthlib,
19 setuptools,
20}:
21
22buildPythonPackage rec {
23 pname = "apprise";
24 version = "1.8.1";
25 pyproject = true;
26
27 disabled = pythonOlder "3.7";
28
29 src = fetchPypi {
30 inherit pname version;
31 hash = "sha256-CKIP5yZyt+kPeWnVuHnWV8Li2zhaiowQ9Uy6VlvyN/I=";
32 };
33
34 nativeBuildInputs = [ installShellFiles ];
35
36 build-system = [
37 babel
38 setuptools
39 ];
40
41 dependencies = [
42 click
43 cryptography
44 markdown
45 pyyaml
46 requests
47 requests-oauthlib
48 ];
49
50 nativeCheckInputs = [
51 gntp
52 paho-mqtt
53 pytest-mock
54 pytest-xdist
55 pytestCheckHook
56 ];
57
58 disabledTests = [
59 "test_apprise_cli_nux_env"
60 # Nondeterministic. Fails with `assert 0 == 1`
61 "test_notify_emoji_general"
62 "test_plugin_mqtt_general"
63 # Nondeterministic. Fails with `AssertionError`
64 "test_plugin_xbmc_kodi_urls"
65 ];
66
67 disabledTestPaths = [
68 # AttributeError: module 'apprise.plugins' has no attribute 'NotifyBulkSMS'
69 "test/test_plugin_bulksms.py"
70 ];
71
72 postInstall = ''
73 installManPage packaging/man/apprise.1
74 '';
75
76 pythonImportsCheck = [ "apprise" ];
77
78 meta = with lib; {
79 description = "Push Notifications that work with just about every platform";
80 homepage = "https://github.com/caronc/apprise";
81 changelog = "https://github.com/caronc/apprise/releases/tag/v${version}";
82 license = licenses.bsd3;
83 maintainers = with maintainers; [ getchoo ];
84 mainProgram = "apprise";
85 };
86}