diff options
author | Zhu Zihao <all_but_last@163.com> | 2021-06-25 13:25:05 +0800 |
---|---|---|
committer | Leo Prikler <leo.prikler@student.tugraz.at> | 2021-07-09 15:08:04 +0200 |
commit | d0ccdd707d42e978eeeb55612398c92889e3ebb1 (patch) | |
tree | 153dbf5a1b87968e9b5201707d01bd6027cbf6f0 /gnu/packages/patches | |
parent | 37861f6c293d7ed1033050b2b0597885ba65186f (diff) | |
download | guix-d0ccdd707d42e978eeeb55612398c92889e3ebb1.tar guix-d0ccdd707d42e978eeeb55612398c92889e3ebb1.tar.gz |
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 <leo.prikler@student.tugraz.at>
Diffstat (limited to 'gnu/packages/patches')
-rw-r--r-- | gnu/packages/patches/emacs-telega-patch-server-functions.patch | 31 | ||||
-rw-r--r-- | gnu/packages/patches/emacs-telega-path-placeholder.patch | 44 |
2 files changed, 44 insertions, 31 deletions
diff --git a/gnu/packages/patches/emacs-telega-patch-server-functions.patch b/gnu/packages/patches/emacs-telega-patch-server-functions.patch deleted file mode 100644 index e3d49278d0..0000000000 --- a/gnu/packages/patches/emacs-telega-patch-server-functions.patch +++ /dev/null @@ -1,31 +0,0 @@ -Remove interactive build for telega-server, as it fails on Guix. -Modify the `telega-server--find-bin' function to only use the version -of telega-server installed by Guix. - -Created by Brett Gilio <brettg@gnu.org> - ---- a/telega-server.el -+++ b/telega-server.el -@@ -113,7 +113,6 @@ If already deferring, then just executes the BODY." - If BUILD-FLAGS is specified, then rebuild server without any - queries using this flags for building, could be empty string. - Otherwise query user about building flags." -- (interactive) - (telega-test-env 'quiet) - (when (or build-flags - (y-or-n-p "Build `telega-server'? ")) -@@ -137,11 +136,8 @@ Otherwise query user about building flags." - (defun telega-server--find-bin () - "Find telega-server executable. - Raise error if not found." -- (let ((exec-path (cons telega-directory exec-path))) -- (or (executable-find "telega-server") -- (progn (telega-server-build) -- (executable-find "telega-server")) -- (error "`telega-server' not found in exec-path")))) -+ (or (executable-find "telega-server") -+ (error "`telega-server' not found in exec-path"))) - - (defun telega-server-version () - "Return telega-server version." - diff --git a/gnu/packages/patches/emacs-telega-path-placeholder.patch b/gnu/packages/patches/emacs-telega-path-placeholder.patch new file mode 100644 index 0000000000..c20be36712 --- /dev/null +++ b/gnu/packages/patches/emacs-telega-path-placeholder.patch @@ -0,0 +1,44 @@ +From 865b8c553722a971c68742c2e849e41eb0e2360c Mon Sep 17 00:00:00 2001 +From: Zhu Zihao <all_but_last@163.com> +Date: Thu, 24 Jun 2021 23:43:50 +0800 +Subject: [PATCH] Replace code that search path with placeholder for + configuration. + +--- + telega-server.el | 6 +----- + telega-util.el | 2 +- + 2 files changed, 2 insertions(+), 6 deletions(-) + +diff --git a/telega-server.el b/telega-server.el +index 999125d..0fa0817 100644 +--- a/telega-server.el ++++ b/telega-server.el +@@ -142,11 +142,7 @@ Otherwise query user about building flags." + (defun telega-server--find-bin () + "Find telega-server executable. + Raise error if not found." +- (let ((exec-path (cons telega-directory exec-path))) +- (or (executable-find "telega-server") +- (progn (telega-server-build) +- (executable-find "telega-server")) +- (error "`telega-server' not found in exec-path")))) ++ "@TELEGA_SERVER_BIN@") + + (defun telega-server-version () + "Return telega-server version." +diff --git a/telega-util.el b/telega-util.el +index 73a46b1..f53e20a 100644 +--- a/telega-util.el ++++ b/telega-util.el +@@ -464,7 +464,7 @@ N can't be 0." + + (defun telega-etc-file (filename) + "Return absolute path to FILENAME from etc/ directory in telega." +- (expand-file-name (concat "etc/" filename) telega--lib-directory)) ++ (concat "@TELEGA_SHARE@" "/" filename)) + + (defun telega-link-props (link-type link-to &optional face) + "Generate props for link button openable with `telega-link--button-action'." +-- +2.32.0 + |