From 8ea8186f18755daea48b3e7622180047e12ca94e Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Thu, 13 Aug 2020 18:46:17 +0000 Subject: emacs-pgtk: use same patches as emacs Patches had to be rebased. --- .../patches/nixpkgs-wayland/pkgs/emacs/clean-env.patch | 15 +++++++++++++++ overlays/patches/nixpkgs-wayland/pkgs/emacs/default.nix | 5 ++++- .../pkgs/emacs/tramp-detect-wrapped-gvfsd.patch | 12 ++++++++++++ 3 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 overlays/patches/nixpkgs-wayland/pkgs/emacs/clean-env.patch create mode 100644 overlays/patches/nixpkgs-wayland/pkgs/emacs/tramp-detect-wrapped-gvfsd.patch (limited to 'overlays') diff --git a/overlays/patches/nixpkgs-wayland/pkgs/emacs/clean-env.patch b/overlays/patches/nixpkgs-wayland/pkgs/emacs/clean-env.patch new file mode 100644 index 000000000000..98d38f8b597c --- /dev/null +++ b/overlays/patches/nixpkgs-wayland/pkgs/emacs/clean-env.patch @@ -0,0 +1,15 @@ +Dump temacs in an empty environment to prevent -dev paths from ending +up in the dumped image. + +diff --git a/src/Makefile.in b/src/Makefile.in +--- a/src/Makefile.in ++++ b/src/Makefile.in +@@ -572,7 +572,7 @@ emacs$(EXEEXT): temacs$(EXEEXT) \ + lisp.mk $(etc)/DOC $(lisp) \ + $(lispsource)/international/charprop.el ${charsets} + ifeq ($(DUMPING),unexec) +- LC_ALL=C $(RUN_TEMACS) -batch $(BUILD_DETAILS) -l loadup --temacs=dump ++ env -i LC_ALL=C $(RUN_TEMACS) -batch $(BUILD_DETAILS) -l loadup --temacs=dump + ifneq ($(PAXCTL_dumped),) + $(PAXCTL_dumped) emacs$(EXEEXT) + endif diff --git a/overlays/patches/nixpkgs-wayland/pkgs/emacs/default.nix b/overlays/patches/nixpkgs-wayland/pkgs/emacs/default.nix index d36f138b099a..7e922b9117b6 100644 --- a/overlays/patches/nixpkgs-wayland/pkgs/emacs/default.nix +++ b/overlays/patches/nixpkgs-wayland/pkgs/emacs/default.nix @@ -18,5 +18,8 @@ in buildInputs = old.buildInputs ++ [ cairo ]; - patches = []; + patches = [ + ./clean-env.patch + ./tramp-detect-wrapped-gvfsd.patch + ]; }) diff --git a/overlays/patches/nixpkgs-wayland/pkgs/emacs/tramp-detect-wrapped-gvfsd.patch b/overlays/patches/nixpkgs-wayland/pkgs/emacs/tramp-detect-wrapped-gvfsd.patch new file mode 100644 index 000000000000..31ba4ff75778 --- /dev/null +++ b/overlays/patches/nixpkgs-wayland/pkgs/emacs/tramp-detect-wrapped-gvfsd.patch @@ -0,0 +1,12 @@ +diff --git a/lisp/net/tramp-gvfs.el b/lisp/net/tramp-gvfs.el +index 6467d8f88b..2163c28af6 100644 +--- a/lisp/net/tramp-gvfs.el ++++ b/lisp/net/tramp-gvfs.el +@@ -127,6 +127,7 @@ + (or ;; Until Emacs 25, `process-attributes' could crash Emacs + ;; for some processes. Better we don't check. + (<= emacs-major-version 25) ++ (tramp-process-running-p ".gvfds-fuse-wrapped") + (tramp-process-running-p "gvfs-fuse-daemon") + (tramp-process-running-p "gvfsd-fuse")))) + "Non-nil when GVFS is available.") -- cgit 1.4.1