Merge pull request #168059 from ilya-fedin/kotatogram-with-webkit
kotatogram-desktop-with-webkit: init
This commit is contained in:
commit
ae07156fc3
3 changed files with 25 additions and 21 deletions
|
@ -7,7 +7,6 @@
|
|||
, ninja
|
||||
, clang
|
||||
, python3
|
||||
, wrapGAppsHook
|
||||
, wrapQtAppsHook
|
||||
, removeReferencesTo
|
||||
, extra-cmake-modules
|
||||
|
@ -27,7 +26,6 @@
|
|||
, tl-expected
|
||||
, hunspell
|
||||
, glibmm
|
||||
, webkitgtk
|
||||
, jemalloc
|
||||
, rnnoise
|
||||
, abseil-cpp
|
||||
|
@ -65,7 +63,6 @@
|
|||
, IOSurface
|
||||
, Metal
|
||||
, MetalKit
|
||||
, withWebKit ? false
|
||||
}:
|
||||
|
||||
with lib;
|
||||
|
@ -113,9 +110,6 @@ stdenv.mkDerivation rec {
|
|||
--replace '"libasound.so.2"' '"${alsa-lib}/lib/libasound.so.2"'
|
||||
substituteInPlace Telegram/ThirdParty/libtgvoip/os/linux/AudioPulse.cpp \
|
||||
--replace '"libpulse.so.0"' '"${libpulseaudio}/lib/libpulse.so.0"'
|
||||
'' + optionalString (stdenv.isLinux && withWebKit) ''
|
||||
substituteInPlace Telegram/lib_webview/webview/platform/linux/webview_linux_webkit_gtk.cpp \
|
||||
--replace '"libwebkit2gtk-4.0.so.37"' '"${webkitgtk}/lib/libwebkit2gtk-4.0.so.37"'
|
||||
'' + optionalString stdenv.isDarwin ''
|
||||
substituteInPlace Telegram/CMakeLists.txt \
|
||||
--replace 'COMMAND iconutil' 'COMMAND png2icns' \
|
||||
|
@ -124,10 +118,6 @@ stdenv.mkDerivation rec {
|
|||
--replace "\''${appicon_path}" "\''${appicon_path}/icon_16x16.png \''${appicon_path}/icon_32x32.png \''${appicon_path}/icon_128x128.png \''${appicon_path}/icon_256x256.png \''${appicon_path}/icon_512x512.png"
|
||||
'';
|
||||
|
||||
# We want to run wrapProgram manually (with additional parameters)
|
||||
dontWrapGApps = stdenv.isLinux;
|
||||
dontWrapQtApps = stdenv.isLinux && withWebKit;
|
||||
|
||||
nativeBuildInputs = [
|
||||
pkg-config
|
||||
cmake
|
||||
|
@ -139,8 +129,6 @@ stdenv.mkDerivation rec {
|
|||
# to build bundled libdispatch
|
||||
clang
|
||||
extra-cmake-modules
|
||||
] ++ optionals (stdenv.isLinux && withWebKit) [
|
||||
wrapGAppsHook
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
|
@ -166,8 +154,6 @@ stdenv.mkDerivation rec {
|
|||
glibmm
|
||||
jemalloc
|
||||
wayland
|
||||
] ++ optionals (stdenv.isLinux && withWebKit) [
|
||||
webkitgtk
|
||||
] ++ optionals stdenv.isDarwin [
|
||||
Cocoa
|
||||
CoreFoundation
|
||||
|
@ -225,13 +211,6 @@ stdenv.mkDerivation rec {
|
|||
remove-references-to -t ${tg_owt.dev} $out/bin/$binName
|
||||
'';
|
||||
|
||||
postFixup = optionalString (stdenv.isLinux && withWebKit) ''
|
||||
# We also use gappsWrapperArgs from wrapGAppsHook.
|
||||
wrapProgram $out/bin/kotatogram-desktop \
|
||||
"''${gappsWrapperArgs[@]}" \
|
||||
"''${qtWrapperArgs[@]}"
|
||||
'';
|
||||
|
||||
passthru = {
|
||||
inherit tg_owt;
|
||||
};
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
{ stdenv, lib, kotatogram-desktop, glib-networking, webkitgtk, makeWrapper }:
|
||||
|
||||
with lib;
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "${kotatogram-desktop.pname}-with-webkit";
|
||||
version = kotatogram-desktop.version;
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
dontUnpack = true;
|
||||
installPhase = ''
|
||||
mkdir -p $out
|
||||
cp -r ${kotatogram-desktop}/share $out
|
||||
'';
|
||||
postFixup = ''
|
||||
mkdir -p $out/bin
|
||||
makeWrapper ${kotatogram-desktop}/bin/kotatogram-desktop $out/bin/kotatogram-desktop \
|
||||
--prefix GIO_EXTRA_MODULES : ${glib-networking}/lib/gio/modules \
|
||||
--prefix LD_LIBRARY_PATH : ${makeLibraryPath [ webkitgtk ]}
|
||||
'';
|
||||
meta = kotatogram-desktop.meta // {
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
|
@ -27058,6 +27058,8 @@ with pkgs;
|
|||
abseil-cpp = abseil-cpp_202111;
|
||||
};
|
||||
|
||||
kotatogram-desktop-with-webkit = callPackage ../applications/networking/instant-messengers/telegram/kotatogram-desktop/with-webkit.nix {};
|
||||
|
||||
kpt = callPackage ../applications/networking/cluster/kpt { };
|
||||
|
||||
krane = callPackage ../applications/networking/cluster/krane { };
|
||||
|
|
Loading…
Reference in a new issue