telegram-desktop: 4.8.1 -> 4.8.3

This commit is contained in:
Nick Cao 2023-06-02 14:39:06 +08:00
parent 9eee76ae0d
commit 4fb5325fdf
No known key found for this signature in database

View File

@ -6,6 +6,7 @@
, cmake , cmake
, ninja , ninja
, python3 , python3
, gobject-introspection
, wrapGAppsHook , wrapGAppsHook
, wrapQtAppsHook , wrapQtAppsHook
, extra-cmake-modules , extra-cmake-modules
@ -13,8 +14,9 @@
, qtwayland , qtwayland
, qtsvg , qtsvg
, qtimageformats , qtimageformats
, qt5compat
, gtk3 , gtk3
, boost
, fmt
, libdbusmenu , libdbusmenu
, lz4 , lz4
, xxHash , xxHash
@ -74,14 +76,14 @@ let
in in
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "telegram-desktop"; pname = "telegram-desktop";
version = "4.8.1"; version = "4.8.3";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "telegramdesktop"; owner = "telegramdesktop";
repo = "tdesktop"; repo = "tdesktop";
rev = "v${version}"; rev = "v${version}";
fetchSubmodules = true; fetchSubmodules = true;
sha256 = "0mxxfh70dffkrq76nky3pwrk10s1q4ahxx2ddb58dz8igq6pl4zi"; hash = "sha256-fvg9SFHRHeJVogYQ+vyVqGyLGnOjM5Osi3H0SNGe9fY=";
}; };
patches = [ patches = [
@ -103,6 +105,8 @@ stdenv.mkDerivation rec {
--replace '"libpulse.so.0"' '"${libpulseaudio}/lib/libpulse.so.0"' --replace '"libpulse.so.0"' '"${libpulseaudio}/lib/libpulse.so.0"'
substituteInPlace Telegram/lib_webview/webview/platform/linux/webview_linux_webkitgtk_library.cpp \ substituteInPlace Telegram/lib_webview/webview/platform/linux/webview_linux_webkitgtk_library.cpp \
--replace '"libwebkitgtk-6.0.so.4"' '"${webkitgtk_6_0}/lib/libwebkitgtk-6.0.so.4"' --replace '"libwebkitgtk-6.0.so.4"' '"${webkitgtk_6_0}/lib/libwebkitgtk-6.0.so.4"'
substituteInPlace cmake/external/glib/CMakeLists.txt \
--replace 'add_subdirectory(cppgir)' 'add_subdirectory(cppgir EXCLUDE_FROM_ALL)'
''; '';
# We want to run wrapProgram manually (with additional parameters) # We want to run wrapProgram manually (with additional parameters)
@ -114,6 +118,7 @@ stdenv.mkDerivation rec {
cmake cmake
ninja ninja
python3 python3
gobject-introspection
wrapGAppsHook wrapGAppsHook
wrapQtAppsHook wrapQtAppsHook
extra-cmake-modules extra-cmake-modules
@ -124,8 +129,9 @@ stdenv.mkDerivation rec {
qtwayland qtwayland
qtsvg qtsvg
qtimageformats qtimageformats
qt5compat
gtk3 gtk3
boost
fmt
libdbusmenu libdbusmenu
lz4 lz4
xxHash xxHash
@ -174,6 +180,11 @@ stdenv.mkDerivation rec {
"-DDESKTOP_APP_USE_PACKAGED_FONTS=OFF" "-DDESKTOP_APP_USE_PACKAGED_FONTS=OFF"
]; ];
preBuild = ''
# for cppgir to locate gir files
export GI_GIR_PATH="$XDG_DATA_DIRS"
'';
postFixup = '' postFixup = ''
# This is necessary to run Telegram in a pure environment. # This is necessary to run Telegram in a pure environment.
# We also use gappsWrapperArgs from wrapGAppsHook. # We also use gappsWrapperArgs from wrapGAppsHook.