summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoradisbladis <adisbladis@gmail.com>2021-12-14 14:20:40 -0800
committergithub-actions[bot] <github-actions[bot]@users.noreply.github.com>2021-12-14 23:02:56 +0000
commitdf2cb912847131321178977b275b51b00a0c1466 (patch)
tree540528c224952a10a1bb5d760a247523812e485e
parentemacs: Remove unused gvfs patch (diff)
downloadnixpkgs-df2cb912847131321178977b275b51b00a0c1466.tar.gz
emacs: Use string replacement for gvfs tramp detection rather than a patchorigin/backport-150777-to-release-21.11
The patches are unwieldy to manage, especially with the automated packaging flows in the Emacs overlay. (cherry picked from commit 4b89ac58bba54a071fdd65ec96ca9d4d45494797)
-rw-r--r--pkgs/applications/editors/emacs/27.nix1
-rw-r--r--pkgs/applications/editors/emacs/generic.nix10
-rw-r--r--pkgs/applications/editors/emacs/tramp-detect-wrapped-gvfsd.patch11
3 files changed, 10 insertions, 12 deletions
diff --git a/pkgs/applications/editors/emacs/27.nix b/pkgs/applications/editors/emacs/27.nix
index e0e41a78b9ce..436785c34f68 100644
--- a/pkgs/applications/editors/emacs/27.nix
+++ b/pkgs/applications/editors/emacs/27.nix
@@ -2,7 +2,6 @@ import ./generic.nix (rec {
version = "27.2";
sha256 = "sha256-tKfMTnjmPzeGJOCRkhW5EK9bsqCvyBn60pgnLp9Awbk=";
patches = fetchpatch: [
- ./tramp-detect-wrapped-gvfsd.patch
(fetchpatch {
name = "fix-aarch64-darwin-triplet.patch";
url = "https://git.savannah.gnu.org/cgit/emacs.git/patch/?id=a88f63500e475f842e5fbdd9abba4ce122cdb082";
diff --git a/pkgs/applications/editors/emacs/generic.nix b/pkgs/applications/editors/emacs/generic.nix
index 2a1ed2f8b1a4..6b4491169212 100644
--- a/pkgs/applications/editors/emacs/generic.nix
+++ b/pkgs/applications/editors/emacs/generic.nix
@@ -64,6 +64,16 @@ let emacs = stdenv.mkDerivation (lib.optionalAttrs nativeComp {
rm -fr .git
'')
+ # Add the name of the wrapped gvfsd
+ # This used to be carried as a patch but it often got out of sync with upstream
+ # and was hard to maintain for emacs-overlay.
+ (lib.concatStrings (map (fn: ''
+ sed -i 's#(${fn} "gvfs-fuse-daemon")#(${fn} "gvfs-fuse-daemon") (${fn} ".gvfsd-fuse-wrapped")#' lisp/net/tramp-gvfs.el
+ '') [
+ "tramp-compat-process-running-p"
+ "tramp-process-running-p"
+ ]))
+
# Reduce closure size by cleaning the environment of the emacs dumper
''
substituteInPlace src/Makefile.in \
diff --git a/pkgs/applications/editors/emacs/tramp-detect-wrapped-gvfsd.patch b/pkgs/applications/editors/emacs/tramp-detect-wrapped-gvfsd.patch
deleted file mode 100644
index b27dfd47e60e..000000000000
--- a/pkgs/applications/editors/emacs/tramp-detect-wrapped-gvfsd.patch
+++ /dev/null
@@ -1,11 +0,0 @@
-diff --git a/lisp/net/tramp-gvfs.el b/lisp/net/tramp-gvfs.el
-index 9e26c8fd6d..fa220e513c 100644
---- a/lisp/net/tramp-gvfs.el
-+++ b/lisp/net/tramp-gvfs.el
-@@ -125,5 +125,6 @@
- ;; for some processes. Better we don't check.
- (<= emacs-major-version 25)
- (tramp-compat-process-running-p "gvfs-fuse-daemon")
-+ (tramp-compat-process-running-p ".gvfsd-fuse-wrapped")
- (tramp-compat-process-running-p "gvfsd-fuse"))))
- "Non-nil when GVFS is available.")