diff mbox series

[bug#45954] Telegram-CLI (v3)

Message ID dd69bdcb-cb37-5331-5f5d-e1c51d2c6680@raghavgururajan.name
State Accepted
Headers show
Series [bug#45954] Telegram-CLI (v3) | expand

Checks

Context Check Description
cbaines/applying patch fail View Laminar job
cbaines/issue success View issue

Commit Message

Raghav Gururajan Jan. 20, 2021, 10:44 a.m. UTC

diff mbox series

Patch

From 294b64749c5762757acc60860186e215f9e13387 Mon Sep 17 00:00:00 2001
From: Raghav Gururajan <rg@raghavgururajan.name>
Date: Sun, 17 Jan 2021 12:16:34 -0500
Subject: [PATCH 16/18] gnu: Add tl-parser.

* gnu/packages/telegram.scm (tl-parser): New variable.
---
 gnu/packages/telegram.scm | 49 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 49 insertions(+)

diff --git a/gnu/packages/telegram.scm b/gnu/packages/telegram.scm
index 1d4e819a44..b77ae97358 100644
--- a/gnu/packages/telegram.scm
+++ b/gnu/packages/telegram.scm
@@ -531,3 +531,52 @@  Telegram instant messager.")
       license:lgpl2.1+
       ;; Others
       license:gpl3+))))
+
+(define-public tl-parser
+  (let ((commit "1933e76f8f4fb74311be723b432e4c56e3a5ec06")
+        (revision "1"))
+    (package
+      (name "tl-parser")
+      (version
+       (git-version "0" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri
+          (git-reference
+           (url "https://github.com/vysheng/tl-parser.git")
+           (commit commit)))
+         (file-name
+          (git-file-name name version))
+         (sha256
+          (base32 "13cwi247kajzpkbl86hnwmn1sn2h6rqndz6khajbqj0mlw9mv4hq"))))
+      (build-system cmake-build-system)
+      (arguments
+       `(#:tests? #f                    ; No target
+         #:phases
+         (modify-phases %standard-phases
+           (replace 'install
+             (lambda* (#:key outputs #:allow-other-keys)
+               (let* ((out (assoc-ref outputs "out"))
+                      (bin (string-append out "/bin"))
+                      (include (string-append out "/include"))
+                      (source (string-append (getenv "TEMP") "/source"))
+                      (build (string-append (getenv "TEMP") "/build")))
+                 ;; Install executables.
+                 (with-directory-excursion build
+                   (for-each
+                    (lambda (file)
+                      (install-file file bin))
+                    (list
+                     "tl-parser")))
+                 ;; Install headers.
+                 (for-each
+                  (lambda (file)
+                    (install-file file (string-append include "/tl-parser")))
+                  (find-files source "\\.h$")))
+               #t)))))
+      (synopsis "Parse tl scheme to tlo")
+      (description "TL-Parser is a tl scheme to tlo file parser.  It was formely
+a part of telegram-cli, but now being maintained separately.")
+      (home-page "https://github.com/vysheng/tl-parser")
+      (license license:gpl2+))))
-- 
2.30.0