From dbf902b13d7d4524441b003dd41e7bb4eeafb7e6 Mon Sep 17 00:00:00 2001 From: Austin Butler Date: Sun, 4 Oct 2020 21:29:27 -0700 Subject: [PATCH] python3Packages.notify-py: init at 0.2.3 --- .../python-modules/notify-py/default.nix | 35 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 37 insertions(+) create mode 100644 pkgs/development/python-modules/notify-py/default.nix diff --git a/pkgs/development/python-modules/notify-py/default.nix b/pkgs/development/python-modules/notify-py/default.nix new file mode 100644 index 000000000000..fc2eda47beba --- /dev/null +++ b/pkgs/development/python-modules/notify-py/default.nix @@ -0,0 +1,35 @@ +{ lib, buildPythonPackage, fetchPypi, isPy3k, alsaUtils, libnotify, which, loguru, pytest }: + +buildPythonPackage rec { + pname = "notify_py"; + version = "0.2.3"; + + disabled = !isPy3k; + + src = fetchPypi { + inherit pname version; + sha256 = "1i209xsff54hipdk9cg6va60fl33swg126yfgkg3wsgjmi6s07ca"; + }; + + postPatch = '' + substituteInPlace setup.py \ + --replace "loguru==0.4.1" "loguru~=0.5.0" + ''; + + propagatedBuildInputs = [ alsaUtils libnotify loguru which ]; + + checkInputs = [ alsaUtils libnotify pytest which ]; + + checkPhase = '' + pytest + ''; + + pythonImportsCheck = [ "notifypy" ]; + + meta = with lib; { + description = " Python Module for sending cross-platform desktop notifications on Windows, macOS, and Linux."; + homepage = "https://github.com/ms7m/notify-py/"; + license = licenses.mit; + maintainers = with maintainers; [ austinbutler ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index e1df51e1a14e..cb12f1304114 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -4075,6 +4075,8 @@ in { notify = callPackage ../development/python-modules/notify { }; + notify-py = callPackage ../development/python-modules/notify-py { }; + notmuch = callPackage ../development/python-modules/notmuch { inherit (pkgs) notmuch; }; nototools = callPackage ../data/fonts/noto-fonts/tools.nix { };