From da4116e6b5ba32a1b60c47a2cf65faef1879d931 Mon Sep 17 00:00:00 2001 From: Morgan Smith Date: Thu, 23 Jul 2026 12:05:26 -0400 Subject: gnu: emacs-tramp: Copy patch phase from emacs-minimal. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/emacs-xyz.scm (emacs-tramp)[#:phases]: Replace contents with those from the “patch-tramp” phase from emacs-minimal. Signed-off-by: Liliana Marie Prikler 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 9c04f0b85cc..ccc8c373bd0 100644 --- a/gnu/packages/emacs-xyz.scm +++ b/gnu/packages/emacs-xyz.scm @@ -41672,14 +41672,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 -- cgit v1.2.3