1{
2 lib,
3 stdenv,
4 buildPythonPackage,
5 pythonOlder,
6 fetchFromGitHub,
7 setuptools,
8 bidict,
9 packaging,
10 typing-extensions,
11 dbus-fast,
12 rubicon-objc,
13}:
14
15buildPythonPackage rec {
16 pname = "desktop-notifier";
17 version = "6.1.1";
18 pyproject = true;
19
20 disabled = pythonOlder "3.9";
21
22 src = fetchFromGitHub {
23 owner = "SamSchott";
24 repo = "desktop-notifier";
25 tag = "v${version}";
26 hash = "sha256-COPJHMURwb76p5a5w1/i1xL7B8f2GWGfXXeWW/GUxeY=";
27 };
28
29 build-system = [ setuptools ];
30
31 dependencies =
32 [
33 bidict
34 packaging
35 typing-extensions
36 ]
37 ++ lib.optionals stdenv.hostPlatform.isLinux [ dbus-fast ]
38 ++ lib.optionals stdenv.hostPlatform.isDarwin [ rubicon-objc ];
39
40 # no tests available, do the imports check instead
41 doCheck = false;
42
43 pythonImportsCheck = [ "desktop_notifier" ];
44
45 meta = {
46 description = "Python library for cross-platform desktop notifications";
47 homepage = "https://github.com/samschott/desktop-notifier";
48 changelog = "https://github.com/samschott/desktop-notifier/releases/tag/${src.tag}";
49 license = lib.licenses.mit;
50 maintainers = with lib.maintainers; [ sfrijters ];
51 };
52}