summary refs log tree commit diff
path: root/pkgs/applications/networking/instant-messengers
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications/networking/instant-messengers')
-rw-r--r--pkgs/applications/networking/instant-messengers/chatterino2/default.nix6
-rw-r--r--pkgs/applications/networking/instant-messengers/psi-plus/default.nix18
-rw-r--r--pkgs/applications/networking/instant-messengers/rambox/default.nix4
-rw-r--r--pkgs/applications/networking/instant-messengers/signal-desktop/default.nix100
-rw-r--r--pkgs/applications/networking/instant-messengers/skypeforlinux/default.nix4
-rw-r--r--pkgs/applications/networking/instant-messengers/spectral/default.nix18
-rw-r--r--pkgs/applications/networking/instant-messengers/teams/default.nix4
-rw-r--r--pkgs/applications/networking/instant-messengers/telegram/tdesktop/default.nix153
-rw-r--r--pkgs/applications/networking/instant-messengers/zoom-us/default.nix4
9 files changed, 149 insertions, 162 deletions
diff --git a/pkgs/applications/networking/instant-messengers/chatterino2/default.nix b/pkgs/applications/networking/instant-messengers/chatterino2/default.nix
index becf828a856..787d66826ef 100644
--- a/pkgs/applications/networking/instant-messengers/chatterino2/default.nix
+++ b/pkgs/applications/networking/instant-messengers/chatterino2/default.nix
@@ -1,6 +1,6 @@
-{ stdenv, pkgconfig, fetchFromGitHub, qtbase, qtsvg, qtmultimedia, qmake, boost, openssl }:
+{ mkDerivation, lib, pkgconfig, fetchFromGitHub, qtbase, qtsvg, qtmultimedia, qmake, boost, openssl }:
 
-stdenv.mkDerivation rec {
+mkDerivation rec {
   pname = "chatterino2";
   version = "unstable-2019-05-11";
   src = fetchFromGitHub {
@@ -12,7 +12,7 @@ stdenv.mkDerivation rec {
   };
   nativeBuildInputs = [ qmake pkgconfig ];
   buildInputs = [ qtbase qtsvg qtmultimedia boost openssl ];
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "A chat client for Twitch chat";
     longDescription = ''
       Chatterino is a chat client for Twitch chat. It aims to be an
diff --git a/pkgs/applications/networking/instant-messengers/psi-plus/default.nix b/pkgs/applications/networking/instant-messengers/psi-plus/default.nix
index d7741bda646..010c06e0c2a 100644
--- a/pkgs/applications/networking/instant-messengers/psi-plus/default.nix
+++ b/pkgs/applications/networking/instant-messengers/psi-plus/default.nix
@@ -1,25 +1,25 @@
-{ stdenv, fetchFromGitHub, cmake
+{ stdenv, fetchFromGitHub, cmake, wrapQtAppsHook
 , qtbase, qtmultimedia, qtx11extras, qttools, qtwebengine
-, libidn, qca2-qt5, qtkeychain, libXScrnSaver, hunspell
+, libidn, qca2-qt5, libsecret, libXScrnSaver, hunspell
 , libgcrypt, libotr, html-tidy, libgpgerror, libsignal-protocol-c
 }:
 
 stdenv.mkDerivation rec {
   pname = "psi-plus";
-  version = "1.4.904";
+  version = "1.4.984";
 
   src = fetchFromGitHub {
     owner = "psi-plus";
     repo = "psi-plus-snapshots";
     rev = version;
-    sha256 = "1bs7yk3qp91sm8nb9gna8vm59381afn1wfs7aii9yi29bhx6fw9h";
+    sha256 = "1nii2nfi37i6mn79xmygscmm8ax75ky244wxkzlga0ya8i8wfjh7";
   };
 
   resources = fetchFromGitHub {
     owner = "psi-plus";
     repo = "resources";
-    rev = "182c92ca0bcc055579d8c91bccba9efe157e77a9";
-    sha256 = "06k7q63cxpifpzjnlw1snclkr2mwf9fh71cgfd40n7jgzswzwhpb";
+    rev = "2f1c12564f7506bf902a26040fdb47ead4df6b73";
+    sha256 = "1dgm9k052fq7f2bpx13kchg7sxb227dkn115lyspzvhnhprnypz2";
   };
 
   postUnpack = ''
@@ -30,11 +30,11 @@ stdenv.mkDerivation rec {
     "-DENABLE_PLUGINS=ON"
   ];
 
-  nativeBuildInputs = [ cmake ];
+  nativeBuildInputs = [ cmake wrapQtAppsHook ];
 
   buildInputs = [
     qtbase qtmultimedia qtx11extras qttools qtwebengine
-    libidn qca2-qt5 qtkeychain libXScrnSaver hunspell
+    libidn qca2-qt5 libsecret libXScrnSaver hunspell
     libgcrypt libotr html-tidy libgpgerror libsignal-protocol-c
   ];
 
@@ -42,7 +42,7 @@ stdenv.mkDerivation rec {
 
   meta = with stdenv.lib; {
     description = "XMPP (Jabber) client";
-    maintainers = with maintainers; [ orivej ];
+    maintainers = with maintainers; [ orivej misuzu ];
     license = licenses.gpl2;
     platforms = platforms.linux;
   };
diff --git a/pkgs/applications/networking/instant-messengers/rambox/default.nix b/pkgs/applications/networking/instant-messengers/rambox/default.nix
index eeab5e32c0f..f588c31c183 100644
--- a/pkgs/applications/networking/instant-messengers/rambox/default.nix
+++ b/pkgs/applications/networking/instant-messengers/rambox/default.nix
@@ -46,7 +46,7 @@ stdenv.mkDerivation {
       --prefix PATH : ${xdg_utils}/bin
   '';
 
-  inherit (rambox-bare.meta // {
+  meta = rambox-bare.meta // {
     platforms = [ "i686-linux" "x86_64-linux" ];
-  });
+  };
 }
diff --git a/pkgs/applications/networking/instant-messengers/signal-desktop/default.nix b/pkgs/applications/networking/instant-messengers/signal-desktop/default.nix
index 2e8581f4eae..4358ed8f201 100644
--- a/pkgs/applications/networking/instant-messengers/signal-desktop/default.nix
+++ b/pkgs/applications/networking/instant-messengers/signal-desktop/default.nix
@@ -1,8 +1,8 @@
-{ stdenv, lib, fetchurl, dpkg, wrapGAppsHook
+{ stdenv, lib, fetchurl, autoPatchelfHook, dpkg, wrapGAppsHook
 , gnome2, gtk3, atk, at-spi2-atk, cairo, pango, gdk-pixbuf, glib, freetype, fontconfig
 , dbus, libX11, xorg, libXi, libXcursor, libXdamage, libXrandr, libXcomposite
 , libXext, libXfixes, libXrender, libXtst, libXScrnSaver, nss, nspr, alsaLib
-, cups, expat, udev, libnotify, libuuid, at-spi2-core, libappindicator-gtk3
+, cups, expat, systemd, libnotify, libuuid, at-spi2-core, libappindicator-gtk3
 # Unfortunately this also overwrites the UI language (not just the spell
 # checking language!):
 , hunspellDicts, spellcheckerLanguage ? null # E.g. "de_DE"
@@ -21,11 +21,32 @@ let
         --set HUNSPELL_DICTIONARIES "${hunspellDicts.${hunspellDict}}/share/hunspell" \
         --set LC_MESSAGES "${spellcheckerLanguage}"''
       else "");
-  rpath = lib.makeLibraryPath [
+in stdenv.mkDerivation rec {
+  pname = "signal-desktop";
+  version = "1.30.0"; # Please backport all updates to the stable channel.
+  # All releases have a limited lifetime and "expire" 90 days after the release.
+  # When releases "expire" the application becomes unusable until an update is
+  # applied. The expiration date for the current release can be extracted with:
+  # $ grep -a "^{\"buildExpiration" "${signal-desktop}/lib/Signal/resources/app.asar"
+  # (Alternatively we could try to patch the asar archive, but that requires a
+  # few additional steps and might not be the best idea.)
+
+  src = fetchurl {
+    url = "https://updates.signal.org/desktop/apt/pool/main/s/signal-desktop/signal-desktop_${version}_amd64.deb";
+    sha256 = "1gbvna40sc83s7mwip5281yn4bs0k19fj061y0xzwkvh0yk06x3i";
+  };
+
+  nativeBuildInputs = [
+    autoPatchelfHook
+    dpkg
+    wrapGAppsHook
+  ];
+
+  buildInputs = [
     alsaLib
-    atk
     at-spi2-atk
     at-spi2-core
+    atk
     cairo
     cups
     dbus
@@ -36,10 +57,6 @@ let
     glib
     gnome2.GConf
     gtk3
-    pango
-    libappindicator-gtk3
-    libnotify
-    libuuid
     libX11
     libXScrnSaver
     libXcomposite
@@ -51,59 +68,56 @@ let
     libXrandr
     libXrender
     libXtst
+    libappindicator-gtk3
+    libnotify
+    libuuid
     nspr
     nss
-    udev
+    pango
+    systemd
     xorg.libxcb
   ];
 
-in stdenv.mkDerivation rec {
-  pname = "signal-desktop";
-  version = "1.29.3"; # Please backport all updates to the stable channel.
-  # All releases have a limited lifetime and "expire" 90 days after the release.
-  # When releases "expire" the application becomes unusable until an update is
-  # applied. The expiration date for the current release can be extracted with:
-  # $ grep -a "^{\"buildExpiration" "${signal-desktop}/libexec/resources/app.asar"
-  # (Alternatively we could try to patch the asar archive, but that requires a
-  # few additional steps and might not be the best idea.)
-
-  src = fetchurl {
-    url = "https://updates.signal.org/desktop/apt/pool/main/s/signal-desktop/signal-desktop_${version}_amd64.deb";
-    sha256 = "1rkj6rwmwwvyd5041r96j1dxlfbmc6xsdrza43c0ykdrhfj73h11";
-  };
-
-  phases = [ "unpackPhase" "installPhase" ];
-
-  nativeBuildInputs = [ dpkg wrapGAppsHook ];
+  runtimeDependencies = [
+    systemd.lib
+  ];
 
   unpackPhase = "dpkg-deb -x $src .";
 
-  installPhase = ''
-    mkdir -p $out
-    cp -R opt $out
+  dontBuild = true;
+  dontConfigure = true;
+  dontPatchELF = true;
+  # We need to run autoPatchelf manually with the "no-recurse" option, see
+  # https://github.com/NixOS/nixpkgs/pull/78413 for the reasons.
+  dontAutoPatchelf = true;
 
-    mv ./usr/share $out/share
-    mv $out/opt/Signal $out/libexec
-    rmdir $out/opt
+  installPhase = ''
+    mkdir -p $out/lib
 
-    chmod -R g-w $out
+    mv usr/share $out/share
+    mv opt/Signal $out/lib/Signal
 
-    # Patch signal
-    patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
-             --set-rpath ${rpath}:$out/libexec $out/libexec/signal-desktop
-    wrapProgram $out/libexec/signal-desktop \
-      --prefix XDG_DATA_DIRS : "${gtk3}/share/gsettings-schemas/${gtk3.name}/" \
-      --prefix LD_LIBRARY_PATH : "${stdenv.cc.cc.lib}/lib" \
-      ${customLanguageWrapperArgs} \
-      "''${gappsWrapperArgs[@]}"
+    # Note: The following path contains bundled libraries:
+    # $out/lib/Signal/resources/app.asar.unpacked/node_modules/sharp/vendor/lib/
+    # We run autoPatchelf with the "no-recurse" option to avoid picking those
+    # up, but resources/app.asar still requires them.
 
     # Symlink to bin
     mkdir -p $out/bin
-    ln -s $out/libexec/signal-desktop $out/bin/signal-desktop
+    ln -s $out/lib/Signal/signal-desktop $out/bin/signal-desktop
+  '';
+
+  preFixup = ''
+    gappsWrapperArgs+=(
+      --prefix LD_LIBRARY_PATH : "${stdenv.lib.makeLibraryPath [ stdenv.cc.cc ] }"
+      ${customLanguageWrapperArgs}
+    )
 
     # Fix the desktop link
     substituteInPlace $out/share/applications/signal-desktop.desktop \
       --replace /opt/Signal/signal-desktop $out/bin/signal-desktop
+
+    autoPatchelf --no-recurse -- $out/lib/Signal/
   '';
 
   meta = {
diff --git a/pkgs/applications/networking/instant-messengers/skypeforlinux/default.nix b/pkgs/applications/networking/instant-messengers/skypeforlinux/default.nix
index d43d8e1f988..500f8f3fe87 100644
--- a/pkgs/applications/networking/instant-messengers/skypeforlinux/default.nix
+++ b/pkgs/applications/networking/instant-messengers/skypeforlinux/default.nix
@@ -7,7 +7,7 @@ let
 
   # Please keep the version x.y.0.z and do not update to x.y.76.z because the
   # source of the latter disappears much faster.
-  version = "8.55.0.123";
+  version = "8.55.0.141";
 
   rpath = stdenv.lib.makeLibraryPath [
     alsaLib
@@ -63,7 +63,7 @@ let
           "https://repo.skype.com/deb/pool/main/s/skypeforlinux/skypeforlinux_${version}_amd64.deb"
           "https://web.archive.org/web/https://repo.skype.com/deb/pool/main/s/skypeforlinux/skypeforlinux_${version}_amd64.deb"
         ];
-        sha256 = "08dvgqwj7f8k3xv5kv96k6v6ga1v2chif9m7amncg6ppp81hy7nx";
+        sha256 = "0yfbxrnf2mjihrsvp0r81kbxh3rfh53y7sbfp3bwqky951a93qis";
       }
     else
       throw "Skype for linux is not supported on ${stdenv.hostPlatform.system}";
diff --git a/pkgs/applications/networking/instant-messengers/spectral/default.nix b/pkgs/applications/networking/instant-messengers/spectral/default.nix
index 314a3bb6457..23659e8a6c9 100644
--- a/pkgs/applications/networking/instant-messengers/spectral/default.nix
+++ b/pkgs/applications/networking/instant-messengers/spectral/default.nix
@@ -7,34 +7,32 @@
 , qtgraphicaleffects
 , qtdeclarative
 , qtmacextras
-, olm, cmark
+, olm, libsecret, cmark
 }:
 
 let qtkeychain-qt5 = qtkeychain.override {
   inherit qtbase qttools;
   withQt5 = true;
 };
-in stdenv.mkDerivation {
+in stdenv.mkDerivation rec {
   pname = "spectral";
-  version = "unstable-2019-08-30";
+  version = "817";
 
   src = fetchgit {
-    url = "https://gitlab.com/b0/spectral.git";
-    rev = "ee86c948aec5fe72979fc6df97f4a6ef711bdf94";
-    sha256 = "1mqabdkvzq48wki92wm2r79kj8g8m7ganpl47sh60qfsk4bxa8b2";
+    url = "https://gitlab.com/spectral-im/spectral.git";
+    rev = version;
+    sha256 = "0lg0bkz621cmqb67kz1zmn4xwbspcqalz68byll5iszqz9y4gnp1";
     fetchSubmodules = true;
   };
 
-  #qmakeFlags = [ "CONFIG+=qtquickcompiler" "BUNDLE_FONT=true" ];
-
   nativeBuildInputs = [ pkgconfig cmake wrapQtAppsHook ];
-  buildInputs = [ qtbase qtkeychain-qt5 qtquickcontrols2 qtmultimedia qtgraphicaleffects qtdeclarative olm cmark ]
+  buildInputs = [ qtbase qtkeychain-qt5 qtquickcontrols2 qtmultimedia qtgraphicaleffects qtdeclarative olm libsecret cmark ]
     ++ stdenv.lib.optional stdenv.hostPlatform.isLinux libpulseaudio
     ++ stdenv.lib.optional stdenv.hostPlatform.isDarwin qtmacextras;
 
   meta = with stdenv.lib; {
     description = "A glossy cross-platform Matrix client.";
-    homepage = "https://gitlab.com/b0/spectral";
+    homepage = "https://spectral.im";
     license = licenses.gpl3;
     platforms = with platforms; linux ++ darwin;
     maintainers = with maintainers; [ dtzWill ];
diff --git a/pkgs/applications/networking/instant-messengers/teams/default.nix b/pkgs/applications/networking/instant-messengers/teams/default.nix
index 0921dcfccdd..ef7e3717f72 100644
--- a/pkgs/applications/networking/instant-messengers/teams/default.nix
+++ b/pkgs/applications/networking/instant-messengers/teams/default.nix
@@ -15,11 +15,11 @@
 
 stdenv.mkDerivation rec {
   pname = "teams";
-  version = "1.2.00.32451";
+  version = "1.3.00.958";
 
   src = fetchurl {
     url = "https://packages.microsoft.com/repos/ms-teams/pool/main/t/teams/teams_${version}_amd64.deb";
-    sha256 = "1p053kg5qksr78v2h7cxia5mb9kzgfwm6n99x579vfx48kka1n18";
+    sha256 = "015awxgbwk4j973jnxj7q3i8csx7wnwpwp5g4jlmn7z8fxwy83d5";
   };
 
   nativeBuildInputs = [ dpkg autoPatchelfHook wrapGAppsHook ];
diff --git a/pkgs/applications/networking/instant-messengers/telegram/tdesktop/default.nix b/pkgs/applications/networking/instant-messengers/telegram/tdesktop/default.nix
index e57ff881af3..3f6d9c49898 100644
--- a/pkgs/applications/networking/instant-messengers/telegram/tdesktop/default.nix
+++ b/pkgs/applications/networking/instant-messengers/telegram/tdesktop/default.nix
@@ -1,79 +1,70 @@
-{ mkDerivation, lib, fetchFromGitHub, fetchsvn, fetchpatch
-, pkgconfig, pythonPackages, cmake, wrapGAppsHook, wrapQtAppsHook, gcc9
-, qtbase, qtimageformats, gtk3, libappindicator-gtk3, libnotify, xdg_utils
+{ mkDerivation, lib, fetchurl, fetchsvn
+, pkgconfig, cmake, ninja, python3, wrapGAppsHook, wrapQtAppsHook
+, qtbase, qtimageformats, gtk3, libappindicator-gtk3, enchant2, lz4, xxHash
 , dee, ffmpeg_4, openalSoft, minizip, libopus, alsaLib, libpulseaudio, range-v3
+# TODO: Shouldn't be required:
+, pcre, xorg, utillinux, libselinux, libsepol, epoxy, at-spi2-core, libXtst
+, xdg_utils
 }:
 
 with lib;
 
+# Main reference:
+# - This package is based on the Arch package:
+#   https://git.archlinux.org/svntogit/community.git/tree/trunk/PKGBUILD?h=packages/telegram-desktop
+# Other references that could be useful (but we should try to stick to Arch):
+# - https://git.alpinelinux.org/aports/tree/testing/telegram-desktop/APKBUILD
+# - https://github.com/void-linux/void-packages/blob/master/srcpkgs/telegram-desktop/template
+
 mkDerivation rec {
   pname = "telegram-desktop";
-  version = "1.8.15";
+  version = "1.9.8";
   # Note: Due to our strong dependency on the Arch patches it's probably best
   # to also wait for the Arch update (especially if the patches don't apply).
 
   # Telegram-Desktop with submodules
-  src = fetchFromGitHub {
-    owner = "telegramdesktop";
-    repo = "tdesktop";
-    rev = "v${version}";
-    sha256 = "03173y2nlkf757llgpia8p2dkkwsjra7b6qm5nhmkcwcm8kmsvyy";
-    fetchSubmodules = true;
+  src = fetchurl {
+    url = "https://github.com/telegramdesktop/tdesktop/releases/download/v${version}/tdesktop-${version}-full.tar.gz";
+    sha256 = "1rq3180l4ly0n0jj08cxy9l2d07scwp9hasmliva2xspyv7i9ksd";
   };
 
   # Arch patches (svn export telegram-desktop/trunk)
   archPatches = fetchsvn {
     url = "svn://svn.archlinux.org/community/telegram-desktop/trunk";
     # svn log svn://svn.archlinux.org/community/telegram-desktop/trunk
-    rev = "512849";
-    sha256 = "1hl7znvv6qr4cwpkj8wlplpa63i1lhk2iax7hb4l1s1a4mijx9ls";
-  };
-  privateHeadersPatch = fetchpatch {
-    url = "https://github.com/telegramdesktop/tdesktop/commit/b9d3ba621eb8af638af46c6b3cfd7a8330bf0dd5.patch";
-    sha256 = "1s5xvcp9dk0jfywssk8xfcsh7bk5xxif8xqnba0413lfx5rgvs5v";
+    rev = "554983";
+    sha256 = "02gk5dlrmxvyl7w1yxmwclknk1k9drpx6rxqc6vmmw85l763m95j";
   };
 
   # Note: It would be best if someone could get as many patches upstream as
   # possible (we currently depend a lot on custom patches...).
   patches = [
-    "${archPatches}/tdesktop.patch"
-    "${archPatches}/no-gtk2.patch"
-    "${archPatches}/Revert-Disable-DemiBold-fallback-for-Semibold.patch"
-    "${archPatches}/tdesktop_lottie_animation_qtdebug.patch"
-    # "${archPatches}/Revert-Change-some-private-header-includes.patch"
-    # "${archPatches}/Use-system-wide-font.patch"
+    "${archPatches}/0005-Use-system-wide-fonts.patch"
   ];
 
   postPatch = ''
     substituteInPlace Telegram/SourceFiles/platform/linux/linux_libs.cpp \
       --replace '"appindicator3"' '"${libappindicator-gtk3}/lib/libappindicator3.so"'
-    substituteInPlace Telegram/SourceFiles/platform/linux/linux_libnotify.cpp \
-      --replace '"notify"' '"${libnotify}/lib/libnotify.so"'
+    substituteInPlace Telegram/lib_spellcheck/spellcheck/platform/linux/linux_enchant.cpp \
+      --replace '"libenchant-2.so.2"' '"${enchant2}/lib/libenchant-2.so.2"'
   '';
 
   # We want to run wrapProgram manually (with additional parameters)
   dontWrapGApps = true;
   dontWrapQtApps = true;
 
-  nativeBuildInputs = [ pkgconfig pythonPackages.gyp cmake wrapGAppsHook wrapQtAppsHook gcc9 ];
+  nativeBuildInputs = [ pkgconfig cmake ninja python3 wrapGAppsHook wrapQtAppsHook ];
 
   buildInputs = [
-    qtbase qtimageformats gtk3 libappindicator-gtk3
+    qtbase qtimageformats gtk3 libappindicator-gtk3 enchant2 lz4 xxHash
     dee ffmpeg_4 openalSoft minizip libopus alsaLib libpulseaudio range-v3
+    # TODO: Shouldn't be required:
+    pcre xorg.libpthreadstubs xorg.libXdmcp utillinux libselinux libsepol epoxy at-spi2-core libXtst
   ];
 
   enableParallelBuilding = true;
 
-  GYP_DEFINES = concatStringsSep "," [
-    "TDESKTOP_DISABLE_CRASH_REPORTS"
-    "TDESKTOP_DISABLE_AUTOUPDATE"
-    "TDESKTOP_DISABLE_REGISTER_CUSTOM_SCHEME"
-  ];
-
   NIX_CFLAGS_COMPILE = [
-    "-DTDESKTOP_DISABLE_CRASH_REPORTS"
-    "-DTDESKTOP_DISABLE_AUTOUPDATE"
-    "-DTDESKTOP_DISABLE_REGISTER_CUSTOM_SCHEME"
     "-I${minizip}/include/minizip"
     # See Telegram/gyp/qt.gypi
     "-I${getDev qtbase}/mkspecs/linux-g++"
@@ -87,64 +78,47 @@ mkDerivation rec {
     ]) [ "QtCore" "QtGui" "QtDBus" ];
   CPPFLAGS = NIX_CFLAGS_COMPILE;
 
-  preConfigure = ''
-    # Patches to revert:
-    patch -R -Np1 -i "${privateHeadersPatch}"
-
-    # Patches to apply:
-    pushd "Telegram/ThirdParty/libtgvoip"
-    patch -Np1 -i "${archPatches}/libtgvoip.patch"
-    popd
-
-    # disable static-qt for rlottie
-    sed "/RLOTTIE_WITH_STATIC_QT/d" -i "Telegram/gyp/lib_rlottie.gyp"
-
-    sed -i Telegram/gyp/telegram/linux.gypi \
-      -e 's,/usr,/does-not-exist,g' \
-      -e 's,appindicator-0.1,appindicator3-0.1,g' \
-      -e 's,-flto,,g'
-
-    sed -i Telegram/gyp/modules/qt.gypi \
-      -e "s,/usr/include/qt/QtCore/,${qtbase.dev}/include/QtCore/,g" \
-      -e 's,\d+",\d+" | head -n1,g'
-    sed -i Telegram/gyp/modules/qt_moc.gypi \
-      -e "s,/usr/bin/moc,moc,g"
-    sed -i Telegram/gyp/modules/qt_rcc.gypi \
-      -e "s,/usr/bin/rcc,rcc,g"
-
-    # Build system assumes x86, but it works fine on non-x86 if we patch this one flag out
-    sed -i Telegram/ThirdParty/libtgvoip/libtgvoip.gyp \
-      -e "/-msse2/d"
-
-    gyp \
-      -Dapi_id=17349 \
-      -Dapi_hash=344583e45741c457fe1862106095a5eb \
-      -Dbuild_defines=${GYP_DEFINES} \
-      -Gconfig=Release \
-      --depth=Telegram/gyp \
-      --generator-output=../.. \
-      -Goutput_dir=out \
-      --format=cmake \
-      Telegram/gyp/Telegram.gyp
-
-    cd out/Release
-
-    NUM=$((`wc -l < CMakeLists.txt` - 2))
-    sed -i "$NUM r $archPatches/CMakeLists.inj" CMakeLists.txt
-
-    export ASM=$(type -p gcc)
-  '';
+  cmakeFlags = [
+    "-Ddisable_autoupdate=ON"
+    #"-DTDESKTOP_API_TEST=ON" # TODO: Officiall API credentials for Nixpkgs
+    "-DTDESKTOP_API_ID=17349" # See: https://github.com/NixOS/nixpkgs/issues/55271
+    "-DTDESKTOP_API_HASH=344583e45741c457fe1862106095a5eb"
+    "-DDESKTOP_APP_USE_GLIBC_WRAPS=OFF"
+    "-DDESKTOP_APP_USE_PACKAGED=ON"
+    "-DDESKTOP_APP_USE_PACKAGED_RLOTTIE=OFF"
+    "-DDESKTOP_APP_DISABLE_CRASH_REPORTS=ON"
+    "-DTDESKTOP_DISABLE_REGISTER_CUSTOM_SCHEME=ON"
+    "-DTDESKTOP_DISABLE_DESKTOP_FILE_GENERATION=ON"
+    "-DTDESKTOP_USE_PACKAGED_TGVOIP=OFF"
+    #"-DDESKTOP_APP_SPECIAL_TARGET=\"\"" # TODO: Error when set to "": Bad special target '""'
+    "-DTDESKTOP_LAUNCHER_BASENAME=telegramdesktop" # Note: This is the default
+  ];
 
-  cmakeFlags = [ "-UTDESKTOP_OFFICIAL_TARGET" ];
+  # Note: The following packages could be packaged system-wide, but it's
+  # probably best to use the bundled ones from tdesktop (Arch does this too):
+  # rlottie:
+  # - CMake flag: "-DTDESKTOP_USE_PACKAGED_TGVOIP=ON"
+  # - Sources (problem: there are no stable releases!):
+  #   - desktop-app (tdesktop): https://github.com/desktop-app/rlottie
+  #   - upstream: https://github.com/Samsung/rlottie
+  # libtgvoip:
+  # - CMake flag: "-DDESKTOP_APP_USE_PACKAGED_RLOTTIE=ON"
+  # - Sources  (problem: the stable releases might be too old!):
+  #   - tdesktop: https://github.com/telegramdesktop/libtgvoip
+  #   - upstream: https://github.com/grishka/libtgvoip
+  # Both of these packages are included in this PR (kotatogram-desktop):
+  # https://github.com/NixOS/nixpkgs/pull/75210
 
   installPhase = ''
-    install -Dm755 Telegram $out/bin/telegram-desktop
+    install -Dm755 bin/telegram-desktop $out/bin/telegram-desktop
+
+    mkdir -p $out/share/{kservices5,applications,metainfo}
+    sed "s,/usr/bin,$out/bin,g" "../lib/xdg/tg.protocol" > "$out/share/kservices5/tg.protocol"
+    install -m444 "../lib/xdg/telegramdesktop.desktop" "$out/share/applications/telegram-desktop.desktop"
+    install -m644 "../lib/xdg/telegramdesktop.appdata.xml" "$out/share/metainfo/telegramdesktop.metainfo.xml"
 
-    mkdir -p $out/share/applications $out/share/kde4/services
-    install -m444 "$src/lib/xdg/telegramdesktop.desktop" "$out/share/applications/telegram-desktop.desktop"
-    sed "s,/usr/bin,$out/bin,g" $archPatches/tg.protocol > $out/share/kde4/services/tg.protocol
     for icon_size in 16 32 48 64 128 256 512; do
-      install -Dm644 "../../../Telegram/Resources/art/icon''${icon_size}.png" "$out/share/icons/hicolor/''${icon_size}x''${icon_size}/apps/telegram.png"
+      install -Dm644 "../Telegram/Resources/art/icon''${icon_size}.png" "$out/share/icons/hicolor/''${icon_size}x''${icon_size}/apps/telegram.png"
     done
   '';
 
@@ -155,7 +129,8 @@ mkDerivation rec {
       "''${gappsWrapperArgs[@]}" \
       "''${qtWrapperArgs[@]}" \
       --prefix PATH : ${xdg_utils}/bin \
-      --set XDG_RUNTIME_DIR "XDG-RUNTIME-DIR"
+      --set XDG_RUNTIME_DIR "XDG-RUNTIME-DIR" \
+      --unset QT_QPA_PLATFORMTHEME # From the Arch wrapper
     sed -i $out/bin/telegram-desktop \
       -e "s,'XDG-RUNTIME-DIR',\"\''${XDG_RUNTIME_DIR:-/run/user/\$(id --user)}\","
   '';
diff --git a/pkgs/applications/networking/instant-messengers/zoom-us/default.nix b/pkgs/applications/networking/instant-messengers/zoom-us/default.nix
index 972d7c13a28..cc19bbd7156 100644
--- a/pkgs/applications/networking/instant-messengers/zoom-us/default.nix
+++ b/pkgs/applications/networking/instant-messengers/zoom-us/default.nix
@@ -14,11 +14,11 @@ assert pulseaudioSupport -> libpulseaudio != null;
 let
   inherit (stdenv.lib) concatStringsSep makeBinPath optional;
 
-  version = "3.5.336627.1216";
+  version = "3.5.352596.0119";
   srcs = {
     x86_64-linux = fetchurl {
       url = "https://zoom.us/client/${version}/zoom_x86_64.tar.xz";
-      sha256 = "04r45z2rjjn9gr7bxhfwg49xkyhmpcn5y6pdbkdnrfwzaqzisavz";
+      sha256 = "1h8wki0b920k0hcy812w91ara59z4rmfllxx04nbmzsxh0bvsx90";
     };
   };