diff options
| author | adisbladis <adisbladis@gmail.com> | 2021-12-15 11:38:40 +1200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-12-15 11:38:40 +1200 |
| commit | b3c227557b000ecd8482406ea39ef66fba189c7a (patch) | |
| tree | 540528c224952a10a1bb5d760a247523812e485e | |
| parent | Merge pull request #150720 from NixOS/backport-148860-to-release-21.11 (diff) | |
| parent | emacs: Use string replacement for gvfs tramp detection rather than a patch (diff) | |
| download | nixpkgs-b3c227557b000ecd8482406ea39ef66fba189c7a.tar.gz | |
Merge pull request #150780 from NixOS/backport-150777-to-release-21.11
[Backport release-21.11] emacs: Use string replacement for gvfs tramp detection rather than a patch
4 files changed, 10 insertions, 26 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-26.patch b/pkgs/applications/editors/emacs/tramp-detect-wrapped-gvfsd-26.patch deleted file mode 100644 index 5d16194fd202..000000000000 --- a/pkgs/applications/editors/emacs/tramp-detect-wrapped-gvfsd-26.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/lisp/net/tramp-gvfs.el b/lisp/net/tramp-gvfs.el -index f370abba31..f2806263a9 100644 ---- a/lisp/net/tramp-gvfs.el -+++ b/lisp/net/tramp-gvfs.el -@@ -164,7 +164,8 @@ tramp-gvfs-enabled - (and (featurep 'dbusbind) - (tramp-compat-funcall 'dbus-get-unique-name :system) - (tramp-compat-funcall 'dbus-get-unique-name :session) -- (or (tramp-compat-process-running-p "gvfs-fuse-daemon") -+ (or (tramp-compat-process-running-p ".gvfsd-fuse-wrapped") -+ (tramp-compat-process-running-p "gvfs-fuse-daemon") - (tramp-compat-process-running-p "gvfsd-fuse")))) - "Non-nil when GVFS is available.") - 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.") |
