apprise: add support for macOS desktop notifications

Apprise supports desktop notifications on macOS (e.g., via `apprise -b "Hello World" "macosx://"`). This feature uses terminal-notifier under the hood. Unfortunately, the potential paths to terminal-notifier are hardcoded into apprise. Thus, nixpkgs's apprise does currently not support desktop notifications on macOS.

This PR adds the terminal-notifier dependency under macOS and patches the hardcoded paths to use nixpkgs's terminal-notifier.
This commit is contained in:
Peter Kling
2026-01-10 17:44:30 +01:00
parent eaf6255ac7
commit 3e99122005
@@ -17,6 +17,8 @@
requests,
requests-oauthlib,
setuptools,
stdenv,
terminal-notifier,
testers,
}:
@@ -32,6 +34,11 @@ buildPythonPackage rec {
hash = "sha256-Qga+nLVpSj0I3Y4Dk7u5s2ISrDp3acJjNiAFXnXGyu8=";
};
postPatch = lib.optionalString stdenv.hostPlatform.isDarwin ''
substituteInPlace apprise/plugins/macosx.py \
--replace-fail "/opt/homebrew/bin/terminal-notifier" "${lib.getExe' terminal-notifier "terminal-notifier"}"
'';
nativeBuildInputs = [ installShellFiles ];
build-system = [