2021-02-19 19:06:45 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2021-08-18 13:19:15 +00:00
|
|
|
, fetchFromGitHub
|
2021-02-19 19:06:45 +00:00
|
|
|
, pythonOlder
|
|
|
|
, stdenv
|
|
|
|
, packaging
|
2022-09-30 11:47:45 +00:00
|
|
|
, setuptools
|
2021-02-19 19:06:45 +00:00
|
|
|
, importlib-resources
|
|
|
|
, dbus-next
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "desktop-notifier";
|
2022-04-03 18:54:34 +00:00
|
|
|
version = "3.4.0";
|
2022-03-30 09:31:56 +00:00
|
|
|
format = "pyproject";
|
2021-06-28 23:13:55 +00:00
|
|
|
disabled = pythonOlder "3.6";
|
2021-02-19 19:06:45 +00:00
|
|
|
|
2021-08-18 13:19:15 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "SamSchott";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2022-04-03 18:54:34 +00:00
|
|
|
sha256 = "sha256-lOXoiWY6gyWBL4RLrvslqcMmwtjMTOaHJZzsDO+C/F4=";
|
2021-02-19 19:06:45 +00:00
|
|
|
};
|
|
|
|
|
2022-09-30 11:47:45 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools
|
|
|
|
];
|
|
|
|
|
2021-02-19 19:06:45 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
packaging
|
|
|
|
] ++ lib.optionals (pythonOlder "3.9") [
|
|
|
|
importlib-resources
|
|
|
|
] ++ lib.optionals stdenv.isLinux [
|
|
|
|
dbus-next
|
|
|
|
];
|
|
|
|
|
|
|
|
# no tests available, do the imports check instead
|
|
|
|
doCheck = false;
|
|
|
|
pythonImportsCheck = [ "desktop_notifier" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/samschott/desktop-notifier";
|
|
|
|
description = "A Python library for cross-platform desktop notifications";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ sfrijters ];
|
2021-06-28 23:13:55 +00:00
|
|
|
platforms = platforms.linux;
|
2021-02-19 19:06:45 +00:00
|
|
|
};
|
|
|
|
}
|