gnu: Add tgcli.

* gnu/packages/telegram.scm (tgcli): New variable.
This commit is contained in:
Raghav Gururajan 2021-04-28 17:06:27 -04:00
parent 255ff5ee28
commit 49d8f954e6
No known key found for this signature in database
GPG key ID: 5F5816647F8BE551

View file

@ -49,6 +49,9 @@ (define-module (gnu packages telegram)
#:use-module (gnu packages protobuf) #:use-module (gnu packages protobuf)
#:use-module (gnu packages pulseaudio) #:use-module (gnu packages pulseaudio)
#:use-module (gnu packages python) #: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 qt)
#:use-module (gnu packages readline) #:use-module (gnu packages readline)
#:use-module (gnu packages textutils) #:use-module (gnu packages textutils)
@ -66,6 +69,7 @@ (define-module (gnu packages telegram)
#:use-module (guix build-system glib-or-gtk) #:use-module (guix build-system glib-or-gtk)
#:use-module (guix build-system gnu) #:use-module (guix build-system gnu)
#:use-module (guix build-system meson) #:use-module (guix build-system meson)
#:use-module (guix build-system python)
#:use-module (guix build-system qt)) #:use-module (guix build-system qt))
(define-public webrtc-for-telegram-desktop (define-public webrtc-for-telegram-desktop
@ -783,3 +787,51 @@ (define-public telegram-cli
(description "TG is the command-line interface for Telegram Messenger.") (description "TG is the command-line interface for Telegram Messenger.")
(home-page "https://github.com/vysheng/tg") (home-page "https://github.com/vysheng/tg")
(license license:gpl2+)))) (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)))