19 buildPythonPackage rec {
24 disabled = pythonOlder "3.6";
26 src = fetchFromGitHub {
29 rev = "refs/tags/v${version}";
30 hash = "sha256-XtjJImH9UwPPZS/Yqs8S5xGXOLBRmJRawzxWXoPWvrM=";
33 patches = lib.optionals stdenv.isLinux [
34 # hardcode paths to aplay and notify-send
36 src = ./linux-paths.patch;
37 aplay = "${alsa-utils}/bin/aplay";
38 notifysend = "${libnotify}/bin/notify-send";
40 ] ++ lib.optionals stdenv.isDarwin [
41 # hardcode path to which
43 src = ./darwin-paths.patch;
44 which = "${which}/bin/which";
57 propagatedBuildInputs = [
59 ] ++ lib.optionals stdenv.isLinux [
65 ] ++ lib.optionals stdenv.isLinux [
69 checkPhase = if stdenv.isDarwin then ''
70 # Tests search for "afplay" binary which is built in to macOS and not available in nixpkgs
72 ln -s ${coreutils}/bin/true $TMP/bin/afplay
73 PATH="$TMP/bin:$PATH" pytest
74 '' else if stdenv.isLinux then ''
76 --config-file=${dbus}/share/dbus-1/session.conf \
82 # GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name
83 # org.freedesktop.Notifications was not provided by any .service files
86 pythonImportsCheck = [ "notifypy" ];
89 description = "Cross-platform desktop notification library for Python";
90 homepage = "https://github.com/ms7m/notify-py";
91 changelog = "https://github.com/ms7m/notify-py/releases/tag/v${version}";
92 license = licenses.mit;
93 maintainers = with maintainers; [ austinbutler dotlambda ];