python3Packages.notify-py: 0.3.1 -> 0.3.3

This commit is contained in:
Austin Butler 2021-06-02 19:25:55 -07:00
parent fbb03dcc71
commit b552e4ada4

View file

@ -1,33 +1,37 @@
{ lib, buildPythonPackage, fetchPypi, isPy3k, alsaUtils, libnotify, which, loguru, pytest }: { lib, stdenv, buildPythonPackage, fetchFromGitHub, isPy3k, coreutils, alsaUtils
, libnotify, which, jeepney, loguru, pytestCheckHook }:
buildPythonPackage rec { buildPythonPackage rec {
pname = "notify_py"; pname = "notify-py";
version = "0.3.1"; version = "0.3.3";
disabled = !isPy3k; disabled = !isPy3k;
src = fetchPypi { src = fetchFromGitHub {
inherit pname version; owner = "ms7m";
sha256 = "5ba696d18ffe1d7070f3d0a5b4923fee4d6c863de6843af105bec0ce9915ebad"; repo = pname;
rev = "v${version}";
sha256 = "1n35adwsyhz304n4ifnsz6qzkymwhyqc8sg8d76qv5psv2xsnzlf";
}; };
postPatch = '' propagatedNativeBuildInputs = [ which ]
substituteInPlace setup.py \ ++ lib.optionals stdenv.isLinux [ alsaUtils libnotify ];
--replace "loguru==0.4.1" "loguru~=0.5.0" propagatedBuildInputs = [ loguru ]
''; ++ lib.optionals stdenv.isLinux [ jeepney ];
propagatedBuildInputs = [ alsaUtils libnotify loguru which ]; checkInputs = [ coreutils pytestCheckHook ];
checkInputs = [ alsaUtils libnotify pytest which ]; # Tests search for "afplay" binary which is built in to MacOS and not available in nixpkgs
preCheck = ''
checkPhase = '' mkdir $TMP/bin
pytest ln -s ${coreutils}/bin/true $TMP/bin/afplay
export PATH="$TMP/bin:$PATH"
''; '';
pythonImportsCheck = [ "notifypy" ]; pythonImportsCheck = [ "notifypy" ];
meta = with lib; { meta = with lib; {
description = " Python Module for sending cross-platform desktop notifications on Windows, macOS, and Linux."; description = "Python Module for sending cross-platform desktop notifications on Windows, macOS, and Linux.";
homepage = "https://github.com/ms7m/notify-py/"; homepage = "https://github.com/ms7m/notify-py/";
license = licenses.mit; license = licenses.mit;
maintainers = with maintainers; [ austinbutler ]; maintainers = with maintainers; [ austinbutler ];