From 3e991220051d642453df3a64ee5d7aa805187491 Mon Sep 17 00:00:00 2001 From: Peter Kling <1018801+pitkling@users.noreply.github.com> Date: Fri, 9 Jan 2026 10:07:02 +0100 Subject: [PATCH] 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. --- pkgs/development/python-modules/apprise/default.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pkgs/development/python-modules/apprise/default.nix b/pkgs/development/python-modules/apprise/default.nix index d99ad0894f72..023ab340c84e 100644 --- a/pkgs/development/python-modules/apprise/default.nix +++ b/pkgs/development/python-modules/apprise/default.nix @@ -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 = [