diff options
author | Alyssa Ross <hi@alyssa.is> | 2023-11-21 16:12:21 +0100 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2023-11-21 16:12:48 +0100 |
commit | 048a4cd441a59cbf89defb18bb45c9f0b4429b35 (patch) | |
tree | f8f5850ff05521ab82d65745894714a8796cbfb6 /pkgs/tools/networking/persepolis/0002-Fix-startup-crash-on-darwin.patch | |
parent | 030c5028b07afcedce7c5956015c629486cc79d9 (diff) | |
parent | 4c2d05dd6435d449a3651a6dd314d9411b5f8146 (diff) | |
download | nixpkgs-rootfs.tar nixpkgs-rootfs.tar.gz nixpkgs-rootfs.tar.bz2 nixpkgs-rootfs.tar.lz nixpkgs-rootfs.tar.xz nixpkgs-rootfs.tar.zst nixpkgs-rootfs.zip |
Signed-off-by: Alyssa Ross <hi@alyssa.is>
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) + |