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-10-21 18:38:19 +00:00
|
|
|
version = "3.4.1";
|
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;
|
2022-10-21 18:38:19 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
sha256 = "sha256-cqPLnahs3fT6AfQQkS5azh4/cHzaexytg78RsJG5c6U=";
|
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
|
|
|
};
|
|
|
|
}
|