Merge pull request #306122 from pbsds/init-pynotifier

python312Packages.pynotifier: init at 0.5.0
This commit is contained in:
Peder Bergebakken Sundt 2024-04-26 15:08:44 +02:00 committed by GitHub
commit 0d57efa469
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 46 additions and 0 deletions

View File

@ -0,0 +1,44 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, setuptools
, libnotify
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "pynotifier";
version = "0.5.0";
pyproject = true;
src = fetchFromGitHub {
owner = "YuriyLisovskiy";
repo = "pynotifier";
rev = version;
hash = "sha256-xS3hH3cyqgDD7uoWkIYXpQAh7SN7XJ/qMfB0Vq5bva0=";
};
postPatch = ''
substituteInPlace pynotifier/backends/platform/linux.py \
--replace-fail \
'shutil.which("notify-send")' \
'"${lib.getExe' libnotify "notify-send"}"'
'';
nativeBuildInputs = [
setuptools
];
nativeCheckInputs = [
pytestCheckHook
];
pythonImportsCheck = [ "pynotifier" ];
meta = with lib; {
description = "Module for sending notifications";
homepage = "https://github.com/YuriyLisovskiy/pynotifier";
license = licenses.mit;
maintainers = with maintainers; [ pbsds ];
};
}

View File

@ -9934,6 +9934,8 @@ self: super: with self; {
pynose = callPackage ../development/python-modules/pynose { };
pynotifier = callPackage ../development/python-modules/pynotifier { };
pynuki = callPackage ../development/python-modules/pynuki { };
pynut2 = callPackage ../development/python-modules/pynut2 { };