From patchwork Thu Sep 8 12:40:56 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hilton Chain X-Patchwork-Id: 42329 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id EDFF327BBEA; Thu, 8 Sep 2022 13:43:05 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-0.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,FROM_SUSPICIOUS_NTLD,MAILING_LIST_MULTI,PDS_OTHER_BAD_TLD, SPF_HELO_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id A88CB27BBE9 for ; Thu, 8 Sep 2022 13:43:05 +0100 (BST) Received: from localhost ([::1]:41656 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oWGs3-0005LP-LX for patchwork@mira.cbaines.net; Thu, 08 Sep 2022 08:43:03 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40612) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oWGr4-0004PZ-5J for guix-patches@gnu.org; Thu, 08 Sep 2022 08:42:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:40593) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oWGr3-0002Nr-Rz for guix-patches@gnu.org; Thu, 08 Sep 2022 08:42:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oWGr3-0006wC-OF for guix-patches@gnu.org; Thu, 08 Sep 2022 08:42:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57675] [PATCH v2 1/5] gnu: Add abseil-cpp-for-webrtc-for-telegram-desktop. In-Reply-To: Resent-From: Hilton Chain Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 08 Sep 2022 12:42:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57675 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 57675@debbugs.gnu.org Received: via spool by 57675-submit@debbugs.gnu.org id=B57675.166264087926603 (code B ref 57675); Thu, 08 Sep 2022 12:42:01 +0000 Received: (at 57675) by debbugs.gnu.org; 8 Sep 2022 12:41:19 +0000 Received: from localhost ([127.0.0.1]:57522 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oWGqN-0006v1-2G for submit@debbugs.gnu.org; Thu, 08 Sep 2022 08:41:19 -0400 Received: from mail.boiledscript.com ([144.168.59.46]:34676) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oWGqL-0006ul-08 for 57675@debbugs.gnu.org; Thu, 08 Sep 2022 08:41:17 -0400 Date: Thu, 08 Sep 2022 20:40:56 +0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ultrarare.space; s=dkim; t=1662640870; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: references:references; bh=O961rQ1JBvxxG23bwlIvqkBi0Q6yb2bEuDnKU/bnONg=; b=Z1ks9AZXPY+8Ksz5oFwIj95j9xmQUJmHEBgO3OtaNN8XDWms4zLicqJ9nfdZhMYPDCG2iZ +LeclFsY1rJHOy8i/VUVolclfvIDi8haN2xOCEWSUX4Z0z3Xlny5BZZzmY0f6lTBaX87Bw YPnexEJ9rTBMV0nOvWCOAnuKtQvIOvN40goKYJ6k3GNmcz+OEt2jOy3DIQXCafmgm5L4Qp Zl+UrxfxFz/Jla+DjYLVkeSR8egoHjNkd00YG17pBd/t3kw76PVNPM1DiCRF/sQPmZPvqU 4PG/f7nhUWxy430MT+YU8kiE7NfZDWcAWDSl+CSSTm9fpEDh70uZ88B18Gnq3Q== Message-ID: References: MIME-Version: 1.0 Authentication-Results: mail.boiledscript.com; auth=pass smtp.mailfrom=hako@ultrarare.space X-Spamd-Bar: / X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" Reply-to: Hilton Chain X-ACL-Warn: , Hilton Chain via Guix-patches X-Patchwork-Original-From: Hilton Chain via Guix-patches via From: Hilton Chain X-getmail-retrieved-from-mailbox: Patches * gnu/packages/telegram.scm (abseil-cpp-for-webrtc-for-telegram-desktop): New variable. --- gnu/packages/telegram.scm | 13 +++++++++++++ 1 file changed, 13 insertions(+) -- 2.37.2 diff --git a/gnu/packages/telegram.scm b/gnu/packages/telegram.scm index 4976acbc0c..d41ace6181 100644 --- a/gnu/packages/telegram.scm +++ b/gnu/packages/telegram.scm @@ -62,6 +62,7 @@ (define-module (gnu packages telegram) #:use-module (gnu packages xorg) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) + #:use-module (guix utils) #:use-module (guix git-download) #:use-module (guix build-system cmake) #:use-module (guix build-system copy) @@ -71,6 +72,18 @@ (define-module (gnu packages telegram) #:use-module (guix build-system python) #:use-module (guix build-system qt)) +(define-public abseil-cpp-for-webrtc-for-telegram-desktop + (let ((base abseil-cpp)) + ;; Abseil built with pre C++17 standards enforcing would cause a linking + ;; issue when building Telegram Destop. (Currently it's by default 11, and + ;; has changed to 14 upstream.) + (hidden-package + (package/inherit base + (arguments + (substitute-keyword-arguments (package-arguments base) + ((#:configure-flags flags) + `(cons* "-DCMAKE_CXX_STANDARD=17" ,flags)))))))) + (define-public webrtc-for-telegram-desktop (let ((commit "91d836dc84a16584c6ac52b36c04c0de504d9c34") (revision "166")) From patchwork Thu Sep 8 12:41:35 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hilton Chain X-Patchwork-Id: 42331 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 0AB2127BBEA; Thu, 8 Sep 2022 13:51:20 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-0.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,FROM_SUSPICIOUS_NTLD,MAILING_LIST_MULTI,PDS_OTHER_BAD_TLD, SPF_HELO_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 9A0F027BBE9 for ; Thu, 8 Sep 2022 13:51:18 +0100 (BST) Received: from localhost ([::1]:52562 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oWH01-0006Ia-MK for patchwork@mira.cbaines.net; Thu, 08 Sep 2022 08:51:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40614) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oWGr4-0004Q8-IX for guix-patches@gnu.org; Thu, 08 Sep 2022 08:42:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:40594) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oWGr4-0002Nw-9l for guix-patches@gnu.org; Thu, 08 Sep 2022 08:42:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oWGr4-0006wJ-5X for guix-patches@gnu.org; Thu, 08 Sep 2022 08:42:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57675] [PATCH v2 2/5] gnu: webrtc-for-telegram-desktop: Update to a5fbc9. Resent-From: Hilton Chain Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 08 Sep 2022 12:42:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57675 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 57675@debbugs.gnu.org Received: via spool by 57675-submit@debbugs.gnu.org id=B57675.166264091826658 (code B ref 57675); Thu, 08 Sep 2022 12:42:02 +0000 Received: (at 57675) by debbugs.gnu.org; 8 Sep 2022 12:41:58 +0000 Received: from localhost ([127.0.0.1]:57525 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oWGqz-0006vt-Ht for submit@debbugs.gnu.org; Thu, 08 Sep 2022 08:41:58 -0400 Received: from mail.boiledscript.com ([144.168.59.46]:57646) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oWGqx-0006vg-EH for 57675@debbugs.gnu.org; Thu, 08 Sep 2022 08:41:56 -0400 Date: Thu, 08 Sep 2022 20:41:35 +0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ultrarare.space; s=dkim; t=1662640909; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=hUoOTbZY8gJBQKIVR9L8rEktOEegq5W05ppf9R8+WlM=; b=Ow1WnMoNbv7uXPqS9J24Y7gdoG9H6ENuW5GfIjPm8I2KpjwELKYL5Xjef9dsSPA7slqc7+ oXZgdryHhckHOIL7W6IV59BiG+JaSQr1VU3n8Ry7tL3uMryuKmjpxXTwkhhilhw/vTdbMa dDEYXOLNQ8hrMH+0VO8U47NblS/CXDBIIBd/H2sBet4XMWNxAr+4Si+/ztdi/i5VrJOOJm FSxBWR5aDfBnOsj7N0wqPPrl4p6CLSTLKsZqj+rEaFSEoVn3UT1NoMtD2cxOkEgn7V7AsK DVOh2IiucIuQxFvpc1gsBxu5M0Nph3zW4+lgaEMcJHWR7xmnWpR00CLIuq4QZg== Message-ID: In-Reply-To: References: MIME-Version: 1.0 Authentication-Results: mail.boiledscript.com; auth=pass smtp.mailfrom=hako@ultrarare.space X-Spamd-Bar: / X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" Reply-to: Hilton Chain X-ACL-Warn: , Hilton Chain via Guix-patches X-Patchwork-Original-From: Hilton Chain via Guix-patches via From: Hilton Chain X-getmail-retrieved-from-mailbox: Patches * gnu/packages/patches/webrtc-for-telegram-desktop-add-missing-cstdint.patch: New file. * gnu/packages/patches/webrtc-for-telegram-desktop-allow-disabling-X11.patch: New file. * gnu/local.mk: Add patches. * gnu/packages/telegram.scm (webrtc-for-telegram-desktop): Update to a5fbc9 and simplify inputs style. [source]: 1. Bump version to a5fbc9123e056e611e69acf0ceb4252ddd838adb. 2. Patch: Add missing header. 3. Patch: Add configure flag TG_OWT_USE_X11 for disabling X11. 4. Bundled 3rd-party libraries: Remove openh264 and libvpx for building with system libraries, Drop usrsctp which is no longer available in source. [#:configure-flags]: 1. Available flags with default values are written and commented out. [#:phases]: 1. Drop the use of libvpx source. 2. Add crc32c source (which is intended to be checked out recursively). 3. Build and install with cmake utility. [inputs]: 1. Use abseil-cpp-for-webrtc-for-telegram-desktop for abseil-cpp. 2. Use variable external-sources to manage source chekouts. 3. Add crc32c checkout. 4. Catalog inputs required by certain configure flags. 5. Drop unneeded inputs. [native-inputs]: 1. Add ninja for use with cmake. 2. Drop perl. [propagated-inputs]: 1. Move libraries also required by telegram-desktop here from inputs. [license]: 1. Sync with source tree changes. --- gnu/local.mk | 2 + ...telegram-desktop-add-missing-cstdint.patch | 21 +++ ...telegram-desktop-allow-disabling-X11.patch | 123 +++++++++++++ gnu/packages/telegram.scm | 172 ++++++++++-------- 4 files changed, 243 insertions(+), 75 deletions(-) create mode 100644 gnu/packages/patches/webrtc-for-telegram-desktop-add-missing-cstdint.patch create mode 100644 gnu/packages/patches/webrtc-for-telegram-desktop-allow-disabling-X11.patch -- 2.37.2 diff --git a/gnu/local.mk b/gnu/local.mk index 19102113c9..d0e5aeb125 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1966,6 +1966,8 @@ dist_patch_DATA = \ %D%/packages/patches/warsow-qfusion-fix-bool-return-type.patch \ %D%/packages/patches/webkitgtk-adjust-bubblewrap-paths.patch \ %D%/packages/patches/webrtc-audio-processing-big-endian.patch \ + %D%/packages/patches/webrtc-for-telegram-desktop-add-missing-cstdint.patch \ + %D%/packages/patches/webrtc-for-telegram-desktop-allow-disabling-X11.patch \ %D%/packages/patches/websocketpp-fix-for-cmake-3.15.patch \ %D%/packages/patches/widelands-add-missing-map-include.patch \ %D%/packages/patches/widelands-system-wide_minizip.patch \ diff --git a/gnu/packages/patches/webrtc-for-telegram-desktop-add-missing-cstdint.patch b/gnu/packages/patches/webrtc-for-telegram-desktop-add-missing-cstdint.patch new file mode 100644 index 0000000000..9dee9cf8e3 --- /dev/null +++ b/gnu/packages/patches/webrtc-for-telegram-desktop-add-missing-cstdint.patch @@ -0,0 +1,21 @@ +From 86d2bcd7afb8706663d29e30f65863de5a626142 Mon Sep 17 00:00:00 2001 +From: Xiretza +Date: Sun, 15 May 2022 12:47:41 +0200 +Subject: [PATCH] fix(h265_pps_parser): fix missing cstdint include + +--- + src/common_video/h265/h265_pps_parser.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/common_video/h265/h265_pps_parser.h b/src/common_video/h265/h265_pps_parser.h +index 28c95ea9..c180b1b9 100644 +--- a/src/common_video/h265/h265_pps_parser.h ++++ b/src/common_video/h265/h265_pps_parser.h +@@ -12,6 +12,7 @@ + #define COMMON_VIDEO_H265_PPS_PARSER_H_ + + #include "absl/types/optional.h" ++#include + + namespace rtc { + class BitBuffer; diff --git a/gnu/packages/patches/webrtc-for-telegram-desktop-allow-disabling-X11.patch b/gnu/packages/patches/webrtc-for-telegram-desktop-allow-disabling-X11.patch new file mode 100644 index 0000000000..977f72475f --- /dev/null +++ b/gnu/packages/patches/webrtc-for-telegram-desktop-allow-disabling-X11.patch @@ -0,0 +1,123 @@ +Add -DTG_OWT_USE_X11 + +Allows disabling X11 desktop capturing independently of pipewire support, for +the few people that run wayland without any X11 support whatsoever. + +This setup is untested, but supported by the GNI build system, see: +* src/modules/desktop_capture/BUILD.gn (option rtc_use_x11_extensions) + +Toggling the WEBRTC_USE_X11 define also affects some files under +src/modules/audio_device, but that falls under "X11 support", regardless... + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 2e081ae7..c269177b 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -24,13 +24,14 @@ endif() + + option(BUILD_SHARED_LIBS "Builds shared libraries instead of static." OFF) + option(TG_OWT_USE_PROTOBUF "Use protobuf to generate additional headers. Useful for packaged build." ${BUILD_SHARED_LIBS}) ++cmake_dependent_option(TG_OWT_USE_X11 "Use X11 for desktop capture on non-Apple Unix." ON "UNIX; NOT APPLE" OFF) + cmake_dependent_option(TG_OWT_USE_PIPEWIRE "Use pipewire for desktop capture." ON "UNIX; NOT APPLE" OFF) + cmake_dependent_option(TG_OWT_DLOPEN_PIPEWIRE "dlopen pipewire for desktop capture." ${not_packaged_build} TG_OWT_USE_PIPEWIRE OFF) + option(TG_OWT_BUILD_AUDIO_BACKENDS "Build webrtc audio backends." OFF) + + if (BUILD_SHARED_LIBS) + set(CMAKE_POSITION_INDEPENDENT_CODE ON) +- message(WARNING ++ message(DEBUG + "tg_owt is a fork of Google's webrtc library and is developed by them as a static library without stable ABI in mind." + "The feature of building tg_owt as a shared library is community maintained, it may and will break at any time without guarantee to work again." + "Please reconsider your decision. Good luck." +@@ -96,6 +97,10 @@ endif() + add_library(tg_owt) + init_target(tg_owt) + ++if (TG_OWT_USE_X11) ++ link_x11(tg_owt) ++endif() ++ + if (TG_OWT_USE_PIPEWIRE) + if (TG_OWT_DLOPEN_PIPEWIRE) + include(cmake/generate_stubs.cmake) +@@ -188,10 +193,6 @@ endif() + include(cmake/libwebrtcbuild.cmake) + target_link_libraries(tg_owt PUBLIC tg_owt::libwebrtcbuild) + +-if (UNIX AND NOT APPLE) +- link_x11(tg_owt) +-endif() +- + function(add_sublibrary postfix) + add_library(tg_owt_${postfix} OBJECT) + init_feature_target(tg_owt_${postfix} ${postfix}) +@@ -2369,6 +2370,39 @@ if (NOT TG_OWT_USE_PROTOBUF) + ) + endif() + ++if (NOT TG_OWT_USE_X11) ++ remove_target_sources(tg_owt ${webrtc_loc} ++ # src/modules/desktop_capture/BUILD.gn (rtc_use_x11_extensions) ++ modules/desktop_capture/linux/x11/mouse_cursor_monitor_x11.cc ++ modules/desktop_capture/linux/x11/mouse_cursor_monitor_x11.h ++ modules/desktop_capture/linux/x11/screen_capturer_x11.cc ++ modules/desktop_capture/linux/x11/screen_capturer_x11.h ++ modules/desktop_capture/linux/x11/shared_x_display.cc ++ modules/desktop_capture/linux/x11/shared_x_display.h ++ modules/desktop_capture/linux/x11/window_capturer_x11.cc ++ modules/desktop_capture/linux/x11/window_capturer_x11.h ++ modules/desktop_capture/linux/x11/window_finder_x11.cc ++ modules/desktop_capture/linux/x11/window_finder_x11.h ++ modules/desktop_capture/linux/x11/window_list_utils.cc ++ modules/desktop_capture/linux/x11/window_list_utils.h ++ modules/desktop_capture/linux/x11/x_atom_cache.cc ++ modules/desktop_capture/linux/x11/x_atom_cache.h ++ modules/desktop_capture/linux/x11/x_error_trap.cc ++ modules/desktop_capture/linux/x11/x_error_trap.h ++ modules/desktop_capture/linux/x11/x_server_pixel_buffer.cc ++ modules/desktop_capture/linux/x11/x_server_pixel_buffer.h ++ modules/desktop_capture/linux/x11/x_window_property.cc ++ modules/desktop_capture/linux/x11/x_window_property.h ++ ++ # screen_drawer_linux.cc depends on x11, rest are revdeps ++ modules/desktop_capture/screen_drawer.cc ++ modules/desktop_capture/screen_drawer.h ++ modules/desktop_capture/screen_drawer_linux.cc ++ modules/desktop_capture/screen_drawer_lock_posix.cc ++ modules/desktop_capture/screen_drawer_lock_posix.h ++ ) ++endif() ++ + if (NOT TG_OWT_USE_PIPEWIRE) + remove_target_sources(tg_owt ${webrtc_loc} + modules/desktop_capture/linux/wayland/base_capturer_pipewire.cc +diff --git a/cmake/libwebrtcbuild.cmake b/cmake/libwebrtcbuild.cmake +index 4d037f4b..388b7aa9 100644 +--- a/cmake/libwebrtcbuild.cmake ++++ b/cmake/libwebrtcbuild.cmake +@@ -29,6 +29,13 @@ INTERFACE + BWE_TEST_LOGGING_COMPILE_TIME_ENABLE=0 + ) + ++if (TG_OWT_USE_X11) ++ target_compile_definitions(libwebrtcbuild ++ INTERFACE ++ WEBRTC_USE_X11 ++ ) ++endif() ++ + if (TG_OWT_USE_PIPEWIRE) + target_compile_definitions(libwebrtcbuild + INTERFACE +@@ -65,11 +72,6 @@ else() + INTERFACE + WEBRTC_MAC + ) +- else() +- target_compile_definitions(libwebrtcbuild +- INTERFACE +- WEBRTC_USE_X11 +- ) + endif() + + if (CMAKE_SYSTEM_NAME STREQUAL "Linux") diff --git a/gnu/packages/telegram.scm b/gnu/packages/telegram.scm index d41ace6181..d66a286167 100644 --- a/gnu/packages/telegram.scm +++ b/gnu/packages/telegram.scm @@ -30,6 +30,7 @@ (define-module (gnu packages telegram) #:use-module (gnu packages digest) #:use-module (gnu packages fcitx) #:use-module (gnu packages fcitx5) + #:use-module (gnu packages gl) #:use-module (gnu packages glib) #:use-module (gnu packages gnome) #:use-module (gnu packages gnupg) @@ -43,6 +44,7 @@ (define-module (gnu packages telegram) #:use-module (gnu packages linux) #:use-module (gnu packages lxqt) #:use-module (gnu packages lua) + #:use-module (gnu packages ninja) #:use-module (gnu packages perl) #:use-module (gnu packages pkg-config) #:use-module (gnu packages protobuf) @@ -58,11 +60,13 @@ (define-module (gnu packages telegram) #:use-module (gnu packages tls) #:use-module (gnu packages video) #:use-module (gnu packages web) + #:use-module (gnu packages xdisorg) #:use-module (gnu packages xiph) #:use-module (gnu packages xorg) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) #:use-module (guix utils) + #:use-module (guix gexp) #:use-module (guix git-download) #:use-module (guix build-system cmake) #:use-module (guix build-system copy) @@ -84,9 +88,12 @@ (define-public abseil-cpp-for-webrtc-for-telegram-desktop ((#:configure-flags flags) `(cons* "-DCMAKE_CXX_STANDARD=17" ,flags)))))))) +;; NOTE: Here's Telegram Desktop's official build guide. +;; https://github.com/telegramdesktop/tdesktop/wiki/The-Packaged-Building-Mode (define-public webrtc-for-telegram-desktop - (let ((commit "91d836dc84a16584c6ac52b36c04c0de504d9c34") - (revision "166")) + (let ((abseil-cpp abseil-cpp-for-webrtc-for-telegram-desktop) + (commit "a5fbc9123e056e611e69acf0ceb4252ddd838adb") + (revision "167")) (hidden-package (package (name "webrtc-for-telegram-desktop") @@ -97,94 +104,111 @@ (define-public webrtc-for-telegram-desktop (method git-fetch) (uri (git-reference - (url "https://github.com/desktop-app/tg_owt.git") + (url "https://github.com/desktop-app/tg_owt") (commit commit))) (file-name (git-file-name name version)) (sha256 - (base32 "0plwdp6xgxi27hif5j7kpq425cidxyxbbga3z2f64dsninwy5p1x")) + (base32 "12qirihhabv46vn27dpw7dz0smlngb7wqjpypa9fm6k2zvf5py32")) (modules '((guix build utils) (ice-9 ftw) (srfi srfi-1))) + (patches + (search-patches + ;; https://github.com/desktop-app/tg_owt/pull/101 + "webrtc-for-telegram-desktop-add-missing-cstdint.patch" + ;; Picked from Gentoo's repository, there's also a patch to use + ;; standalone crc32c(not packaged yet). + "webrtc-for-telegram-desktop-allow-disabling-X11.patch")) (snippet `(begin (let ((keep - '( ;; Custom forks which are incompatible with the ones in Guix. - "abseil-cpp" "libsrtp" "openh264" "rnnoise" + '(;; Custom forks which are incompatible with the ones in Guix. + "abseil-cpp" "libsrtp" "rnnoise" ;; Not available in Guix. - "pffft" "usrsctp" - ;; Has cmake support files for libvpx input. - "libvpx"))) + "pffft"))) (with-directory-excursion "src/third_party" (for-each delete-file-recursively (lset-difference string=? (scandir ".") - (cons* "." ".." keep)))) - #t))))) + (cons* "." ".." keep))))) + ;; Force using standalone openh264. + (substitute* "CMakeLists.txt" + (("\\include\\(cmake\\/libopenh264\\.cmake\\)")"")))))) (build-system cmake-build-system) (arguments - `(#:tests? #f ; No target - #:configure-flags - (list - "-DCMAKE_C_FLAGS=-fPIC" - "-DCMAKE_CXX_FLAGS=-fPIC") - #:phases - (modify-phases %standard-phases - (add-after 'unpack 'copy-inputs - (lambda* (#:key inputs outputs #:allow-other-keys) - (let* ((libvpx-from (assoc-ref inputs "libvpx")) - (libyuv-from (assoc-ref inputs "libyuv")) - (libvpx-to (string-append (getcwd) - "/src/third_party/libvpx/source/libvpx")) - (libyuv-to (string-append (getcwd) - "/src/third_party/libyuv"))) - (copy-recursively libvpx-from libvpx-to) - (copy-recursively libyuv-from libyuv-to)) - #t))))) - (native-inputs - `(("perl" ,perl) - ("pkg-config" ,pkg-config) - ("python" ,python-wrapper) - ("yasm" ,yasm))) + (list #:tests? #f ; No target + ;; NOTE: Options commented are default values. + ;; See also: comments in inputs. + ;; #:configure-flags + ;; #~'("-DTG_OWT_USE_PIPEWIRE=ON" + ;; "-DTG_OWT_USE_X11=ON" + ;; "-DTG_OWT_USE_PROTOBUF=ON") + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'copy-inputs + (lambda* (#:key inputs outputs #:allow-other-keys) + (let* ((libyuv-from (assoc-ref inputs "libyuv")) + (crc32c-from (assoc-ref inputs "crc32c")) + (libyuv-to (string-append (getcwd) + "/src/third_party/libyuv")) + (crc32c-to (string-append (getcwd) + "/src/third_party/crc32c/src"))) + (copy-recursively libyuv-from libyuv-to) + (copy-recursively crc32c-from crc32c-to)))) + (replace 'build + (lambda* (#:key (make-flags '()) (parallel-build? #t) + #:allow-other-keys) + (apply invoke "cmake" "--build" "." + `(,@(if parallel-build? + `("-j" ,(number->string (parallel-job-count))) + '()) + ,@make-flags)))) + (replace 'install + (lambda* (#:key (make-flags '()) #:allow-other-keys) + (apply invoke "cmake" "--install" "." make-flags)))))) (inputs - `(("alsa" ,alsa-lib) - ("ffmpeg" ,ffmpeg) - ("libjpeg" ,libjpeg-turbo) - ("glib" ,glib) - ("libvpx" - ,(origin - (method git-fetch) - (uri - (git-reference - (url "https://chromium.googlesource.com/webm/libvpx") - (commit "5b63f0f821e94f8072eb483014cfc33b05978bb9"))) - (file-name - (git-file-name "libvpx-for-webrtc-for-telegram-desktop" version)) - (sha256 - (base32 "1psvxaddihlw1k5n0anxif3qli6zyw2sa2ywn6mkb8six9myrp68")))) - ("libyuv" - ,(origin - (method git-fetch) - (uri - (git-reference - (url "https://chromium.googlesource.com/libyuv/libyuv") - (commit "ad890067f661dc747a975bc55ba3767fe30d4452"))) - (file-name - (git-file-name "libyuv-for-webrtc-for-telegram-desktop" version)) - (sha256 - (base32 "01knnk4h247rq536097n9n3s3brxlbby3nv3ppdgsqfda3k159ll")))) - ("libxcomposite" ,libxcomposite) - ("libxdamage" ,libxdamage) - ("libxrender" ,libxrender) - ("libxrandr" ,libxrandr) - ("openssl" ,openssl) - ("opus" ,opus) - ("pipewire" ,pipewire) - ("protobuf" ,protobuf) - ("pulseaudio" ,pulseaudio) - ("x11" ,libx11) - ("xext" ,libxext) - ("xtst" ,libxtst))) + (let ((external-sources + `(("libyuv" + ,(origin + (method git-fetch) + (uri (git-reference + (url "https://chromium.googlesource.com/libyuv/libyuv") + (commit "ad890067f661dc747a975bc55ba3767fe30d4452"))) + (file-name + (git-file-name "libyuv-for-webrtc-for-telegram-desktop" version)) + (sha256 + (base32 "01knnk4h247rq536097n9n3s3brxlbby3nv3ppdgsqfda3k159ll")))) + ("crc32c" + ,(origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/google/crc32c") + (commit "21fc8ef30415a635e7351ffa0e5d5367943d4a94"))) + (file-name + (git-file-name "crc32c-for-webrtc-for-telegram-desktop" version)) + (sha256 + (base32 "0cddf8z7v33gfb2k60lkzwa97g20m1v81cnvllm3q9ylpnx8g6f4"))))))) + (modify-inputs external-sources + (prepend openh264 ;Required + protobuf ;TG_OWT_USE_PROTOBUF + + glib ;TG_OWT_USE_PIPEWIRE + libdrm + libglvnd + mesa + pipewire-0.3 + + libxcomposite ;TG_OWT_USE_X11 + libxdamage + libxext + libxfixes + libxrandr + libxrender + libxtst)))) + (native-inputs (list ninja python-wrapper pkg-config yasm)) + (propagated-inputs + (list abseil-cpp ffmpeg libjpeg-turbo libvpx openssl opus)) (synopsis "WebRTC support for Telegram Desktop") (description "WebRTC-for-Telegram-Desktop is a custom WebRTC fork by Telegram project, for its use in telegram desktop client.") @@ -195,13 +219,11 @@ (define-public webrtc-for-telegram-desktop license:asl2.0 ;; LibYuv (license:non-copyleft "file:///src/third_party/libyuv/LICENSE") - ;; OpenH264 - license:bsd-2 ;; PFFFT (license:non-copyleft "file:///src/third_party/pffft/LICENSE") ;; RnNoise license:gpl3 - ;; LibSRTP, LibVPx, UsrSCTP and Others + ;; LibSRTP, Crc32c and Others license:bsd-3)))))) (define-public rlottie-for-telegram-desktop From patchwork Thu Sep 8 12:42:00 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hilton Chain X-Patchwork-Id: 42330 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 44D1127BBEA; Thu, 8 Sep 2022 13:43:50 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-0.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,FROM_SUSPICIOUS_NTLD,MAILING_LIST_MULTI,PDS_OTHER_BAD_TLD, SPF_HELO_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id F412427BBE9 for ; Thu, 8 Sep 2022 13:43:49 +0100 (BST) Received: from localhost ([::1]:40164 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oWGsn-0005yt-3n for patchwork@mira.cbaines.net; Thu, 08 Sep 2022 08:43:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50118) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oWGs2-0005qZ-QQ for guix-patches@gnu.org; Thu, 08 Sep 2022 08:43:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:40601) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oWGs2-0002Up-Hr for guix-patches@gnu.org; Thu, 08 Sep 2022 08:43:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oWGs2-0006yC-E4 for guix-patches@gnu.org; Thu, 08 Sep 2022 08:43:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57675] [PATCH v2 3/5] gnu: Remove rlottie-for-telegram-desktop. Resent-From: Hilton Chain Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 08 Sep 2022 12:43:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57675 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 57675@debbugs.gnu.org Received: via spool by 57675-submit@debbugs.gnu.org id=B57675.166264094726735 (code B ref 57675); Thu, 08 Sep 2022 12:43:02 +0000 Received: (at 57675) by debbugs.gnu.org; 8 Sep 2022 12:42:27 +0000 Received: from localhost ([127.0.0.1]:57530 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oWGrS-0006x8-QA for submit@debbugs.gnu.org; Thu, 08 Sep 2022 08:42:27 -0400 Received: from mail.boiledscript.com ([144.168.59.46]:49132) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oWGrM-0006wn-6Q for 57675@debbugs.gnu.org; Thu, 08 Sep 2022 08:42:25 -0400 Date: Thu, 08 Sep 2022 20:42:00 +0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ultrarare.space; s=dkim; t=1662640934; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=xUhBHx5BJfdmCi4NADA/O5hLC1IwW1qNwnxPqRqTVDY=; b=NzDIueuQff6OIRkOIqw2KWzm/39BlK0Nxg31kSyfM0qPZo2h1fG4RDswd9++VQqR1Vjucb +L8bjLO4RB7mPllF+yqyzN9Xq9ZE5rTt7J6RGJd98NIT3XAVHtTammpi3qTHerabubKCRa lSHBWFQWNmGfIl2gcUCoNBIi32HGAUsM/92ZUGV0dAfP0ZecCPydnY8M1xnTHpcurQQb8h bvf5nYIQYJvOsIxk0GGOk6zMYQkG5E2OcBlLYlQ3TL/YPWidENKfEUnbfjusIX8Ku8tTe4 uANprfFkJypw6U8ZY6xH0DGGn77gRLzZa/+J1Y14SzBxQbCUardL/x9jqXfYCQ== Message-ID: In-Reply-To: References: MIME-Version: 1.0 Authentication-Results: mail.boiledscript.com; auth=pass smtp.mailfrom=hako@ultrarare.space X-Spamd-Bar: / X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" Reply-to: Hilton Chain X-ACL-Warn: , Hilton Chain via Guix-patches X-Patchwork-Original-From: Hilton Chain via Guix-patches via From: Hilton Chain X-getmail-retrieved-from-mailbox: Patches * gnu/packages/telegram.scm (rlottie-for-telegram-desktop): Delete variable. --- gnu/packages/telegram.scm | 34 ---------------------------------- 1 file changed, 34 deletions(-) -- 2.37.2 diff --git a/gnu/packages/telegram.scm b/gnu/packages/telegram.scm index d66a286167..c6db1e61ac 100644 --- a/gnu/packages/telegram.scm +++ b/gnu/packages/telegram.scm @@ -226,40 +226,6 @@ (define-public webrtc-for-telegram-desktop ;; LibSRTP, Crc32c and Others license:bsd-3)))))) -(define-public rlottie-for-telegram-desktop - (let ((commit "cbd43984ebdf783e94c8303c41385bf82aa36d5b") - (revision "671")) - (hidden-package - (package - (inherit rlottie) - (version - (git-version "0.0.1" revision commit)) - (source - (origin - (method git-fetch) - (uri - (git-reference - (url "https://github.com/desktop-app/rlottie.git") - (commit commit))) - (file-name - (git-file-name "rlottie-for-telegram-desktop" version)) - (sha256 - (base32 "1lxpbgbhps9rmck036mgmiknqrzpjxpas8n7qxykv6pwzn0c8n0c")))) - (arguments - `(#:configure-flags - (list - "-Dlog=true" - "-Ddumptree=true" - "-Dtest=true") - #:phases - (modify-phases %standard-phases - (add-after 'unpack 'patch-cxx-flags - (lambda _ - (substitute* "meson.build" - (("werror=true") - "werror=false")) - #t))))))))) - (define-public libtgvoip-for-telegram-desktop (let ((commit "13a5fcb16b04472d808ce122abd695dbf5d206cd") (revision "88")) From patchwork Thu Sep 8 12:42:31 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hilton Chain X-Patchwork-Id: 42332 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id AF38027BBEA; Thu, 8 Sep 2022 13:52:07 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-0.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,FROM_SUSPICIOUS_NTLD,MAILING_LIST_MULTI,PDS_OTHER_BAD_TLD, SPF_HELO_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 6CF3827BBE9 for ; Thu, 8 Sep 2022 13:52:07 +0100 (BST) Received: from localhost ([::1]:45722 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oWH0o-00076D-66 for patchwork@mira.cbaines.net; Thu, 08 Sep 2022 08:52:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50120) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oWGs3-0005qa-58 for guix-patches@gnu.org; Thu, 08 Sep 2022 08:43:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:40602) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oWGs2-0002Uu-TA for guix-patches@gnu.org; Thu, 08 Sep 2022 08:43:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oWGs2-0006yL-Pr for guix-patches@gnu.org; Thu, 08 Sep 2022 08:43:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57675] [PATCH v2 4/5] gnu: Remove libtgvoip-for-telegram-desktop. Resent-From: Hilton Chain Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 08 Sep 2022 12:43:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57675 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 57675@debbugs.gnu.org Received: via spool by 57675-submit@debbugs.gnu.org id=B57675.166264097326776 (code B ref 57675); Thu, 08 Sep 2022 12:43:02 +0000 Received: (at 57675) by debbugs.gnu.org; 8 Sep 2022 12:42:53 +0000 Received: from localhost ([127.0.0.1]:57533 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oWGrt-0006xo-62 for submit@debbugs.gnu.org; Thu, 08 Sep 2022 08:42:53 -0400 Received: from mail.boiledscript.com ([144.168.59.46]:41734) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oWGrr-0006xa-Bh for 57675@debbugs.gnu.org; Thu, 08 Sep 2022 08:42:52 -0400 Date: Thu, 08 Sep 2022 20:42:31 +0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ultrarare.space; s=dkim; t=1662640965; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=cDIrAPpFGu+/bhXsMervu2bnPI7evGF7mC+dHx5881c=; b=iobz2sZQm+nwHo5196xu77eSQIWUtOBUfQBM/XrJKYhyVAuvoJHIweDks3Ob9Nb//lDepC psq+w+Qum+4TXAv0xWerJ+yF84ufXUuSaeZm27+7i/YuKZ0LUTbyKA5ucIS54vowZ/YYRV 9QKRXue/MQmaRU6Q/7qcE6vAmajBIxZFecvc4lSrhfpFevm0341kezqjuwdl71W+InfszS xYcPL51uZJ0m/NItWQhBMOxN45smv3cWU7doIE5C5b5EeFh7MZjwMgvnHfNlCtj7SZ6cbn vGQSw8iHBPM7lMJPJOsm+mBtrNRnGTdlR5LULQHUyRAMyEMM6MbNMwiw81qkIQ== Message-ID: In-Reply-To: References: MIME-Version: 1.0 Authentication-Results: mail.boiledscript.com; auth=pass smtp.mailfrom=hako@ultrarare.space X-Spamd-Bar: / X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" Reply-to: Hilton Chain X-ACL-Warn: , Hilton Chain via Guix-patches X-Patchwork-Original-From: Hilton Chain via Guix-patches via From: Hilton Chain X-getmail-retrieved-from-mailbox: Patches * gnu/packages/telegram.scm (libtgvoip-for-telegram-desktop): Delete variable. --- gnu/packages/telegram.scm | 41 --------------------------------------- 1 file changed, 41 deletions(-) -- 2.37.2 diff --git a/gnu/packages/telegram.scm b/gnu/packages/telegram.scm index c6db1e61ac..78ec2558c7 100644 --- a/gnu/packages/telegram.scm +++ b/gnu/packages/telegram.scm @@ -226,47 +226,6 @@ (define-public webrtc-for-telegram-desktop ;; LibSRTP, Crc32c and Others license:bsd-3)))))) -(define-public libtgvoip-for-telegram-desktop - (let ((commit "13a5fcb16b04472d808ce122abd695dbf5d206cd") - (revision "88")) - (hidden-package - (package - (inherit libtgvoip) - (version - (git-version "2.4.4" revision commit)) - (source - (origin - (method git-fetch) - (uri - (git-reference - (url "https://github.com/telegramdesktop/libtgvoip.git") - (commit commit))) - (file-name - (git-file-name "libtgvoip-for-telegram-desktop" version)) - (sha256 - (base32 "12p6s7vxkf1gh1spdckkdxrx7bjzw881ds9bky7l5fw751cwb3xd")))) - (arguments - `(#:configure-flags - (list - "--disable-static" - "--disable-dsp" ; FIXME - "--enable-audio-callback" - "--with-alsa" - "--with-pulse") - #:phases - (modify-phases %standard-phases - (add-after 'unpack 'patch-linkers - (lambda _ - (substitute* "Makefile.am" - (("\\$\\(CRYPTO_LIBS\\) \\$\\(OPUS_LIBS\\)") - "$(CRYPTO_LIBS) $(OPUS_LIBS) $(ALSA_LIBS) $(PULSE_LIBS)")) - (substitute* "tgvoip.pc.in" - (("libcrypto opus") - "libcrypto opus alsa libpulse")) - #t))))) - (native-inputs - (list autoconf automake libtool pkg-config)))))) - (define-public telegram-desktop (package (name "telegram-desktop") From patchwork Thu Sep 8 12:42:52 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Hilton Chain X-Patchwork-Id: 42333 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id A665127BBE9; Thu, 8 Sep 2022 13:53:09 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-0.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,FROM_SUSPICIOUS_NTLD,MAILING_LIST_MULTI,PDS_OTHER_BAD_TLD, SPF_HELO_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id D6EED27BBE9 for ; Thu, 8 Sep 2022 13:53:07 +0100 (BST) Received: from localhost ([::1]:56154 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oWH1m-0007iL-Vd for patchwork@mira.cbaines.net; Thu, 08 Sep 2022 08:53:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47876) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oWGt0-00070I-Rx for guix-patches@gnu.org; Thu, 08 Sep 2022 08:44:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:40611) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oWGt0-0002a3-It for guix-patches@gnu.org; Thu, 08 Sep 2022 08:44:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oWGt0-00070Q-El for guix-patches@gnu.org; Thu, 08 Sep 2022 08:44:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57675] [PATCH v2 5/5] gnu: telegram-desktop: Update to 4.1.1. Resent-From: Hilton Chain Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 08 Sep 2022 12:44:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57675 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 57675@debbugs.gnu.org Received: via spool by 57675-submit@debbugs.gnu.org id=B57675.166264099726847 (code B ref 57675); Thu, 08 Sep 2022 12:44:02 +0000 Received: (at 57675) by debbugs.gnu.org; 8 Sep 2022 12:43:17 +0000 Received: from localhost ([127.0.0.1]:57538 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oWGsF-0006yv-He for submit@debbugs.gnu.org; Thu, 08 Sep 2022 08:43:17 -0400 Received: from mail.boiledscript.com ([144.168.59.46]:40918) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oWGsC-0006yg-Ds for 57675@debbugs.gnu.org; Thu, 08 Sep 2022 08:43:14 -0400 Date: Thu, 08 Sep 2022 20:42:52 +0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ultrarare.space; s=dkim; t=1662640986; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=sNfIs6PFdadvUX+dpx6Pz56i04yoOcPdMnUH6hgLS+c=; b=PlGqytlU/aZ8nbKdoOR1rvFTiuoezK4kmEzwuB4944Te7YAWFf17DSIfm3PGd9U68Zz8T2 /qlrm89VWyNvE7sgnu0GRq1tUpngjV0o2emkInK5G+ZvHfhHXn7DjZqsd3oFlUb0GCvU8M ru2lKfvMGM6Nii2uCD2Jain+9zV0C1vYKi2v1/FKoM8Dxp4jkennSkOqWgQW4B5wMQ/+s4 +gbotT4VScDnepP0Mx9+C4jSfXzs3NEbjzc76zvNLCHdgQQTP+b58v5eRlEr2CGTMUmK5U FBoz1PJsjyL7oJgn2i1wHwCFZxJTm1nqtWyNAtOuaGYmWHL3RK4qf6TgY5+S5Q== Message-ID: In-Reply-To: References: MIME-Version: 1.0 Authentication-Results: mail.boiledscript.com; auth=pass smtp.mailfrom=hako@ultrarare.space X-Spamd-Bar: / X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" Reply-to: Hilton Chain X-ACL-Warn: , Hilton Chain via Guix-patches X-Patchwork-Original-From: Hilton Chain via Guix-patches via From: Hilton Chain X-getmail-retrieved-from-mailbox: Patches * gnu/packages/patches/lib-base-for-telegram-desktop-support-musl.patch: New file. * gnu/local.mk: Add patch. * gnu/packages/telegram.scm (telegram-desktop): Update to 4.1.1 and simplify inputs style. [source]: 1. Patch: Add support for musl. 2. Bundled 3rd-party libraries: Add rlottie, libtgvoip and dispatch. Remove SPMediaKeyTap and statusnotifieritem which are no longer available in source. [#:configure-flags]: 1. Available flags with default values are written and commented out. 2. Use Telegram's API id for their Snap builds. 3. Build a generic package with DESKTOP_APP_USE_PACKAGED_LAZY on. [#:phases]: 1. Copy checkouts for dispatch, fcitx-qt5, fcitx5-qt, hime, nimf, rlottie and libtgvoip into source. 2. Build and install with cmake utility. 3. Don't patch C++ flags as they are not there any more. [native-inputs] 1. Use variable external-sources to manage source chekouts. 2. Bump cmake-helpers checkout. 3. Add ninja for use with cmake. 4. Add clang-toolchain as it's suggested by Telegram, cmake would used it automatically. 5. Drop cmake-shared, extra-cmake-modules, glib:bin, gobject-introspection, gtk+:bin and qttools-5. [inputs] 1. Use variable external-sources to manage source chekouts. 2. Add checkouts for dispatch, fcitx-qt5, fcitx5-qt, hime, nimf, rlottie and libtgvoip. 3. Bump checkouts for codegen, lib_base, lib_crl, lib_lottie, lib_qr, lib_rpl, lib_spellcheck,lib_storage, lib_tl, lib_ui, lib_waylandshells, lib_webrtc, lib_webview and tgcalls. 4. Patch lib_base for musl support. 5. Drop unneeded inputs. [license] 1. Sync with source tree changes. --- gnu/local.mk | 1 + ...se-for-telegram-desktop-support-musl.patch | 35 + gnu/packages/telegram.scm | 735 ++++++++++-------- 3 files changed, 446 insertions(+), 325 deletions(-) create mode 100644 gnu/packages/patches/lib-base-for-telegram-desktop-support-musl.patch -- 2.37.2 diff --git a/gnu/local.mk b/gnu/local.mk index d0e5aeb125..aa2fa69ddd 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1354,6 +1354,7 @@ dist_patch_DATA = \ %D%/packages/patches/julia-tracker-16-compat.patch \ %D%/packages/patches/julia-allow-parallel-build.patch \ %D%/packages/patches/kdbusaddons-kinit-file-name.patch \ + %D%/packages/patches/lib-base-for-telegram-desktop-support-musl.patch \ %D%/packages/patches/libffi-3.3-powerpc-fixes.patch \ %D%/packages/patches/libffi-float128-powerpc64le.patch \ %D%/packages/patches/libobjc2-unbundle-robin-map.patch \ diff --git a/gnu/packages/patches/lib-base-for-telegram-desktop-support-musl.patch b/gnu/packages/patches/lib-base-for-telegram-desktop-support-musl.patch new file mode 100644 index 0000000000..1a3a70286f --- /dev/null +++ b/gnu/packages/patches/lib-base-for-telegram-desktop-support-musl.patch @@ -0,0 +1,35 @@ +Stub out some glibc-specific functions + +This allows support for alternative libcs like musl + +diff --git a/base/platform/linux/base_info_linux.cpp b/base/platform/linux/base_info_linux.cpp +index 714d8dc..b70cc23 100644 +--- a/base/platform/linux/base_info_linux.cpp ++++ b/base/platform/linux/base_info_linux.cpp +@@ -22,7 +22,7 @@ + + #include + +-#ifdef Q_OS_LINUX ++#if defined(Q_OS_LINUX) && defined(__GLIBC__) + #include + #endif // Q_OS_LINUX + +@@ -200,7 +200,7 @@ QString AutoUpdateKey() { + } + + QString GetLibcName() { +-#ifdef Q_OS_LINUX ++#if defined(Q_OS_LINUX) && defined(__GLIBC__) + return "glibc"; + #endif // Q_OS_LINUX + +@@ -208,7 +208,7 @@ QString GetLibcName() { + } + + QString GetLibcVersion() { +-#ifdef Q_OS_LINUX ++#if defined(Q_OS_LINUX) && defined(__GLIBC__) + static const auto result = [&] { + const auto version = QString::fromLatin1(gnu_get_libc_version()); + return QVersionNumber::fromString(version).isNull() ? QString() : version; diff --git a/gnu/packages/telegram.scm b/gnu/packages/telegram.scm index 78ec2558c7..24f9b9bbfc 100644 --- a/gnu/packages/telegram.scm +++ b/gnu/packages/telegram.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2021 Raghav Gururajan +;;; Copyright © 2022 Hilton Chain ;;; ;;; This file is part of GNU Guix. ;;; @@ -28,8 +29,10 @@ (define-module (gnu packages telegram) #:use-module (gnu packages compression) #:use-module (gnu packages cpp) #:use-module (gnu packages digest) + #:use-module (gnu packages enchant) #:use-module (gnu packages fcitx) #:use-module (gnu packages fcitx5) + #:use-module (gnu packages freedesktop) #:use-module (gnu packages gl) #:use-module (gnu packages glib) #:use-module (gnu packages gnome) @@ -42,6 +45,7 @@ (define-module (gnu packages telegram) #:use-module (gnu packages libevent) #:use-module (gnu packages libreoffice) #:use-module (gnu packages linux) + #:use-module (gnu packages llvm) #:use-module (gnu packages lxqt) #:use-module (gnu packages lua) #:use-module (gnu packages ninja) @@ -60,6 +64,7 @@ (define-module (gnu packages telegram) #:use-module (gnu packages tls) #:use-module (gnu packages video) #:use-module (gnu packages web) + #:use-module (gnu packages webkit) #:use-module (gnu packages xdisorg) #:use-module (gnu packages xiph) #:use-module (gnu packages xorg) @@ -229,339 +234,419 @@ (define-public webrtc-for-telegram-desktop (define-public telegram-desktop (package (name "telegram-desktop") - (version "2.9.3") - (source - (origin - (method git-fetch) - (uri - (git-reference - (url "https://github.com/telegramdesktop/tdesktop.git") - (commit - (string-append "v" version)))) - (file-name - (git-file-name name version)) - (sha256 - (base32 "0dzf1y3xhqvizg29bd1kya48cjbkq073d2x10ynwcmmx396l4nd8")) - (modules '((guix build utils) - (ice-9 ftw) - (srfi srfi-1))) - (snippet - `(begin - (let ((keep - '( ;; Not available in Guix. - "SPMediaKeyTap" "statusnotifieritem" "tgcalls"))) - (with-directory-excursion "Telegram/ThirdParty" - (for-each delete-file-recursively - (lset-difference string=? - (scandir ".") - (cons* "." ".." keep)))) - #t))))) + (version "4.1.1") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/telegramdesktop/tdesktop") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0zhwaql1fk0nqr1x2lchcswz61x7sb2297qdxiysgqamr0fk9ppn")) + (modules '((guix build utils) + (ice-9 ftw) + (srfi srfi-1))) + (snippet #~(begin + (let ((keep + '(;; Custom fork + "rlottie" "libtgvoip" + ;; Not available in Guix. + "dispatch" "tgcalls"))) + (with-directory-excursion "Telegram/ThirdParty" + (for-each delete-file-recursively + (lset-difference string=? + (scandir ".") + (cons* "." ".." keep))))))))) (build-system qt-build-system) (arguments - `(#:tests? #f ; No target - #:imported-modules - (,@%qt-build-system-modules - (guix build glib-or-gtk-build-system)) - #:modules - ((guix build qt-build-system) - ((guix build glib-or-gtk-build-system) - #:prefix glib-or-gtk:) - (guix build utils) - (ice-9 match)) - #:configure-flags - (list - ;; Client applications must provide their own API-ID and API-HASH, - ;; see also . - ;; In case, that the credentials below fail to work, contact - ;; Raghav Gururajan - "-DTDESKTOP_API_ID=2791056" - "-DTDESKTOP_API_HASH=582d6d0b44f7a2de949e99271fd8b3f2" - ;; Disable WebkitGTK support as it fails to link - "-DDESKTOP_APP_DISABLE_WEBKITGTK=ON" - ;; Use bundled fonts as fallback. - "-DDESKTOP_APP_USE_PACKAGED_FONTS=OFF") - #:phases - (modify-phases %standard-phases - (add-after 'unpack 'make-writable - (lambda _ - (for-each make-file-writable (find-files ".")) - #t)) - (add-after 'make-writable 'copy-inputs - (lambda* (#:key inputs outputs #:allow-other-keys) - (for-each - (match-lambda - ((dst src) - (copy-recursively src dst) - (for-each make-file-writable (find-files dst)))) - `(("cmake" ,(assoc-ref inputs "cmake-helpers")) - ("Telegram/codegen" ,(assoc-ref inputs "codegen-source")) - ("Telegram/lib_base" ,(assoc-ref inputs "lib-base-source")) - ("Telegram/lib_crl" ,(assoc-ref inputs "lib-crl-source")) - ("Telegram/lib_lottie" - ,(assoc-ref inputs "lib-lottie-source")) - ("Telegram/lib_qr" ,(assoc-ref inputs "lib-qr-source")) - ("Telegram/lib_rlottie" - ,(assoc-ref inputs "lib-rlottie-source")) - ("Telegram/lib_rpl" ,(assoc-ref inputs "lib-rpl-source")) - ("Telegram/lib_spellcheck" - ,(assoc-ref inputs "lib-spellcheck-source")) - ("Telegram/lib_storage" - ,(assoc-ref inputs "lib-storage-source")) - ("Telegram/lib_tl" ,(assoc-ref inputs "lib-tl-source")) - ("Telegram/lib_ui" ,(assoc-ref inputs "lib-ui-source")) - ("Telegram/lib_waylandshells" ,(assoc-ref inputs "lib-waylandshells-source")) - ("Telegram/lib_webrtc" ,(assoc-ref inputs "lib-webrtc-source")) - ("Telegram/lib_webview" ,(assoc-ref inputs "lib-webview-source")) - ("Telegram/ThirdParty/tgcalls" - ,(assoc-ref inputs "tgcalls-source")))) - #t)) - (add-before 'configure 'patch-cxx-flags - (lambda _ - (substitute* "cmake/options_linux.cmake" - (("class-memaccess") "all")) - #t)) - (add-after 'install 'glib-or-gtk-compile-schemas - (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-compile-schemas)) - (add-after 'glib-or-gtk-compile-schemas 'glib-or-gtk-wrap - (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-wrap))))) + (list #:tests? #f ;No target + #:imported-modules + `(,@%qt-build-system-modules + (guix build glib-or-gtk-build-system)) + #:modules + '((guix build qt-build-system) + ((guix build glib-or-gtk-build-system) #:prefix glib-or-gtk:) + (guix build utils) + (ice-9 match)) + #:configure-flags + #~`(;; https://github.com/telegramdesktop/tdesktop/blob/dev/snap/snapcraft.yaml + ;; see also . + "-DTDESKTOP_API_ID=611335" + "-DTDESKTOP_API_HASH=d524b414d21f4d37f08684c1df41ac9c" + ,(string-append "-DTDESKTOP_LAUTCHER_BASENAME=" #$name) + + ;; NOTE: Options commented are default values. + ;; See also: comments in inputs. + + ;; "-DDESKTOP_APP_USE_PACKAGED=ON" + ;; "-DDESKTOP_APP_DISABLE_DBUS_INTEGRATION=OFF" + ;; "-DDESKTOP_APP_DISABLE_WAYLAND_INTEGRATION=OFF" + ;; "-DDESKTOP_APP_DISABLE_X11_INTEGRATION=OFF" + ;; "-DDESKTOP_APP_DISABLE_SPELLCHECK=OFF" + ;; "-DDESKTOP_APP_USE_ENCHANT=OFF" + ;; "-DDESKTOP_APP_LOTTIE_USE_CACHE=ON" + + ;; "-DLIBTGVOIP_DISABLE_ALSA=OFF" + ;; "-DLIBTGVOIP_DISABLE_PULSEAUDIO=OFF" + + ;; Build all the available detected features in the build + ;; environment. + "-DDESKTOP_APP_USE_PACKAGED_LAZY=ON") + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'make-writable + (lambda _ + (for-each make-file-writable (find-files ".")))) + (add-after 'make-writable 'copy-inputs + (lambda* (#:key inputs outputs #:allow-other-keys) + (for-each + (match-lambda + ((dst src) + (copy-recursively src dst) + (for-each make-file-writable (find-files dst)))) + `(("cmake" ,(assoc-ref inputs "cmake-helpers")) + ("Telegram/codegen" ,(assoc-ref inputs "codegen-source")) + ("Telegram/lib_base" ,(assoc-ref inputs "lib-base-source")) + ("Telegram/lib_crl" ,(assoc-ref inputs "lib-crl-source")) + ("Telegram/lib_lottie" ,(assoc-ref inputs "lib-lottie-source")) + ("Telegram/lib_qr" ,(assoc-ref inputs "lib-qr-source")) + ("Telegram/lib_rpl" ,(assoc-ref inputs "lib-rpl-source")) + ("Telegram/lib_spellcheck" ,(assoc-ref inputs "lib-spellcheck-source")) + ("Telegram/lib_storage" ,(assoc-ref inputs "lib-storage-source")) + ("Telegram/lib_tl" ,(assoc-ref inputs "lib-tl-source")) + ("Telegram/lib_ui" ,(assoc-ref inputs "lib-ui-source")) + ("Telegram/lib_waylandshells" ,(assoc-ref inputs "lib-waylandshells-source")) + ("Telegram/lib_webrtc" ,(assoc-ref inputs "lib-webrtc-source")) + ("Telegram/lib_webview" ,(assoc-ref inputs "lib-webview-source")) + ("Telegram/ThirdParty/dispatch" ,(assoc-ref inputs "dispatch-source")) + ("Telegram/ThirdParty/fcitx-qt5" ,(assoc-ref inputs "fcitx-qt5-source")) + ("Telegram/ThirdParty/fcitx5-qt" ,(assoc-ref inputs "fcitx5-qt-source")) + ("Telegram/ThirdParty/hime" ,(assoc-ref inputs "hime-source")) + ("Telegram/ThirdParty/nimf" ,(assoc-ref inputs "nimf-source")) + ("Telegram/ThirdParty/rlottie" ,(assoc-ref inputs "rlottie-source")) + ("Telegram/ThirdParty/tgcalls" ,(assoc-ref inputs "tgcalls-source")) + ("Telegram/ThirdParty/libtgvoip" ,(assoc-ref inputs "libtgvoip-source")))))) + (replace 'build + (lambda* (#:key (make-flags '()) + (parallel-build? #t) #:allow-other-keys) + (apply invoke "cmake" "--build" "." + `(,@(if parallel-build? + `("-j" ,(number->string (parallel-job-count))) + '()) + ,@make-flags)))) + (replace 'install + (lambda* (#:key (make-flags '()) #:allow-other-keys) + (apply invoke "cmake" "--install" "." make-flags))) + (add-after 'install 'glib-or-gtk-compile-schemas + (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-compile-schemas)) + (add-after 'glib-or-gtk-compile-schemas 'glib-or-gtk-wrap + (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-wrap))))) (native-inputs - `(("cmake-helpers" - ,(origin - (method git-fetch) - (uri - (git-reference - (url "https://github.com/desktop-app/cmake_helpers.git") - (commit "4d44d822e01b3b5fbec3ce824e01f56aa35d7f72"))) - (file-name - (git-file-name "cmake-helpers-for-telegram-desktop" version)) - (sha256 - (base32 "0h6cjiqy014h2mz90h1z5a7plb3ihbnds4bja8994ybr1dy3m7m5")))) - ("cmake-shared" ,cmake-shared) - ("extra-cmake-modules" ,extra-cmake-modules) - ("glib:bin" ,glib "bin") - ("gobject-introspection" ,gobject-introspection) - ("gtk+:bin" ,gtk+ "bin") - ("pkg-config" ,pkg-config) - ("python" ,python-wrapper) - ("qttools-5" ,qttools-5))) + (let ((external-sources + `(("cmake-helpers" + ,(origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/desktop-app/cmake_helpers") + (commit "0702ef4cdd8ab888fdadaa4f5b2eb0c9d5844b69"))) + (file-name + (git-file-name "cmake-helpers-for-telegram-desktop" version)) + (sha256 + (base32 "16lsm3pb8md4ksr2ps3bnkvr0jygdamkxyirxgz214n6wa281zk1"))))))) + (modify-inputs external-sources + (append clang-toolchain ninja pkg-config python-wrapper)))) (inputs - `(("alsa" ,alsa-lib) - ("c++-gsl" ,c++-gsl) - ("catch" ,catch-framework2) - ("codegen-source" - ,(origin - (method git-fetch) - (uri - (git-reference - (url "https://github.com/desktop-app/codegen.git") - (commit "248614b49cd7d5aff69d75a737f2e35b79fbb119"))) - (file-name - (git-file-name "codegen" version)) - (sha256 - (base32 "00f7g2z6xmkbkrmi3q27hscjl44mg66wf9q0mz3rhy3jaa6cfdrk")))) - ("expected" ,libexpected) - ("fcitx-qt5" ,fcitx-qt5) - ("fcitx5-qt" ,fcitx5-qt) - ("ffmpeg" ,ffmpeg) - ("glib" ,glib) - ("glibmm" ,glibmm-2.64) - ("gtk+" ,gtk+) - ("hime" ,hime) - ("hunspell" ,hunspell) - ("jemalloc" ,jemalloc) - ("kwayland" ,kwayland) - ("lib-base-source" - ,(origin - (method git-fetch) - (uri - (git-reference - (url "https://github.com/desktop-app/lib_base.git") - (commit "a23c05c44e4f01dc4428f4d75d4db98c59d313a6"))) - (file-name - (git-file-name "lib-base-for-telegram-desktop" version)) - (sha256 - (base32 "0vh5zgxwalmbnvz8lzlnba87ch8vnpmcz6nvf56w09f3nlxvvq78")))) - ("lib-crl-source" - ,(origin - (method git-fetch) - (uri - (git-reference - (url "https://github.com/desktop-app/lib_crl.git") - (commit "3ccf2ed5095442e5874bba8852cb7dc4efeae29f"))) - (file-name - (git-file-name "lib-crl-for-telegram-desktop" version)) - (sha256 - (base32 "11my7q54m4lvvlgma6pbdyjxi1cv1adk1gph2j50mh18sqlm8myz")))) - ("lib-lottie-source" - ,(origin - (method git-fetch) - (uri - (git-reference - (url "https://github.com/desktop-app/lib_lottie.git") - (commit "0770df009db7928df1d0cad0900dc5110106d229"))) - (file-name - (git-file-name "lib-lottie-for-telegram-desktop" version)) - (sha256 - (base32 "1gj56ymlbk5dnk82jw674808m511lv9dky8891a5wm4gp3pph5jb")))) - ("lib-qr-source" - ,(origin - (method git-fetch) - (uri - (git-reference - (url "https://github.com/desktop-app/lib_qr.git") - (commit "2b08c71c6edcfc3e31f7d7f518cc963493b6e189"))) - (file-name - (git-file-name "lib-qr-for-telegram-desktop" version)) - (sha256 - (base32 "05hrkmwgrczyjv87r507i2r7m1zr6k2i43mq3my0s6j4szr1rjq0")))) - ("lib-rlottie-source" - ,(origin - (method git-fetch) - (uri - (git-reference - (url "https://github.com/desktop-app/lib_rlottie.git") - (commit "0671bf70547381effcf442ec9618e04502a8adbc"))) - (file-name - (git-file-name "lib-rlottie-for-telegram-desktop" version)) - (sha256 - (base32 "05qnza7j15356s8jq16pkbyp4zr586lssmd86lz5jq23lcb3raxv")))) - ("lib-rpl-source" - ,(origin - (method git-fetch) - (uri - (git-reference - (url "https://github.com/desktop-app/lib_rpl.git") - (commit "df721be3fa14a27dfc230d2e3c42bb1a7c9d0617"))) - (file-name - (git-file-name "lib-rpl-for-telegram-desktop" version)) - (sha256 - (base32 "15fnv3ssn7rn5d0j52gggdvyqc2wm464678dj7v2x9h8lka2jjxn")))) - ("lib-spellcheck-source" - ,(origin - (method git-fetch) - (uri - (git-reference - (url "https://github.com/desktop-app/lib_spellcheck.git") - (commit "68c9b788958904aea7de79f986a0f82ec8c5b094"))) - (file-name - (git-file-name "lib-spellcheck-for-telegram-desktop" version)) - (sha256 - (base32 "0d8s4wwk6fxf536mhzq2vb9qw3j0m8nqia7ylvvpsbc4kh09dadn")))) - ("lib-storage-source" - ,(origin - (method git-fetch) - (uri - (git-reference - (url "https://github.com/desktop-app/lib_storage.git") - (commit "403df6c4a29562bd417c92d410e49819f5a48cc1"))) - (file-name - (git-file-name "lib-storage-for-telegram-desktop" version)) - (sha256 - (base32 "1zxvzfrxbj4d395fzyb5pm9wn3n8jyimxx88cyqjcdd46sx4h7r5")))) - ("lib-tl-source" - ,(origin - (method git-fetch) - (uri - (git-reference - (url "https://github.com/desktop-app/lib_tl.git") - (commit "45faed44e7f4d11fec79b7a70e4a35dc91ef3fdb"))) - (file-name - (git-file-name "lib-tl-for-telegram-desktop" version)) - (sha256 - (base32 "0h43xvzklda02494d466jp52hl8c1kmav9f12dyld10dpf1w6c7m")))) - ("lib-ui-source" - ,(origin - (method git-fetch) - (uri - (git-reference - (url "https://github.com/desktop-app/lib_ui.git") - (commit "1b590f9e16eb9571a039f072d6fea66c607e419f"))) - (file-name - (git-file-name "lib-ui-for-telegram-desktop" version)) - (sha256 - (base32 "0ighyhfp29h9h8c7vr70pnhcv2xnsr9ln084pssn8hb5z4pmb62f")))) - ("lib-waylandshells-source" - ,(origin - (method git-fetch) - (uri - (git-reference - (url "https://github.com/desktop-app/lib_waylandshells.git") - (commit "59b0ee55a68976d27f1bf7cec0e11d5939e185e7"))) - (file-name - (git-file-name "lib-waylandshells-for-telegram-desktop" version)) - (sha256 - (base32 "0l2xrpc5mvvdlsj333pmkgfvn9wi1ijfdaaz8skfnw9icw52faaf")))) - ("lib-webrtc-source" - ,(origin - (method git-fetch) - (uri - (git-reference - (url "https://github.com/desktop-app/lib_webrtc.git") - (commit "ef49f953f12b112008a094a719f40939aaf39db4"))) - (file-name - (git-file-name "lib-webrtc-for-telegram-desktop" version)) - (sha256 - (base32 "15k4xs3462p3ddp5cn9im3nvdiaijmxir8wxsf5yrj70ghy26ibw")))) - ("lib-webview-source" - ,(origin - (method git-fetch) - (uri - (git-reference - (url "https://github.com/desktop-app/lib_webview.git") - (commit "e06427c624515485774e2e2181d4afeb05ad5a67"))) - (file-name - (git-file-name "lib-webview-for-telegram-desktop" version)) - (sha256 - (base32 "148z7xzfscynwwwqssdsd97npax6yn8zrd64xw8qzbwff2g2r7k4")))) - ("libdbusmenu-qt" ,libdbusmenu-qt) - ("libjpeg" ,libjpeg-turbo) - ("libtgvoip" ,libtgvoip-for-telegram-desktop) - ("lz4" ,lz4) - ("materialdecoration" ,materialdecoration) - ("minizip" ,minizip) - ("nimf" ,nimf) - ("openal" ,openal) - ("openssl" ,openssl) - ("opus" ,opus) - ("pulseaudio" ,pulseaudio) - ("qrcodegen" ,qrcodegen-cpp) - ("qt" ,qtbase-5) - ("qtsvg-5" ,qtsvg-5) - ("qt5ct" ,qt5ct) - ("qtimageformats" ,qtimageformats) - ("qtwayland" ,qtwayland) - ("range-v3" ,range-v3) - ("rlottie" ,rlottie-for-telegram-desktop) - ("rnnoise" ,rnnoise) - ("tgcalls-source" - ,(origin - (method git-fetch) - (uri - (git-reference - (url "https://github.com/TelegramMessenger/tgcalls.git") - (commit "81e97fa52e25b7775b62ce07bb653533d81e91b3"))) - (file-name - (git-file-name "tgcalls-for-telegram-desktop" version)) - (sha256 - (base32 "0fvad87hyxli83xn19mgf8jjrrh6y6iaig14pckpbkg33vf4wqkj")))) - ("webrtc" ,webrtc-for-telegram-desktop) - ("x11" ,libx11) - ("xcb" ,libxcb) - ("xcb-keysyms" ,xcb-util-keysyms) - ("xxhash" ,xxhash) - ("zlib" ,zlib))) - (propagated-inputs - (list dconf)) + (let ((external-sources + `(("codegen-source" + ,(origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/desktop-app/codegen") + (commit "8815d7aec9b901191d08445f29e2edd0aeba7b2c"))) + (file-name + (git-file-name "codegen" version)) + (sha256 + (base32 "1ly958mjk25kfcpa174kvg134p9r751ixi275afj5kr57by9mbq2")))) + ("lib-base-source" + ,(origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/desktop-app/lib_base") + (commit "37fab6b4da32c91bc5d049baad2e9ad51cfcd195"))) + (file-name + (git-file-name "lib-base-for-telegram-desktop" version)) + (sha256 + (base32 "1b2zc0ag5w46vwjz2240yj9aniyv09yjyrwif32994drfq6l10k5")) + (patches + (search-patches "lib-base-for-telegram-desktop-support-musl.patch")))) + ("lib-crl-source" + ,(origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/desktop-app/lib_crl") + (commit "4e620bc383d032aadea8e6af02661f8c76695cec"))) + (file-name + (git-file-name "lib-crl-for-telegram-desktop" version)) + (sha256 + (base32 "17bngj247qwq0dg4h37xdi5v1mk22y4yp7sp6ph3irmnz4awah0x")))) + ("lib-lottie-source" + ,(origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/desktop-app/lib_lottie") + (commit "f3563bc6b0e042095d4d667d013f62cb8ae62b65"))) + (file-name + (git-file-name "lib-lottie-for-telegram-desktop" version)) + (sha256 + (base32 "0i0w6lcrmqln7axnlazcqkaj4z0lzn0gl3z59hng40ard76cgvsg")))) + ("lib-qr-source" + ,(origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/desktop-app/lib_qr") + (commit "501f4c3502fd872ab4d777df8911bdac32de7c48"))) + (file-name + (git-file-name "lib-qr-for-telegram-desktop" version)) + (sha256 + (base32 "0hmwqj7a9vcy8wq7pd1qprl68im3zl5f1wzcn2zzk2wvi0389k9f")))) + ("lib-rpl-source" + ,(origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/desktop-app/lib_rpl") + (commit "fd31f5bf382d2679eccdb1abaf8240a56c6a7abe"))) + (file-name + (git-file-name "lib-rpl-for-telegram-desktop" version)) + (sha256 + (base32 "1fpq8nyh8wx6zkb3sjjrx9ydqzyhw4483bdk1i9blp0ijn9xxdxf")))) + ("lib-spellcheck-source" + ,(origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/desktop-app/lib_spellcheck") + (commit "b2f2b7b6bce60bc1c6429a6b5ec4bc5891baa060"))) + (file-name + (git-file-name "lib-spellcheck-for-telegram-desktop" version)) + (sha256 + (base32 "1v8xdbwza457wmjkfmpys46g5g1aw7yabjab6knxd4p4vhyjhbwh")))) + ("lib-storage-source" + ,(origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/desktop-app/lib_storage") + (commit "839609369d04615475cb1518636de3619106a917"))) + (file-name + (git-file-name "lib-storage-for-telegram-desktop" version)) + (sha256 + (base32 "1l26h2fmqp9dcpr6pfvdd5sjb68j7yh0ms2lnr8na7jf5xqmkwwm")))) + ("lib-tl-source" + ,(origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/desktop-app/lib_tl") + (commit "0d234b5aabf43d598e0cb0867566ee570d9e2755"))) + (file-name + (git-file-name "lib-tl-for-telegram-desktop" version)) + (sha256 + (base32 "1wc8d94h4ga36yl9g8h67j914xwpwv7rmkrrvvslgbgxb7sxcd96")))) + ("lib-ui-source" + ,(origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/desktop-app/lib_ui") + (commit "2f5d5e0e79bf52ab04047bc93a4b624d6d33d46a"))) + (file-name + (git-file-name "lib-ui-for-telegram-desktop" version)) + (sha256 + (base32 "09kmc1igh37wafngwk6raqx2wrlxg10lf9p72j84sxs05hbybfcn")))) + ("lib-waylandshells-source" + ,(origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/desktop-app/lib_waylandshells") + (commit "271290b93c65b6fb634cb9c69bff97f51b74f3a7"))) + (file-name + (git-file-name "lib-waylandshells-for-telegram-desktop" version)) + (sha256 + (base32 "02d966kbpqf029wwma17vicmc8n5iaksibaq6d81jmh770p2vsc9")))) + ("lib-webrtc-source" + ,(origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/desktop-app/lib_webrtc") + (commit "9b11599c3c56047cfa4c68b69f1fcc93b602c33a"))) + (file-name + (git-file-name "lib-webrtc-for-telegram-desktop" version)) + (sha256 + (base32 "0158jx8hj4fv6qpw5pgcr2mdlihj0dxs060dg3iy61zz6q68z5dq")))) + ("lib-webview-source" + ,(origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/desktop-app/lib_webview") + (commit "546df65eb2424550ed84ce14fc9c5d1bb3586f35"))) + (file-name + (git-file-name "lib-webview-for-telegram-desktop" version)) + (sha256 + (base32 "0zzjwyw82bggncmmsw969lnjl04pklmqjqm77jjzadinivl52z0l")))) + ("tgcalls-source" + ,(origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/TelegramMessenger/tgcalls") + (commit "82c4921045c440b727c38e464f3a0539708423ff"))) + (file-name + (git-file-name "tgcalls-for-telegram-desktop" version)) + (sha256 + (base32 "1109r17abh66yz91b65fn2g4ryfybnsr5g6075sjhbah1gccv9mk")))) + ("libtgvoip-source" + ,(origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/telegramdesktop/libtgvoip") + (commit "78a8e22bedb0d06004da8bafeba88b7474cb89a4"))) + (file-name + (git-file-name "libtgvoip-for-telegram-desktop" version)) + (sha256 + (base32 "1y1jvm4i0i4fkl6c0bgcv2cpzziyyn1pywxqz726q008hwki941h")))) + ("dispatch-source" + ,(origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/apple/swift-corelibs-libdispatch") + (commit "ecc678d79f38cf63d24b6d16e18f69a9117d8d73"))) + (file-name + (git-file-name "dispatch-for-telegram-desktop" version)) + (sha256 + (base32 "0hy4q6x3bgphazmpl3v62995abc9fpi8y7yg9aiblzsqkxmgjmqn")))) + ("fcitx-qt5-source" + ,(origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/fcitx/fcitx-qt5") + (commit "c2feea444ab79e6a8d6d205d4c7b13ab1db353c9"))) + (file-name + (git-file-name "fcitx-qt5-for-telegram-desktop" version)) + (sha256 + (base32 + "1y10n2l0rbzpvsryw0mikyv9hic8wxd8gwr0ax37niwjbkil2zv8")))) + ("fcitx5-qt-source" + ,(origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/fcitx/fcitx5-qt") + (commit "fd06094f48e8281b6dc3fd4aaadfcd216c426a5a"))) + (file-name + (git-file-name "fcitx5-qt-for-telegram-desktop" version)) + (sha256 + (base32 + "15mhcv3m39fi375ccd05hr8va4js9lkj0vllypnq90v43fcvawr1")))) + ("hime-source" + ,(origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/hime-ime/hime") + (commit "9b3e6f9ab59d1fe4d9de73d3bf0fed7789f921c5"))) + (file-name + (git-file-name "hime-for-telegram-desktop" version)) + (sha256 + (base32 + "1b98ql30ihbqz1zwlm0c3c1qmxp3gdz96wsic3h6ypqcr3xyj28f")))) + ("nimf-source" + ,(origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/hamonikr/nimf") + (commit "181f9467fc1883c228fc272330ab2f000bfae163"))) + (file-name + (git-file-name "nimf-for-telegram-desktop" version)) + (sha256 + (base32 + "0kk430bx3w9n8c1d42ng5gicx44gi9bsjd60n2927wdpm6jxm2yl")))) + ("rlottie-source" + ,(origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/desktop-app/rlottie") + (commit "8c69fc20cf2e150db304311f1233a4b55a8892d7"))) + (file-name + (git-file-name "rlottie-for-telegram-desktop" version)) + (sha256 + (base32 "14gwg3sn6xdx9ymnx5r0vfm4pk8dwk92s10a1wdvfbjpyrxll64i"))))))) + (modify-inputs external-sources + (append c++-gsl ;Required + jemalloc + libexpected + minizip + openal + qrcodegen-cpp + qt5compat + qtbase + qtimageformats + qtsvg-5 + range-v3 + rnnoise + webrtc-for-telegram-desktop + xxhash + zlib + ;; Has options + fcitx-qt5 ;DESKTOP_APP_USE_PACKAGED_LAZY + fcitx5-qt + hime + nimf + glibmm-2.64 ;DESKTOP_APP_DISABLE_DBUS_INTEGRATION + enchant ;DESKTOP_APP_USE_ENCHANT + hunspell ;DESKTOP_APP_DISABLE_SPELLCHECK + lz4 ;DESKTOP_APP_LOTTIE_USE_CACHE + alsa-lib ;LIBTGVOIP_DISABLE_ALSA + pulseaudio ;LIBTGVOIP_DISABLE_PULSEAUDIO + qtwayland ;DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION + wayland + libxcb ;DESKTOP_APP_DISABLE_X11_INTEGRATION + xcb-util-keysyms + ;; Optional + webkitgtk)))) (synopsis "Telegram Desktop") (description "Telegram desktop is the official desktop version of the Telegram instant messenger.") (home-page "https://desktop.telegram.org/") - (license - (list - ;; ThirdParty - license:lgpl2.1+ - ;; Others - license:gpl3+)))) + (license (list + ;; Telegram/ThirdParty/dispatch + license:asl2.0 + + ;; Telegram/ThirdParty/fcitx-qt5 (platform input context plugin) + ;; Telegram/ThirdParty/fcitx5-qt (Fcitx5Qt4DBusAddons library + ;; and input context plugin, Fcitx5Qt5DBusAddons library and Qt5 + ;; platform input context plugin) + license:bsd-3 + + ;; Telegram/ThirdParty/rlottie/src/vector/pixman + ;; Telegram/ThirdParty/rlottie/src/vector/stb + ;; Telegram/ThirdParty/rlottie/src/vector/rapidjson + license:expat + + ;; Telegram/ThirdParty/rlottie/src/vector/freetype + license:freetype + + ;; Telegram/ThirdParty/hime (files not mentioned below) + license:lgpl2.1 + + ;; Telegram/ThirdParty/fcitx5-qt (files not mentioned above) + ;; Telegram/ThirdParty/rlottie + ;; Telegram/ThirdParty/rlottie/src/vector + license:lgpl2.1+ + + ;; Telegram/ThirdParty/nimf + ;; Telegram/ThirdParty/tgcalls + license:lgpl3 + + ;; Telegram/ThirdParty/fcitx-qt5 (files not mentioned above) + ;; Telegram/ThirdParty/hime (Qt immodules) + license:gpl2 + + ;; Others + license:gpl3+)))) (define-public tl-parser (let ((commit "1933e76f8f4fb74311be723b432e4c56e3a5ec06")