1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, pythonOlder 5, stdenv 6, packaging 7, setuptools 8, importlib-resources 9, dbus-next 10}: 11 12buildPythonPackage rec { 13 pname = "desktop-notifier"; 14 version = "3.4.1"; 15 format = "pyproject"; 16 disabled = pythonOlder "3.6"; 17 18 src = fetchFromGitHub { 19 owner = "SamSchott"; 20 repo = pname; 21 rev = "refs/tags/v${version}"; 22 sha256 = "sha256-cqPLnahs3fT6AfQQkS5azh4/cHzaexytg78RsJG5c6U="; 23 }; 24 25 nativeBuildInputs = [ 26 setuptools 27 ]; 28 29 propagatedBuildInputs = [ 30 packaging 31 ] ++ lib.optionals (pythonOlder "3.9") [ 32 importlib-resources 33 ] ++ lib.optionals stdenv.isLinux [ 34 dbus-next 35 ]; 36 37 # no tests available, do the imports check instead 38 doCheck = false; 39 pythonImportsCheck = [ "desktop_notifier" ]; 40 41 meta = with lib; { 42 homepage = "https://github.com/samschott/desktop-notifier"; 43 description = "A Python library for cross-platform desktop notifications"; 44 license = licenses.mit; 45 maintainers = with maintainers; [ sfrijters ]; 46 platforms = platforms.linux; 47 }; 48}