From d0ccdd707d42e978eeeb55612398c92889e3ebb1 Mon Sep 17 00:00:00 2001 From: Zhu Zihao Date: Fri, 25 Jun 2021 13:25:05 +0800 Subject: gnu: Add emacs-telega-server. * gnu/packages/emacs-xyz.scm (emacs-telega-server): New variable. * gnu/packages/patches/emacs-telega-path-placeholder.patch: New file. * gnu/package/patches/emacs-telega-patch-server-functions.patch: Remove stale patch. * gnu/local.mk (dist_patch_DATA): Update accordingly. Signed-off-by: Leo Prikler --- gnu/packages/emacs-xyz.scm | 55 +++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 54 insertions(+), 1 deletion(-) (limited to 'gnu/packages/emacs-xyz.scm') diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm index e4ef3884e8..1a749a05e8 100644 --- a/gnu/packages/emacs-xyz.scm +++ b/gnu/packages/emacs-xyz.scm @@ -81,7 +81,7 @@ ;;; Copyright © 2020, 2021 Niklas Eklund ;;; Copyright © 2020 Marco Grassi ;;; Copyright © 2020 Tomás Ortín Fernández -;;; Copyright © 2020 Zhu Zihao +;;; Copyright © 2020, 2021 Zhu Zihao ;;; Copyright © 2020 Adam Kandur ;;; Copyright © 2020 Tim Howes ;;; Copyright © 2020 Noah Landis @@ -146,6 +146,7 @@ #:use-module (gnu packages djvu) #:use-module (gnu packages ebook) #:use-module (gnu packages emacs) + #:use-module (gnu packages freedesktop) #:use-module (gnu packages golang) #:use-module (gnu packages guile) #:use-module (gnu packages gtk) @@ -26219,6 +26220,58 @@ fish-completion. It can be used in both Eshell and M-x shell.") other @code{helm-type-file} sources such as @code{helm-locate}.") (license license:gpl3+))) +(define-public emacs-telega-server + (package + (name "emacs-telega-server") + (version "0.7.024") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/zevlg/telega.el") + (commit (string-append "v" version)))) + (sha256 + (base32 "1ra04cp49zzx8vy8aswd00l46ixyc44sxh1s3nw880b4ywzxmc6j")) + (file-name (git-file-name "emacs-telega" version)) + (patches + (search-patches "emacs-telega-path-placeholder.patch" + "emacs-telega-test-env.patch")))) + (build-system gnu-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-before 'configure 'enter-subdirectory + (lambda _ (chdir "server") #t)) + (replace 'configure + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (substitute* "Makefile" + (("CC=cc") ,(string-append "CC=" (cc-for-target))) + (("^(INSTALL_PREFIX=).*$" _all prefix) + (string-append prefix out "/bin\n"))) + + (substitute* "run_tests.py" + (("^(TELEGA_SERVER = ).*$" _all prefix) + (string-append prefix + "\"" out "/bin/telega-server\"\n")))))) + (delete 'check) + (add-after 'install 'check + (assoc-ref %standard-phases 'check)) + (add-before 'install-license-files 'leave-subdirectory + (lambda _ (chdir "..") #t))) + #:test-target "test")) + (inputs + `(("tdlib" ,tdlib) + ("libappindicator" ,libappindicator))) + (native-inputs + `(("python" ,python) + ("pkg-config" ,pkg-config))) + (home-page "https://zevlg.github.io/telega.el/") + (synopsis "Server process of Telega") + (description "Telega-server is helper program to interact with Telegram +service, and connect it with Emacs via inter-process communication.") + (license license:gpl3+))) + (define-public emacs-telega ;; This package has versions newer than indicated on MELPA. ;; Get the current version from `telega-version` in telega.el. -- cgit v1.2.3