From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id q0yOMI9dGWPwDwEAbAwnHQ (envelope-from ) for ; Thu, 08 Sep 2022 05:12:15 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id qKukL49dGWPpSwEA9RJhRA (envelope-from ) for ; Thu, 08 Sep 2022 05:12:15 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 4408B39509 for ; Thu, 8 Sep 2022 05:12:15 +0200 (CEST) Received: from localhost ([::1]:44282 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oW7xe-0002hb-7W for larch@yhetil.org; Wed, 07 Sep 2022 23:12:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55370) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oW7xT-0002gM-3t for guix-patches@gnu.org; Wed, 07 Sep 2022 23:12:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:39922) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oW7xS-000676-RB for guix-patches@gnu.org; Wed, 07 Sep 2022 23:12:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oW7xS-0002Et-GJ for guix-patches@gnu.org; Wed, 07 Sep 2022 23:12:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57655] [PATCH 5/5 RESEND UNTABIFIED] 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 03:12:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57655 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 57655@debbugs.gnu.org Received: via spool by 57655-submit@debbugs.gnu.org id=B57655.16626066928559 (code B ref 57655); Thu, 08 Sep 2022 03:12:02 +0000 Received: (at 57655) by debbugs.gnu.org; 8 Sep 2022 03:11:32 +0000 Received: from localhost ([127.0.0.1]:56854 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oW7ww-0002Dy-61 for submit@debbugs.gnu.org; Wed, 07 Sep 2022 23:11:31 -0400 Received: from mail.boiledscript.com ([144.168.59.46]:37370) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oW7wt-0002Dg-08 for 57655@debbugs.gnu.org; Wed, 07 Sep 2022 23:11:28 -0400 Date: Thu, 08 Sep 2022 11:10:58 +0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ultrarare.space; s=dkim; t=1662606679; 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=mUlxdIEFqiuPBQfLjUvoJ20y9P3mnwkzW3Aj5vKZkCE=; b=NO0Dyq3A+a3wPpuMJ1yi/XMMrxVAywePxdJpq1m9eSZu+Z/VfjC3QN5nXVa9S1z18avCQu vhd4D9h/PKuONKWIJXcAqTd1/yc7rQV6rZ4aI2PJyXIVSaKdNXmw/Z3B3xjeOKYdVLkPZD McoJXE8oihIE1MfkJVLWpt7gqLnY7mVl8Jg1dfNi7wUWs1giW7VwOzNJeuMx0tr3stNX2H 9JzrvcCD6a05f7JBQWPN+GG9gKaL7QfpM7n6ZgI7REBWArMjRNUHrjtjQm8J+2xrBMrSXI jF2EXiCCSDfnOtPB3267Hdur4EZvzfXoouHBmBbN01/wy8FmK7GmK/uDHNML3Q== Message-ID: In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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+larch=yhetil.org@gnu.org Sender: "Guix-patches" Reply-to: Hilton Chain X-ACL-Warn: , Hilton Chain via Guix-patches From: Hilton Chain via Guix-patches via X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1662606735; h=from:from:sender:sender:reply-to: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:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=mUlxdIEFqiuPBQfLjUvoJ20y9P3mnwkzW3Aj5vKZkCE=; b=MW1NrLrhX5+mjB3Gt7ofv4cQAem6UnYRAxQ0siLVPKETeX7iPgySJsqVctoKrjrPM0Lk8e N5qEOq85vW41iuuBZKRLWgZhQazlFkkXSVavYQMOf1QHcgaupnbAx0RPjboT2zBS0mnOc9 Q8Q0OtuOjTEFLeFP2m/+sQ5mA4u9YcYBiXE0dood/yt6AIypWeMfJV8NHO+cZfuWOCDZRu dPHSfN1LIcgih6qvq7XHEIpW6lw+3JY5n6/FbKlnSrOjaFRRpB2/zHVj4LdJS1TWeZK7C7 P60erppn6gXXIpUEfUtpbnaNH7k8OUvCeCofXbjOqELdJ96wogXgIUpii7AEXQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1662606735; a=rsa-sha256; cv=none; b=iNItLkc7tKsZxM0tzSdquSq2hWqaK8c+KraiIXv+8ISvrK6hGs6Z+ZPi1XI5TDj3Mbqqvv cpgbyupCk+v3uVtL0+UYC4tSwJkQV0P6qJk89h/0VA1AtXylQoqJoOHs8+URhdDMpTGSqg W9JSrcNxyjnDBxie2WqzpdleZFy8DAgAuTQAazszzpbQtHEduk1xV0APz9lyvW/Dw3R8TG A3Nmiji1/8IXSCC9iWLFb+S7kT8yOC24H0O72A0XKcwtZkAWTflq6ZJuB5TmkOfYZyNXhO eyj2twGCFhd7bh+78/B04ZMHHqXCBk7AfSCf/9ynL7L0BHlQrQQzbG9FGYLhpA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=ultrarare.space header.s=dkim header.b=NO0Dyq3A; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -1.78 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=ultrarare.space header.s=dkim header.b=NO0Dyq3A; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 4408B39509 X-Spam-Score: -1.78 X-Migadu-Scanner: scn1.migadu.com X-TUID: mqlaDxeNdu4Y * gnu/packages/telegram.scm (telegram-desktop): Update to 4.1.1. [snippet]: Don't keep SPMediaKeyTap and statusnotifieritem as they'd got removed from upstream. Keep rlottie, libtgvoip and dispatch. [#:configure-flags]: Comment out to default value Use API id from official Snap builds. Enable DESKTOP_APP_USE_PACKAGED_LAZY, which is suitable for default configuration as it'll bundle as many features as possible. [#:phases]: Copy dispatch, fcitx-qt5, fcitx5-qt, hime, nimf, rlottie and libtgvoip. Remove phase patch-cxx-flags, as that string's not there any more. Replace build and install phases with ones that use cmake tools. [native-inputs] Add variable external-sources for managing recursive checkouts. Bump cmake-helpers to source checkout-ed commit. Add ninja and clang-toolchain. [inputs] Add variable external-sources for managing recursive checkouts. Add dispatch, fcitx-qt5, fcitx5-qt, hime, nimf, rlottie, libtgvoip to external-sources. Bump codegen, lib_base, lib_crl, lib_lottie, lib_qr, lib_rpl, lib_spellchec= k, lib_storage, lib_tl, lib_ui, lib_waylandshells, lib_webrtc, lib_webview and tgcalls to source checkout-ed commit. Add patch for lib_base to support musl compilation. Style adjustment. [license] Update with source tree changes. * gnu/packages/patches/lib-base-for-telegram-desktop-support-musl.patch: New file. * gnu/local.mk: Add patch. --- RESEND: Untabify musl patch. 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-supp= ort-musl.patch diff --git a/gnu/local.mk b/gnu/local.mk index f1fda8151b..dfcc82b7f6 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1356,6 +1356,7 @@ dist_patch_DATA =3D \ %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-mus= l.patch b/gnu/packages/patches/lib-base-for-telegram-desktop-support-musl.p= atch 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 =3D [&] { + const auto version =3D QString::fromLatin1(gnu_get_libc_ver= sion()); + return QVersionNumber::fromString(version).isNull() ? QStri= ng() : version; diff --git a/gnu/packages/telegram.scm b/gnu/packages/telegram.scm index bd8b5b31a7..961cd32890 100644 --- a/gnu/packages/telegram.scm +++ b/gnu/packages/telegram.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright =C2=A9 2021 Raghav Gururajan +;;; Copyright =C2=A9 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) @@ -227,339 +232,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=3D? - (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/ThirdPart= y" + (for-each delete-file-recursively + (lset-difference string=3D? + (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=3D2791056" - "-DTDESKTOP_API_HASH=3D582d6d0b44f7a2de949e99271fd8b3f2" - ;; Disable WebkitGTK support as it fails to link - "-DDESKTOP_APP_DISABLE_WEBKITGTK=3DON" - ;; Use bundled fonts as fallback. - "-DDESKTOP_APP_USE_PACKAGED_FONTS=3DOFF") - #: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-wayl= andshells-source")) - ("Telegram/lib_webrtc" ,(assoc-ref inputs "lib-webrtc-sour= ce")) - ("Telegram/lib_webview" ,(assoc-ref inputs "lib-webview-so= urce")) - ("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-sc= hemas)) - (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/sna= p/snapcraft.yaml + ;; see also . + "-DTDESKTOP_API_ID=3D611335" + "-DTDESKTOP_API_HASH=3Dd524b414d21f4d37f08684c1df41ac9c" + ,(string-append "-DTDESKTOP_LAUTCHER_BASENAME=3D" #$name) + + ;; NOTE: Options commented are default values. + ;; See also: comments in inputs. + + ;; "-DDESKTOP_APP_USE_PACKAGED=3DON" + ;; "-DDESKTOP_APP_DISABLE_DBUS_INTEGRATION=3DOFF" + ;; "-DDESKTOP_APP_DISABLE_WAYLAND_INTEGRATION=3DOFF" + ;; "-DDESKTOP_APP_DISABLE_X11_INTEGRATION=3DOFF" + ;; "-DDESKTOP_APP_DISABLE_SPELLCHECK=3DOFF" + ;; "-DDESKTOP_APP_USE_ENCHANT=3DOFF" + ;; "-DDESKTOP_APP_LOTTIE_USE_CACHE=3DON" + + ;; "-DLIBTGVOIP_DISABLE_ALSA=3DOFF" + ;; "-DLIBTGVOIP_DISABLE_PULSEAUDIO=3DOFF" + + ;; Build all the available detected features in the build + ;; environment. + "-DDESKTOP_APP_USE_PACKAGED_LAZY=3DON") + #: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-sour= ce")) + ("Telegram/lib_base" ,(assoc-ref inputs "lib-base-so= urce")) + ("Telegram/lib_crl" ,(assoc-ref inputs "lib-crl-sour= ce")) + ("Telegram/lib_lottie" ,(assoc-ref inputs "lib-lotti= e-source")) + ("Telegram/lib_qr" ,(assoc-ref inputs "lib-qr-source= ")) + ("Telegram/lib_rpl" ,(assoc-ref inputs "lib-rpl-sour= ce")) + ("Telegram/lib_spellcheck" ,(assoc-ref inputs "lib-s= pellcheck-source")) + ("Telegram/lib_storage" ,(assoc-ref inputs "lib-stor= age-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 "li= b-waylandshells-source")) + ("Telegram/lib_webrtc" ,(assoc-ref inputs "lib-webrt= c-source")) + ("Telegram/lib_webview" ,(assoc-ref inputs "lib-webv= iew-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 "r= lottie-source")) + ("Telegram/ThirdParty/tgcalls" ,(assoc-ref inputs "t= gcalls-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-co= unt))) + '()) + ,@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-comp= ile-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" ver= sion)) + (sha256 + (base32 "16lsm3pb8md4ksr2ps3bnkvr0jygdamkxyirxgz214n6wa= 281zk1"))))))) + (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" versio= n)) - (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 "1ly958mjk25kfcpa174kvg134p9r751ixi275afj5kr57b= y9mbq2")))) + ("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 "1b2zc0ag5w46vwjz2240yj9aniyv09yjyrwif32994drfq= 6l10k5")) + (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 "17bngj247qwq0dg4h37xdi5v1mk22y4yp7sp6ph3irmnz4= awah0x")))) + ("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" versio= n)) + (sha256 + (base32 "0i0w6lcrmqln7axnlazcqkaj4z0lzn0gl3z59hng40ard7= 6cgvsg")))) + ("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 "05hrkmwgrczyjv87r507i2r7m1zr6k2i43mq3my0s6j4sz= r1rjq0")))) + ("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 "1fpq8nyh8wx6zkb3sjjrx9ydqzyhw4483bdk1i9blp0ijn= 9xxdxf")))) + ("lib-spellcheck-source" + ,(origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/desktop-app/lib_spellchec= k") + (commit "b2f2b7b6bce60bc1c6429a6b5ec4bc5891baa060"= ))) + (file-name + (git-file-name "lib-spellcheck-for-telegram-desktop" ve= rsion)) + (sha256 + (base32 "1v8xdbwza457wmjkfmpys46g5g1aw7yabjab6knxd4p4vh= yjhbwh")))) + ("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" versi= on)) + (sha256 + (base32 "1l26h2fmqp9dcpr6pfvdd5sjb68j7yh0ms2lnr8na7jf5x= qmkwwm")))) + ("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 "1wc8d94h4ga36yl9g8h67j914xwpwv7rmkrrvvslgbgxb7= sxcd96")))) + ("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 "09kmc1igh37wafngwk6raqx2wrlxg10lf9p72j84sxs05h= bybfcn")))) + ("lib-waylandshells-source" + ,(origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/desktop-app/lib_waylandsh= ells") + (commit "271290b93c65b6fb634cb9c69bff97f51b74f3a7"= ))) + (file-name + (git-file-name "lib-waylandshells-for-telegram-desktop"= version)) + (sha256 + (base32 "02d966kbpqf029wwma17vicmc8n5iaksibaq6d81jmh770= p2vsc9")))) + ("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" versio= n)) + (sha256 + (base32 "0158jx8hj4fv6qpw5pgcr2mdlihj0dxs060dg3iy61zz6q= 68z5dq")))) + ("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" versi= on)) + (sha256 + (base32 "0zzjwyw82bggncmmsw969lnjl04pklmqjqm77jjzadiniv= l52z0l")))) + ("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 "1109r17abh66yz91b65fn2g4ryfybnsr5g6075sjhbah1g= ccv9mk")))) + ("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 "1y1jvm4i0i4fkl6c0bgcv2cpzziyyn1pywxqz726q008hw= ki941h")))) + ("dispatch-source" + ,(origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/apple/swift-corelibs-libd= ispatch") + (commit "ecc678d79f38cf63d24b6d16e18f69a9117d8d73"= ))) + (file-name + (git-file-name "dispatch-for-telegram-desktop" version)) + (sha256 + (base32 "0hy4q6x3bgphazmpl3v62995abc9fpi8y7yg9aiblzsqkx= mgjmqn")))) + ("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 "14gwg3sn6xdx9ymnx5r0vfm4pk8dwk92s10a1wdvfbjpyr= xll64i"))))))) + (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_INTEGRA= TION + 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 plu= gin) + ;; 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") -- 2.37.2