diff options
Diffstat (limited to 'pkgs/tools/networking/persepolis/0002-Fix-startup-crash-on-darwin.patch')
-rw-r--r-- | pkgs/tools/networking/persepolis/0002-Fix-startup-crash-on-darwin.patch | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/pkgs/tools/networking/persepolis/0002-Fix-startup-crash-on-darwin.patch b/pkgs/tools/networking/persepolis/0002-Fix-startup-crash-on-darwin.patch new file mode 100644 index 00000000000..50252c8cd72 --- /dev/null +++ b/pkgs/tools/networking/persepolis/0002-Fix-startup-crash-on-darwin.patch @@ -0,0 +1,41 @@ +--- + persepolis/scripts/mac_notification.py | 25 +++++++++---------------- + 1 file changed, 9 insertions(+), 16 deletions(-) + +diff --git a/persepolis/scripts/mac_notification.py b/persepolis/scripts/mac_notification.py +index 4d69929..9a9a7cf 100644 +--- a/persepolis/scripts/mac_notification.py ++++ b/persepolis/scripts/mac_notification.py +@@ -15,20 +15,13 @@ + + # native notification on mac! needs Xcode (latest version) installed and pyobjc + # library from pip +-import Foundation +-import AppKit +-import objc +- +-NSUserNotification = objc.lookUpClass('NSUserNotification') +-NSUserNotificationCenter = objc.lookUpClass('NSUserNotificationCenter') +- +- + def notifyMac(title, subtitle, info_text, delay=0): +- notification = NSUserNotification.alloc().init() +- notification.setTitle_(title) +- notification.setSubtitle_(subtitle) +- notification.setInformativeText_(info_text) +- notification.setDeliveryDate_(Foundation.NSDate.dateWithTimeInterval_sinceDate_( +- delay, Foundation.NSDate.date())) +- NSUserNotificationCenter.defaultUserNotificationCenter( +- ).scheduleNotification_(notification) ++ print(f""" ++Warning: Persepolis was installed from nixpkgs, which currently breaks notifications ++ on macOS. Until https://github.com/NixOS/nixpkgs/issues/105156 is resolved, ++ this cannot be fixed. The notification that should've been displayed was: ++ ++ title: {title} ++ subtitle: {subtitle} ++ info_text: {info_text} ++ """) +-- +2.39.3 (Apple Git-145) + |