From edd6216a00437161ddbb658f6d9c9271daa70942 Mon Sep 17 00:00:00 2001 From: adisbladis Date: Fri, 21 Aug 2020 00:58:17 +0200 Subject: [PATCH] emacs26: Add back at version 26.3 --- pkgs/applications/editors/emacs/26.nix | 8 +++++++ .../editors/emacs/clean-env-26.patch | 15 ++++++++++++ .../emacs/tramp-detect-wrapped-gvfsd-26.patch | 14 +++++++++++ pkgs/top-level/all-packages.nix | 24 +++++++++++++++++-- 4 files changed, 59 insertions(+), 2 deletions(-) create mode 100644 pkgs/applications/editors/emacs/26.nix create mode 100644 pkgs/applications/editors/emacs/clean-env-26.patch create mode 100644 pkgs/applications/editors/emacs/tramp-detect-wrapped-gvfsd-26.patch diff --git a/pkgs/applications/editors/emacs/26.nix b/pkgs/applications/editors/emacs/26.nix new file mode 100644 index 00000000000..a151006a995 --- /dev/null +++ b/pkgs/applications/editors/emacs/26.nix @@ -0,0 +1,8 @@ +import ./generic.nix (rec { + version = "26.3"; + sha256 = "119ldpk7sgn9jlpyngv5y4z3i7bb8q3xp4p0qqi7i5nq39syd42d"; + patches = [ + ./clean-env-26.patch + ./tramp-detect-wrapped-gvfsd-26.patch + ]; +}) diff --git a/pkgs/applications/editors/emacs/clean-env-26.patch b/pkgs/applications/editors/emacs/clean-env-26.patch new file mode 100644 index 00000000000..88befda899a --- /dev/null +++ b/pkgs/applications/editors/emacs/clean-env-26.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 +@@ -535,7 +535,7 @@ ifeq ($(CANNOT_DUMP),yes) + ln -f temacs$(EXEEXT) $@ + else + unset EMACS_HEAP_EXEC; \ +- LC_ALL=C $(RUN_TEMACS) -batch $(BUILD_DETAILS) -l loadup dump ++ env -i LC_ALL=C $(RUN_TEMACS) -batch $(BUILD_DETAILS) -l loadup dump + ifneq ($(PAXCTL_dumped),) + $(PAXCTL_dumped) $@ + endif diff --git a/pkgs/applications/editors/emacs/tramp-detect-wrapped-gvfsd-26.patch b/pkgs/applications/editors/emacs/tramp-detect-wrapped-gvfsd-26.patch new file mode 100644 index 00000000000..5d16194fd20 --- /dev/null +++ b/pkgs/applications/editors/emacs/tramp-detect-wrapped-gvfsd-26.patch @@ -0,0 +1,14 @@ +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/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index aad9a4fe13c..500d023829f 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -19881,6 +19881,7 @@ in emacs = emacs27; emacsPackages = emacs27Packages; emacs-nox = emacs27-nox; + emacsWithPackages = emacsPackages.emacsWithPackages; emacs27 = callPackage ../applications/editors/emacs/27.nix { # use override to enable additional features @@ -19901,6 +19902,25 @@ in withGTK3 = false; })); + emacs26 = callPackage ../applications/editors/emacs/26.nix { + # use override to enable additional features + libXaw = xorg.libXaw; + Xaw3d = null; + gconf = null; + alsaLib = null; + imagemagick = null; + acl = null; + gpm = null; + inherit (darwin.apple_sdk.frameworks) AppKit GSS ImageIO; + }; + + emacs26-nox = lowPrio (appendToName "nox" (emacs26.override { + withX = false; + withNS = false; + withGTK2 = false; + withGTK3 = false; + })); + emacsMacport = callPackage ../applications/editors/emacs/macport.nix { inherit (darwin.apple_sdk.frameworks) AppKit Carbon Cocoa IOKit OSAKit Quartz QuartzCore WebKit @@ -19932,10 +19952,10 @@ in }; }; + emacs26Packages = dontRecurseIntoAttrs (emacsPackagesFor emacs26); emacs27Packages = dontRecurseIntoAttrs (emacsPackagesFor emacs27); - + emacs26WithPackages = emacs26Packages.emacsWithPackages; emacs27WithPackages = emacs27Packages.emacsWithPackages; - emacsWithPackages = emacsPackages.emacsWithPackages; inherit (gnome3) empathy;