From patchwork Sun Jan 17 19:08:41 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leo Prikler X-Patchwork-Id: 26446 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 9303B27BC15; Sun, 17 Jan 2021 19:10:31 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS, T_DKIM_INVALID,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 573B927BC14 for ; Sun, 17 Jan 2021 19:10:29 +0000 (GMT) Received: from localhost ([::1]:41666 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l1DRU-0005go-D6 for patchwork@mira.cbaines.net; Sun, 17 Jan 2021 14:10:28 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:55564) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l1DR4-0005gN-KQ for guix-patches@gnu.org; Sun, 17 Jan 2021 14:10:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:34136) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l1DR3-0008Sb-Vl for guix-patches@gnu.org; Sun, 17 Jan 2021 14:10:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1l1DR3-0002Mx-QD for guix-patches@gnu.org; Sun, 17 Jan 2021 14:10:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#45721] [PATCH v15] Add Telegram Desktop. Resent-From: Leo Prikler Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 17 Jan 2021 19:10:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45721 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: To: Raghav Gururajan , 45721@debbugs.gnu.org Received: via spool by 45721-submit@debbugs.gnu.org id=B45721.16109105439039 (code B ref 45721); Sun, 17 Jan 2021 19:10:01 +0000 Received: (at 45721) by debbugs.gnu.org; 17 Jan 2021 19:09:03 +0000 Received: from localhost ([127.0.0.1]:45682 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l1DPw-0002LG-SX for submit@debbugs.gnu.org; Sun, 17 Jan 2021 14:09:03 -0500 Received: from mailrelay.tugraz.at ([129.27.2.202]:46480) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l1DPr-0002L2-GX for 45721@debbugs.gnu.org; Sun, 17 Jan 2021 14:08:51 -0500 Received: from nijino.local (217-149-173-242.nat.highway.telekom.at [217.149.173.242]) by mailrelay.tugraz.at (Postfix) with ESMTPSA id 4DJkwV4vDjz1LBRt; Sun, 17 Jan 2021 20:08:42 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 mailrelay.tugraz.at 4DJkwV4vDjz1LBRt DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tugraz.at; s=mailrelay; t=1610910522; bh=KodkOcWd8C8EP8iaBIGpYiZtHQIoplic15E8eOQIMQk=; h=Subject:From:To:Date:In-Reply-To:References:From; b=Yp8nOMgUg8r5tf/wDUHR3QaAnMwseG9aICca3o8R1JIBmv4fxWKW7HhL3YKjKeJSi 26zxngdBk7GIBHWr4xbdHWDPtMxI9nZN2sqRYCsmPj7pfw4b8I4YR4ArljEIeMGPEd PzFQKfbcUWR02PDN2EJibrtAaI0vRfc9gJ8C3ruQ= Message-ID: <5b7bbe10360a9a6bec44c99ac66b0e075f3ed924.camel@student.tugraz.at> From: Leo Prikler Date: Sun, 17 Jan 2021 20:08:41 +0100 In-Reply-To: <3107c0b8-134f-c86f-f066-372f4f5806de@raghavgururajan.name> References: <67f3a995fb657c86efd2ecdc403b24cb2d441524.camel@student.tugraz.at> <3107c0b8-134f-c86f-f066-372f4f5806de@raghavgururajan.name> User-Agent: Evolution 3.34.2 MIME-Version: 1.0 X-TUG-Backscatter-control: bt4lQm5Tva3SBgCuw0EnZw X-Scanned-By: MIMEDefang 2.74 on 129.27.10.116 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" X-getmail-retrieved-from-mailbox: Patches Hi Raghav and everyone else listening on this topic, this was supposed to be a short set of mostly cosmetic changes before pushing your patch, but alas, I discovered, that gsl actually conflicts with an existing package. I've verified, that Telegram still runs with the changes I've made and I don't think I have anything else to add, but someone else should look over these patches once again to make sure that I didn't overlook anything. Also there's the question as to whether Telegram Desktop actually runs under QtWayland. If someone would be willing to check, that'd be very nice. Regards, Leo From 33b8103d31f4bbb34a5130a616f2c3c6bf6b706d Mon Sep 17 00:00:00 2001 From: Raghav Gururajan Date: Sun, 17 Jan 2021 09:30:22 -0500 Subject: [PATCH 13/13] gnu: Add telegram-desktop. * gnu/packages/telegram.scm (telegram-desktop): New variable. Signed-off-by: Leo Prikler --- gnu/packages/telegram.scm | 160 +++++++++++++++++++++++++++++++++++++- 1 file changed, 159 insertions(+), 1 deletion(-) diff --git a/gnu/packages/telegram.scm b/gnu/packages/telegram.scm index 0fd47f4f5d..ad7bcb2e6c 100644 --- a/gnu/packages/telegram.scm +++ b/gnu/packages/telegram.scm @@ -18,20 +18,42 @@ (define-module (gnu packages telegram) #:use-module (gnu packages) + #:use-module (gnu packages aidc) #:use-module (gnu packages assembly) + #:use-module (gnu packages audio) + #:use-module (gnu packages base) + #:use-module (gnu packages check) + #:use-module (gnu packages cmake) + #:use-module (gnu packages compression) + #:use-module (gnu packages cpp) + #:use-module (gnu packages digest) + #:use-module (gnu packages fcitx) + #:use-module (gnu packages fcitx5) + #:use-module (gnu packages gcc) + #:use-module (gnu packages glib) + #:use-module (gnu packages gnome) + #:use-module (gnu packages gtk) #:use-module (gnu packages image) + #:use-module (gnu packages kde-frameworks) + #:use-module (gnu packages language) + #:use-module (gnu packages libreoffice) #:use-module (gnu packages linux) + #:use-module (gnu packages lxqt) #:use-module (gnu packages pkg-config) #:use-module (gnu packages protobuf) #:use-module (gnu packages pulseaudio) #:use-module (gnu packages python) + #:use-module (gnu packages qt) #:use-module (gnu packages tls) #:use-module (gnu packages video) #:use-module (gnu packages xiph) + #:use-module (gnu packages xorg) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) #:use-module (guix git-download) - #:use-module (guix build-system cmake)) + #:use-module (guix build-system cmake) + #:use-module (guix build-system glib-or-gtk) + #:use-module (guix build-system qt)) (define-public tg-owt (let ((commit "fa86fcc00c218813d61a272a56feab55c76a1ab9") @@ -141,3 +163,139 @@ for its use in telegram desktop client.") license:gpl3 ;; LibSRTP, LibVPx, UsrSCTP and Others license:bsd-3))))) + +(define-public telegram-desktop + (package + (name "telegram-desktop") + (version "2.5.1") + (source + (origin + (method git-fetch) + (uri + (git-reference + (url "https://github.com/telegramdesktop/tdesktop.git") + (commit + (string-append "v" version)) + (recursive? #t))) + (file-name + (git-file-name name version)) + (sha256 + (base32 "1qw9vaa482dbz97mzwjzmy3fw72s5bk3hyacyz98ms652xgld6js")) + (modules '((guix build utils) + (ice-9 ftw) + (srfi srfi-1))) + (snippet + `(begin + (let ((keep + '( ;; Custom forks which are incompatible with the ones in Guix. + "libtgvoip" "rlottie" + ;; Not available in Guix. + "SPMediaKeyTap" "statusnotifieritem" "tgcalls"))) + (with-directory-excursion "Telegram/ThirdParty" + (for-each delete-file-recursively + (lset-difference string=? + (scandir ".") + (cons* "." ".." keep)))) + #t))))) + (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)) + #:configure-flags + ;; 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 + (list + "-DTDESKTOP_API_ID=2791056" + "-DTDESKTOP_API_HASH=582d6d0b44f7a2de949e99271fd8b3f2") + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'make-writable + (lambda _ + (for-each make-file-writable (find-files ".")) + #t)) + (add-after 'make-writable 'disable-emojis + (lambda _ + ;; FIXME: Emoji sprites do not get loaded, causing + ;; the application to crash upon launch. + (substitute* "Telegram/lib_ui/ui/emoji_config.cpp" + (("bool _unsupported = false") + "bool _unsupported = true") + ((" generateCache\\(\\);") + "//generateCache();")) + #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))))) + (native-inputs + `(("cmake-shared" ,cmake-shared) + ("extra-cmake-modules" ,extra-cmake-modules) + ("gcc" ,gcc-9) + ("glib:bin" ,glib "bin") + ("gobject-introspection" ,gobject-introspection) + ("gtk+:bin" ,gtk+ "bin") + ("pkg-config" ,pkg-config) + ("python" ,python-wrapper) + ("qttools" ,qttools))) + (inputs + `(("alsa" ,alsa-lib) + ("c++-gsl" ,c++-gsl) + ("catch" ,catch-framework2) + ("expected" ,libexpected) + ("fcitx-qt5" ,fcitx-qt5) + ("fcitx5-qt" ,fcitx5-qt) + ("ffmpeg" ,ffmpeg) + ("glib" ,glib) + ("gtk+" ,gtk+) + ("hime" ,hime) + ("hunspell" ,hunspell) + ("iconv" ,libiconv) + ("libdbusmenu-qt" ,libdbusmenu-qt) + ("libjpeg" ,libjpeg-turbo) + ;; ("libtgvoip" ,libtgvoip) + ("lz4" ,lz4) + ("materialdecoration" ,materialdecoration) + ("minizip" ,minizip) + ("nimf" ,nimf) + ("openal" ,openal) + ("openssl" ,openssl) + ("opus" ,opus) + ("pulseaudio" ,pulseaudio) + ("qrcodegen" ,qrcodegen-cpp) + ("qt" ,qtbase) + ("qt5ct" ,qt5ct) + ("qtwayland" ,qtwayland) + ("range-v3" ,range-v3) + ;; ("rlottie" ,rlottie) + ("tg-owt" ,tg-owt) + ("x11" ,libx11) + ("xcb" ,libxcb) + ("xcb-keysyms" ,xcb-util-keysyms) + ("xxhash" ,xxhash) + ("zlib" ,zlib))) + (propagated-inputs + `(("dconf" ,dconf))) + (synopsis "Telegram Desktop") + (description "Telegram desktop is the official desktop version of the +Telegram instant messager.") + (home-page "https://desktop.telegram.org/") + (license + (list + ;; ThirdParty + license:lgpl2.1+ + ;; Others + license:gpl3+)))) -- 2.30.0