17 buildPythonPackage rec {
23 src = fetchFromGitHub {
27 sha256 = "1n35adwsyhz304n4ifnsz6qzkymwhyqc8sg8d76qv5psv2xsnzlf";
30 patches = lib.optionals stdenv.isLinux [
31 # hardcode paths to aplay and notify-send
33 src = ./linux-paths.patch;
34 aplay = "${alsa-utils}/bin/aplay";
35 notifysend = "${libnotify}/bin/notify-send";
37 ] ++ lib.optionals stdenv.isDarwin [
38 # hardcode path to which
40 src = ./darwin-paths.patch;
41 which = "${which}/bin/which";
45 propagatedBuildInputs = [
47 ] ++ lib.optionals stdenv.isLinux [
53 ] ++ lib.optionals stdenv.isLinux [
57 checkPhase = if stdenv.isDarwin then ''
58 # Tests search for "afplay" binary which is built in to macOS and not available in nixpkgs
60 ln -s ${coreutils}/bin/true $TMP/bin/afplay
61 PATH="$TMP/bin:$PATH" pytest
62 '' else if stdenv.isLinux then ''
64 --config-file=${dbus.daemon}/share/dbus-1/session.conf \
70 pythonImportsCheck = [ "notifypy" ];
73 description = "Cross-platform desktop notification library for Python";
74 homepage = "https://github.com/ms7m/notify-py";
75 license = licenses.mit;
76 maintainers = with maintainers; [ austinbutler dotlambda ];