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
|
, ninja
|
||||||
, clang
|
, clang
|
||||||
, python3
|
, python3
|
||||||
, wrapGAppsHook
|
|
||||||
, wrapQtAppsHook
|
, wrapQtAppsHook
|
||||||
, removeReferencesTo
|
, removeReferencesTo
|
||||||
, extra-cmake-modules
|
, extra-cmake-modules
|
||||||
|
@ -27,7 +26,6 @@
|
||||||
, tl-expected
|
, tl-expected
|
||||||
, hunspell
|
, hunspell
|
||||||
, glibmm
|
, glibmm
|
||||||
, webkitgtk
|
|
||||||
, jemalloc
|
, jemalloc
|
||||||
, rnnoise
|
, rnnoise
|
||||||
, abseil-cpp
|
, abseil-cpp
|
||||||
|
@ -65,7 +63,6 @@
|
||||||
, IOSurface
|
, IOSurface
|
||||||
, Metal
|
, Metal
|
||||||
, MetalKit
|
, MetalKit
|
||||||
, withWebKit ? false
|
|
||||||
}:
|
}:
|
||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
|
@ -113,9 +110,6 @@ stdenv.mkDerivation rec {
|
||||||
--replace '"libasound.so.2"' '"${alsa-lib}/lib/libasound.so.2"'
|
--replace '"libasound.so.2"' '"${alsa-lib}/lib/libasound.so.2"'
|
||||||
substituteInPlace Telegram/ThirdParty/libtgvoip/os/linux/AudioPulse.cpp \
|
substituteInPlace Telegram/ThirdParty/libtgvoip/os/linux/AudioPulse.cpp \
|
||||||
--replace '"libpulse.so.0"' '"${libpulseaudio}/lib/libpulse.so.0"'
|
--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 ''
|
'' + optionalString stdenv.isDarwin ''
|
||||||
substituteInPlace Telegram/CMakeLists.txt \
|
substituteInPlace Telegram/CMakeLists.txt \
|
||||||
--replace 'COMMAND iconutil' 'COMMAND png2icns' \
|
--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"
|
--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 = [
|
nativeBuildInputs = [
|
||||||
pkg-config
|
pkg-config
|
||||||
cmake
|
cmake
|
||||||
|
@ -139,8 +129,6 @@ stdenv.mkDerivation rec {
|
||||||
# to build bundled libdispatch
|
# to build bundled libdispatch
|
||||||
clang
|
clang
|
||||||
extra-cmake-modules
|
extra-cmake-modules
|
||||||
] ++ optionals (stdenv.isLinux && withWebKit) [
|
|
||||||
wrapGAppsHook
|
|
||||||
];
|
];
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
|
@ -166,8 +154,6 @@ stdenv.mkDerivation rec {
|
||||||
glibmm
|
glibmm
|
||||||
jemalloc
|
jemalloc
|
||||||
wayland
|
wayland
|
||||||
] ++ optionals (stdenv.isLinux && withWebKit) [
|
|
||||||
webkitgtk
|
|
||||||
] ++ optionals stdenv.isDarwin [
|
] ++ optionals stdenv.isDarwin [
|
||||||
Cocoa
|
Cocoa
|
||||||
CoreFoundation
|
CoreFoundation
|
||||||
|
@ -225,13 +211,6 @@ stdenv.mkDerivation rec {
|
||||||
remove-references-to -t ${tg_owt.dev} $out/bin/$binName
|
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 = {
|
passthru = {
|
||||||
inherit tg_owt;
|
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;
|
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 { };
|
kpt = callPackage ../applications/networking/cluster/kpt { };
|
||||||
|
|
||||||
krane = callPackage ../applications/networking/cluster/krane { };
|
krane = callPackage ../applications/networking/cluster/krane { };
|
||||||
|
|
Loading…
Reference in a new issue