1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, pythonOlder
5, stdenv
6, packaging
7, importlib-resources
8, dbus-next
9}:
10
11buildPythonPackage rec {
12 pname = "desktop-notifier";
13 version = "3.3.2";
14 disabled = pythonOlder "3.6";
15
16 src = fetchFromGitHub {
17 owner = "SamSchott";
18 repo = pname;
19 rev = "v${version}";
20 sha256 = "sha256-h7an/Fm9pNnThCHXg9PAKG822dqXE/CUuW8lDJlwMfw=";
21 };
22
23 propagatedBuildInputs = [
24 packaging
25 ] ++ lib.optionals (pythonOlder "3.9") [
26 importlib-resources
27 ] ++ lib.optionals stdenv.isLinux [
28 dbus-next
29 ];
30
31 # no tests available, do the imports check instead
32 doCheck = false;
33 pythonImportsCheck = [ "desktop_notifier" ];
34
35 meta = with lib; {
36 homepage = "https://github.com/samschott/desktop-notifier";
37 description = "A Python library for cross-platform desktop notifications";
38 license = licenses.mit;
39 maintainers = with maintainers; [ sfrijters ];
40 platforms = platforms.linux;
41 };
42}