From patchwork Wed Apr 28 23:19:34 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Raghav Gururajan X-Patchwork-Id: 28973 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 8212E27BC7C; Thu, 29 Apr 2021 00:22:40 +0100 (BST) 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 C2B9D27BC84 for ; Thu, 29 Apr 2021 00:22:36 +0100 (BST) Received: from localhost ([::1]:48084 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lbtVr-0006uM-VS for patchwork@mira.cbaines.net; Wed, 28 Apr 2021 19:22:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54854) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lbtUQ-0005iW-JG for guix-patches@gnu.org; Wed, 28 Apr 2021 19:21:06 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:42852) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lbtUQ-00024n-9c for guix-patches@gnu.org; Wed, 28 Apr 2021 19:21:06 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lbtUQ-0008CJ-60 for guix-patches@gnu.org; Wed, 28 Apr 2021 19:21:06 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#48091] [PATCH 11/11] gnu: Add tgcli. Resent-From: Raghav Gururajan Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 28 Apr 2021 23:21:06 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48091 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 48091@debbugs.gnu.org Cc: Raghav Gururajan Received: via spool by 48091-submit@debbugs.gnu.org id=B48091.161965205031391 (code B ref 48091); Wed, 28 Apr 2021 23:21:06 +0000 Received: (at 48091) by debbugs.gnu.org; 28 Apr 2021 23:20:50 +0000 Received: from localhost ([127.0.0.1]:54388 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lbtU9-0008AE-Ct for submit@debbugs.gnu.org; Wed, 28 Apr 2021 19:20:50 -0400 Received: from out0.migadu.com ([94.23.1.103]:21395) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lbtTl-00088k-Qq for 48091@debbugs.gnu.org; Wed, 28 Apr 2021 19:20:26 -0400 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raghavgururajan.name; s=key1; t=1619652025; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=5lXkRwZp6ClSgXqDLlohj8yP+VZD/KTpD9seWnN3zC8=; b=uwg+KjMGHgnpa70yb8OpRYyKlS4ktw3FwRbYQl5OvR/4hjR/8wU/Jx/XZGKTvAaUR5UIxo 5/D5D7k6HZSQda2r2eJKJuZQ6Zi8NWqBKoJm+07YnY7znAUKq3Ku4uubGvjCT1yJ1O4pIL 4bCuoEIZN3S5oWaynCbPgj6ODpt5OBf+ObqSlHp3xQ21orF+LbFgCJ9RluTAcp5ZvdY8sV ppXL6KCOQIfaqPoei7CGLvth2Vt5xPj4mDMve+7fgJ24gDm7FDcAmzaJBwgwSKSjUiHCuI aZ27Mx8tsI8xzG/aOTCePn5OgwbuRyy1qh4BTdCdJ0w4V2Yyc9ktAFPaUOjV+Q== Date: Wed, 28 Apr 2021 19:19:34 -0400 Message-Id: <20210428231934.6479-11-rg@raghavgururajan.name> In-Reply-To: <20210428231934.6479-1-rg@raghavgururajan.name> References: <20210428231934.6479-1-rg@raghavgururajan.name> MIME-Version: 1.0 X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: rg@raghavgururajan.name 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: Raghav Gururajan X-ACL-Warn: , Raghav Gururajan via Guix-patches X-Patchwork-Original-From: Raghav Gururajan via Guix-patches via From: Raghav Gururajan X-getmail-retrieved-from-mailbox: Patches * gnu/packages/telegram.scm (tgcli): New variable. --- gnu/packages/telegram.scm | 50 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/gnu/packages/telegram.scm b/gnu/packages/telegram.scm index c4414287a7..6c1a2fac89 100644 --- a/gnu/packages/telegram.scm +++ b/gnu/packages/telegram.scm @@ -50,6 +50,9 @@ #:use-module (gnu packages protobuf) #:use-module (gnu packages pulseaudio) #:use-module (gnu packages python) + #:use-module (gnu packages python-check) + #:use-module (gnu packages python-web) + #:use-module (gnu packages python-xyz) #:use-module (gnu packages qt) #:use-module (gnu packages readline) #:use-module (gnu packages textutils) @@ -68,6 +71,7 @@ #:use-module (guix build-system glib-or-gtk) #:use-module (guix build-system gnu) #:use-module (guix build-system meson) + #:use-module (guix build-system python) #:use-module (guix build-system qt)) (define-public webrtc-for-telegram-desktop @@ -813,3 +817,49 @@ formerly a part of telegram-cli, but now being maintained separately.") (description "TG is the command-line interface for Telegram Messenger.") (home-page "https://github.com/vysheng/tg") (license license:gpl2+)))) + +(define-public tgcli + (package + (name "tgcli") + (version "0.3.1") + (source + (origin + (method git-fetch) + (uri + (git-reference + (url "https://github.com/erayerdin/tgcli") + (commit (string-append "v" version)))) + (file-name + (git-file-name name version)) + (sha256 + (base32 "082zim7rh4r8qyscqimjh2sz7998vv9j1i2y2wwz2rgrlhkhly5r")))) + (build-system python-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + ;; Test requirements referes to specific versions of packages, + ;; which are too old. So we patch to refer to any later versions. + (add-after 'unpack 'patch-test-requirements + (lambda _ + (substitute* "dev.requirements.txt" + (("==") ">=")))) + (replace 'check + (lambda _ + (invoke "pytest")))))) + (native-inputs + `(("coveralls" ,python-coveralls) + ("pytest" ,python-pytest) + ("pytest-click" ,python-pytest-click) + ("pytest-cov" ,python-pytest-cov) + ("mkdocs" ,python-mkdocs) + ("mkdocs-material" ,python-mkdocs-material) + ("requests-mock" ,python-requests-mock))) + (propagated-inputs + `(("click" ,python-click) + ("colorful" ,python-colorful) + ("requests" ,python-requests) + ("yaspin" ,python-yaspin))) + (home-page "https://tgcli.readthedocs.io") + (synopsis "Telegram Terminal Application") + (description "TgCli is a telegram client to automate repetitive tasks.") + (license license:asl2.0)))