1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 setuptools, 6 libnotify, 7 pytestCheckHook, 8}: 9 10buildPythonPackage rec { 11 pname = "pynotifier"; 12 version = "0.5.0"; 13 pyproject = true; 14 15 src = fetchFromGitHub { 16 owner = "YuriyLisovskiy"; 17 repo = "pynotifier"; 18 rev = version; 19 hash = "sha256-xS3hH3cyqgDD7uoWkIYXpQAh7SN7XJ/qMfB0Vq5bva0="; 20 }; 21 22 postPatch = '' 23 substituteInPlace pynotifier/backends/platform/linux.py \ 24 --replace-fail \ 25 'shutil.which("notify-send")' \ 26 '"${lib.getExe' libnotify "notify-send"}"' 27 ''; 28 29 nativeBuildInputs = [ setuptools ]; 30 31 nativeCheckInputs = [ pytestCheckHook ]; 32 33 pythonImportsCheck = [ "pynotifier" ]; 34 35 meta = with lib; { 36 description = "Module for sending notifications"; 37 homepage = "https://github.com/YuriyLisovskiy/pynotifier"; 38 license = licenses.mit; 39 maintainers = with maintainers; [ pbsds ]; 40 }; 41}