From 597f4fe496a3bd9653ea1d2c6afb8bcf098da64f Mon Sep 17 00:00:00 2001 From: Raghav Gururajan Date: Mon, 1 Feb 2021 16:38:25 -0500 Subject: [PATCH 1/3] 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 66b94baf28..ab8b9362f2 100644 --- a/gnu/packages/telegram.scm +++ b/gnu/packages/telegram.scm @@ -555,3 +555,52 @@ Telegram instant messager.") license:lgpl2.1+ ;; Others license:gpl3+)))) + +(define-public tl-parser + (let ((commit "1933e76f8f4fb74311be723b432e4c56e3a5ec06") + (revision "21")) + (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