@@ -28,13 +28,17 @@ mkDerivation rec {
2828 sha256 = archPatchesHash;
2929 };
3030
31− # TODO: libtgvoip.patch no-gtk2.patch
32− # TODO: Avoid tdesktop_lottie_animation_qtdebug.patch and tdesktop_qtlottie_qtdebug.patch
33− patches = [ "${archPatches}/tdesktop.patch" "${archPatches}/tdesktop_lottie_animation_qtdebug.patch" ];
31+ patches = [
32+ "${archPatches}/tdesktop.patch"
33+ "${archPatches}/no-gtk2.patch"
34+ # "${archPatches}/Use-system-wide-font.patch"
35+ "${archPatches}/tdesktop_lottie_animation_qtdebug.patch"
36+ "${archPatches}/issue6219.patch"
37+ ];
3438
3539 postPatch = ''
3640 substituteInPlace Telegram/SourceFiles/platform/linux/linux_libs.cpp \
37− --replace '"appindicator"' '"${libappindicator-gtk3}/lib/libappindicator3.so"'
41+ --replace '"appindicator3"' '"${libappindicator-gtk3}/lib/libappindicator3.so"'
3842 substituteInPlace Telegram/SourceFiles/platform/linux/linux_libnotify.cpp \
3943 --replace '"notify"' '"${libnotify}/lib/libnotify.so"'
4044 '';
@@ -75,12 +79,14 @@ mkDerivation rec {
7579 CPPFLAGS = NIX_CFLAGS_COMPILE;
7680
7781 preConfigure = ''
82+ patch -R -Np1 -i "${archPatches}/demibold.patch"
83+
7884 pushd "Telegram/ThirdParty/libtgvoip"
7985 patch -Np1 -i "${archPatches}/libtgvoip.patch"
8086 popd
81− pushd "Telegram/ThirdParty/qtlottie"
82− patch -Np1 -i "${archPatches}/tdesktop_qtlottie_qtdebug.patch"
83− popd
87+
88+ # disable static-qt for rlottie
89+ sed "/RLOTTIE_WITH_STATIC_QT/d" -i "Telegram/gyp/lib_rlottie.gyp"
8490
8591 sed -i Telegram/gyp/telegram_linux.gypi \
8692 -e 's,/usr,/does-not-exist,g' \
@@ -118,6 +124,8 @@ mkDerivation rec {
118124 export ASM=$(type -p gcc)
119125 '';
120126
127+ cmakeFlags = [ "-UTDESKTOP_OFFICIAL_TARGET" ];
128+
121129 installPhase = ''
122130 install -Dm755 Telegram $out/bin/telegram-desktop
123131