summary refs log tree commit diff
diff options
context:
space:
mode:
authorNick Cao <nickcao@nichi.co>2023-02-28 10:52:38 +0800
committerNick Cao <nickcao@nichi.co>2023-02-28 10:52:38 +0800
commit1320cb8157dff844e102106e727588fdd6e1fa20 (patch)
tree4f583fda315630bc8731bbeaae44260e28f0764a
parent8d38e239668396b787d838d8605a524d539c0114 (diff)
downloadnixpkgs-1320cb8157dff844e102106e727588fdd6e1fa20.tar
nixpkgs-1320cb8157dff844e102106e727588fdd6e1fa20.tar.gz
nixpkgs-1320cb8157dff844e102106e727588fdd6e1fa20.tar.bz2
nixpkgs-1320cb8157dff844e102106e727588fdd6e1fa20.tar.lz
nixpkgs-1320cb8157dff844e102106e727588fdd6e1fa20.tar.xz
nixpkgs-1320cb8157dff844e102106e727588fdd6e1fa20.tar.zst
nixpkgs-1320cb8157dff844e102106e727588fdd6e1fa20.zip
tdesktop: add patch to disable custom URL scheme registration
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 unnessesary

Reference: https://github.com/NixOS/nixpkgs/issues/218370
-rw-r--r--pkgs/applications/networking/instant-messengers/telegram/tdesktop/default.nix11
1 files changed, 11 insertions, 0 deletions
diff --git a/pkgs/applications/networking/instant-messengers/telegram/tdesktop/default.nix b/pkgs/applications/networking/instant-messengers/telegram/tdesktop/default.nix
index 3066a3aa745..9ab4ce65b62 100644
--- a/pkgs/applications/networking/instant-messengers/telegram/tdesktop/default.nix
+++ b/pkgs/applications/networking/instant-messengers/telegram/tdesktop/default.nix
@@ -1,5 +1,6 @@
 { lib
 , fetchFromGitHub
+, fetchpatch
 , callPackage
 , pkg-config
 , cmake
@@ -87,6 +88,16 @@ env.mkDerivation rec {
     sha256 = "0c65ry82ffmh1qzc2lnsyjs78r9jllv62p9vglpz0ikg86zf36sk";
   };
 
+  patches = [
+    # 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=";
+    })
+  ];
+
   postPatch = ''
     substituteInPlace Telegram/ThirdParty/libtgvoip/os/linux/AudioInputALSA.cpp \
       --replace '"libasound.so.2"' '"${alsa-lib}/lib/libasound.so.2"'