summaryrefslogtreecommitdiff
path: root/gnu/packages/telegram.scm
diff options
context:
space:
mode:
authorRaghav Gururajan <rg@raghavgururajan.name>2021-04-28 17:06:27 -0400
committerRaghav Gururajan <rg@raghavgururajan.name>2021-05-02 07:45:27 -0400
commit49d8f954e631abaec08fc58f58cbfd13c3aabc41 (patch)
treeffa7f4e061c93acc5065091907d37c89ccdd9f90 /gnu/packages/telegram.scm
parent255ff5ee289d62dd91dec7eaab2d93ad540caeff (diff)
gnu: Add tgcli.
* gnu/packages/telegram.scm (tgcli): New variable.
Diffstat (limited to 'gnu/packages/telegram.scm')
-rw-r--r--gnu/packages/telegram.scm52
1 files changed, 52 insertions, 0 deletions
diff --git a/gnu/packages/telegram.scm b/gnu/packages/telegram.scm
index e6bfe6c4f2..6f77482117 100644
--- a/gnu/packages/telegram.scm
+++ b/gnu/packages/telegram.scm
@@ -49,6 +49,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)
@@ -66,6 +69,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
@@ -783,3 +787,51 @@ 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 them to refer to any later versions.
+ (add-after 'unpack 'patch-test-requirements
+ (lambda _
+ (substitute* "dev.requirements.txt"
+ (("==") ">="))))
+ (replace 'check
+ (lambda* (#:key inputs outputs tests? #:allow-other-keys)
+ (when tests?
+ (add-installed-pythonpath inputs outputs)
+ (invoke "pytest" "tests")))))))
+ (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)))