nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
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.4.0";
14 format = "pyproject";
15 disabled = pythonOlder "3.6";
16
17 src = fetchFromGitHub {
18 owner = "SamSchott";
19 repo = pname;
20 rev = "v${version}";
21 sha256 = "sha256-lOXoiWY6gyWBL4RLrvslqcMmwtjMTOaHJZzsDO+C/F4=";
22 };
23
24 propagatedBuildInputs = [
25 packaging
26 ] ++ lib.optionals (pythonOlder "3.9") [
27 importlib-resources
28 ] ++ lib.optionals stdenv.isLinux [
29 dbus-next
30 ];
31
32 # no tests available, do the imports check instead
33 doCheck = false;
34 pythonImportsCheck = [ "desktop_notifier" ];
35
36 meta = with lib; {
37 homepage = "https://github.com/samschott/desktop-notifier";
38 description = "A Python library for cross-platform desktop notifications";
39 license = licenses.mit;
40 maintainers = with maintainers; [ sfrijters ];
41 platforms = platforms.linux;
42 };
43}