about summary refs log tree commit diff
path: root/pkgs/applications/networking
diff options
context:
space:
mode:
authorNick Cao <nickcao@nichi.co>2024-04-03 12:36:14 -0400
committerGitHub <noreply@github.com>2024-04-03 12:36:14 -0400
commit4a6435ec5512b27cfec124a2c371576a4f6c4bbd (patch)
tree5b851640ffa64911b3b5ef2fd901081e59f46441 /pkgs/applications/networking
parentd9b2bc7827d6489ea3ca64d7c8f8cf5535ecd72d (diff)
parent33280e78a1e3a38fd6c8477c8d0a284e4bf9e479 (diff)
Merge pull request #300787 from NickCao/telegram-desktop
telegram-desktop: 4.15.2 -> 4.16.0
Diffstat (limited to 'pkgs/applications/networking')
-rw-r--r--pkgs/applications/networking/instant-messengers/telegram/telegram-desktop/default.nix6
-rw-r--r--pkgs/applications/networking/instant-messengers/telegram/telegram-desktop/macos.patch64
2 files changed, 66 insertions, 4 deletions
diff --git a/pkgs/applications/networking/instant-messengers/telegram/telegram-desktop/default.nix b/pkgs/applications/networking/instant-messengers/telegram/telegram-desktop/default.nix
index 8f94ec6e5acdb..015bd81409de2 100644
--- a/pkgs/applications/networking/instant-messengers/telegram/telegram-desktop/default.nix
+++ b/pkgs/applications/networking/instant-messengers/telegram/telegram-desktop/default.nix
@@ -30,7 +30,6 @@
 , range-v3
 , tl-expected
 , hunspell
-, glibmm_2_68
 , webkitgtk_6_0
 , jemalloc
 , rnnoise
@@ -64,14 +63,14 @@ let
 in
 stdenv.mkDerivation rec {
   pname = "telegram-desktop";
-  version = "4.15.2";
+  version = "4.16.0";
 
   src = fetchFromGitHub {
     owner = "telegramdesktop";
     repo = "tdesktop";
     rev = "v${version}";
     fetchSubmodules = true;
-    hash = "sha256-gzwDezOmIvSF4fPHAslf8DyBAgCYkD5ySX+MKKMXhSg=";
+    hash = "sha256-llrHN/XCMKwAvbyUZ/92OUjAEOPJKPbDfldVChLZo5k=";
   };
 
   patches = [
@@ -144,7 +143,6 @@ stdenv.mkDerivation rec {
     libpulseaudio
     pipewire
     hunspell
-    glibmm_2_68
     webkitgtk_6_0
     jemalloc
   ] ++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk_11_0.frameworks; [
diff --git a/pkgs/applications/networking/instant-messengers/telegram/telegram-desktop/macos.patch b/pkgs/applications/networking/instant-messengers/telegram/telegram-desktop/macos.patch
index 3036af515ea36..37b13b6844f32 100644
--- a/pkgs/applications/networking/instant-messengers/telegram/telegram-desktop/macos.patch
+++ b/pkgs/applications/networking/instant-messengers/telegram/telegram-desktop/macos.patch
@@ -49,6 +49,70 @@ index 7ce90d3..dac3c2c 100644
  	const auto state = DetectBatteryState();
  	if (!state.has || !state.draining) {
  		return false;
+Submodule Telegram/lib_webrtc contains modified content
+diff --git a/Telegram/lib_webrtc/webrtc/platform/mac/webrtc_environment_mac.mm b/Telegram/lib_webrtc/webrtc/platform/mac/webrtc_environment_mac.mm
+index 7521c08..5e22da2 100644
+--- a/Telegram/lib_webrtc/webrtc/platform/mac/webrtc_environment_mac.mm
++++ b/Telegram/lib_webrtc/webrtc/platform/mac/webrtc_environment_mac.mm
+@@ -364,6 +364,7 @@ EnvironmentMac::EnvironmentMac(not_null<EnvironmentDelegate*> delegate)
+ 	DefaultCaptureDeviceChangedMonitor.registerEnvironment(this);
+ 	AudioDeviceListChangedMonitor.registerEnvironment(this);
+ 
++#if 0
+ 	if (@available(macOS 14.0, *)) {
+ 		const auto weak = base::make_weak(this);
+ 		id block = [^(BOOL shouldBeMuted){
+@@ -387,6 +388,7 @@ EnvironmentMac::EnvironmentMac(not_null<EnvironmentDelegate*> delegate)
+ 			setInputMuteStateChangeHandler:block
+ 			error:nil];
+ 	}
++#endif
+ }
+ 
+ EnvironmentMac::~EnvironmentMac() {
+@@ -537,15 +539,18 @@ void EnvironmentMac::devicesRequested(DeviceType type) {
+ }
+ 
+ void EnvironmentMac::setCaptureMuted(bool muted) {
++#if 0
+ 	if (@available(macOS 14.0, *)) {
+ 		if (!_captureMuteNotification) {
+ 			const auto value = muted ? YES : NO;
+ 			[[AVAudioApplication sharedInstance] setInputMuted:value error:nil];
+ 		}
+ 	}
++#endif
+ }
+ 
+ void EnvironmentMac::captureMuteSubscribe() {
++#if 0
+ 	if (@available(macOS 14.0, *)) {
+ 		id observer = [[InputMuteObserver alloc] init];
+ 		[[[NSWorkspace sharedWorkspace] notificationCenter]
+@@ -578,6 +583,7 @@ void EnvironmentMac::captureMuteSubscribe() {
+ 			[observer release];
+ 		});
+ 	}
++#endif
+ }
+ 
+ void EnvironmentMac::captureMuteUnsubscribe() {
+@@ -595,6 +601,7 @@ void EnvironmentMac::captureMuteRestartAdm() {
+ void EnvironmentMac::setCaptureMuteTracker(
+ 		not_null<CaptureMuteTracker*> tracker,
+ 		bool track) {
++#if 0
+ 	if (@available(macOS 14.0, *)) {
+ 		if (track) {
+ 			if (!_captureMuteTracker) {
+@@ -619,6 +626,7 @@ void EnvironmentMac::setCaptureMuteTracker(
+ 			}
+ 		}
+ 	}
++#endif
+ }
+ 
+ std::unique_ptr<Environment> CreateEnvironment(
 Submodule Telegram/lib_webview contains modified content
 diff --git a/Telegram/lib_webview/webview/platform/mac/webview_mac.mm b/Telegram/lib_webview/webview/platform/mac/webview_mac.mm
 index 738e574..80ff5f0 100644