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 27617f930fae..b81582a65fd5 100644 --- a/pkgs/applications/networking/instant-messengers/telegram/telegram-desktop/default.nix +++ b/pkgs/applications/networking/instant-messengers/telegram/telegram-desktop/default.nix @@ -1,6 +1,5 @@ { lib , fetchFromGitHub -, fetchpatch , callPackage , pkg-config , cmake @@ -64,14 +63,14 @@ let in stdenv.mkDerivation rec { pname = "telegram-desktop"; - version = "5.1.8"; + version = "5.2.2"; src = fetchFromGitHub { owner = "telegramdesktop"; repo = "tdesktop"; rev = "v${version}"; fetchSubmodules = true; - hash = "sha256-YTCvniC8THoz0BUM/gkr97rhbbSVQ+SCE1H3qS68lIM="; + hash = "sha256-rvd4Ei4MpWiilHCV291UrJkHaUcwth9AWc3PSqjj+EI="; }; patches = [ @@ -79,10 +78,7 @@ stdenv.mkDerivation rec { # the generated .desktop files contains references to unwrapped tdesktop, breaking scheme handling # and the scheme handler is already registered in the packaged .desktop file, rendering this unnecessary # see https://github.com/NixOS/nixpkgs/issues/218370 - (fetchpatch { - url = "https://salsa.debian.org/debian/telegram-desktop/-/raw/09b363ed5a4fcd8ecc3282b9bfede5fbb83f97ef/debian/patches/Disable-register-custom-scheme.patch"; - hash = "sha256-B8X5lnSpwwdp1HlvyXJWQPybEN+plOwimdV5gW6aY2Y="; - }) + ./scheme.patch ]; postPatch = lib.optionalString stdenv.isLinux '' @@ -179,6 +175,7 @@ stdenv.mkDerivation rec { IOSurface Metal NaturalLanguage + LocalAuthentication libicns ]); diff --git a/pkgs/applications/networking/instant-messengers/telegram/telegram-desktop/scheme.patch b/pkgs/applications/networking/instant-messengers/telegram/telegram-desktop/scheme.patch new file mode 100644 index 000000000000..58aaa8a7fcb5 --- /dev/null +++ b/pkgs/applications/networking/instant-messengers/telegram/telegram-desktop/scheme.patch @@ -0,0 +1,12 @@ +diff --git a/Telegram/SourceFiles/core/application.cpp b/Telegram/SourceFiles/core/application.cpp +index e3e0de6c6..d5851bd6e 100644 +--- a/Telegram/SourceFiles/core/application.cpp ++++ b/Telegram/SourceFiles/core/application.cpp +@@ -421,7 +421,6 @@ void Application::run() { + + void Application::autoRegisterUrlScheme() { + if (!OptionSkipUrlSchemeRegister.value()) { +- InvokeQueued(this, [] { RegisterUrlScheme(); }); + } + } +