guix_mirror_bot pushed a commit to branch emacs-team
in repository guix.
commit bb916ff794bdb7d8ee4d8b5cc7b561d011c1f250
Author: Morgan Smith <[email protected]>
AuthorDate: Thu Jul 23 12:05:26 2026 -0400
gnu: emacs-tramp: Copy patch phase from emacs-minimal.
* gnu/packages/emacs-xyz.scm
(emacs-tramp)[#:phases]<patch-el-files>: Replace contents with
those from the “patch-tramp” phase from emacs-minimal.
Signed-off-by: Liliana Marie Prikler <[email protected]>
Merges: guix/guix#10135
---
gnu/packages/emacs-xyz.scm | 34 ++++++++++++++++++++++++++++------
1 file changed, 28 insertions(+), 6 deletions(-)
diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 19e343da24..cd1ae02ad5 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -41310,14 +41310,36 @@ well as an option for visually flashing evaluated
s-expressions.")
#:emacs emacs ;need D-Bus
#:phases
#~(modify-phases %standard-phases
- ;; All but one "/bin/" directory refer to remote
- ;; environments, which may not be Guix. Do not patch them
- ;; blindly. However, local encoding shell has to be patched.
+ ;; This phase is duplicated in the emacs-minimal package. Please
+ ;; ensure they stay in sync
(replace 'patch-el-files
(lambda* (#:key inputs #:allow-other-keys)
- (emacs-substitute-variables "tramp.el"
- ("tramp-encoding-shell"
- (search-input-file inputs "/bin/sh"))))))))
+ ;; All but one "/bin/" directory refer to remote
+ ;; environments, which may not be Guix. Do not patch them
+ ;; blindly. However, tramp-encoding-shell has to be patched.
+ (substitute* "tramp.el"
+ (("\"/bin/sh\"")
+ (format #f "~s" (search-input-file inputs "bin/sh")))
+
+ ;; Make sure Tramp looks for binaries in the right places on
+ ;; remote Guix System machines, where 'getconf PATH' returns
+ ;; something bogus.
+ ;; Patch the line after "(defcustom tramp-remote-path".
+ (("\\(tramp-default-remote-path")
+ (format
+ #f "(tramp-default-remote-path ~s ~s ~s ~s ~s ~s ~s "
+ "/run/privileged/bin"
+ "~/.guix-profile/bin" "~/.guix-profile/sbin"
+ "~/.guix-home/bin" "~/.guix-home/sbin"
+ "/run/current-system/profile/bin"
+ "/run/current-system/profile/sbin")))
+
+ ;; match ".gvfs-fuse-daemon-real" and ".gvfsd-fuse-real"
+ ;; respectively when looking for GVFS processes.
+ (substitute* "tramp-gvfs.el"
+ (("\\(tramp-process-running-p \"(.*)\"\\)" all process)
+ (format #f "(or ~a (tramp-process-running-p ~s))"
+ all (string-append "." process "-real")))))))))
(home-page "https://savannah.gnu.org/projects/tramp")
(synopsis "Remote file editing package for Emacs")
(description