summary refs log tree commit diff
path: root/pkgs/applications/editors
diff options
context:
space:
mode:
authorMoritz Drexl <Moritz.Drexl@target.com>2017-12-16 12:21:46 +0100
committerOrivej Desh <orivej@gmx.fr>2017-12-16 22:25:42 +0000
commit3d52d43dd983a2e0d966cb55b84d6dd66a16bf12 (patch)
treed2cfa47ef91a36d986ec72a363335bf68564ec0d /pkgs/applications/editors
parent8dc107be5be57f9164174bfecf152a7f01fd4fbe (diff)
downloadnixlib-3d52d43dd983a2e0d966cb55b84d6dd66a16bf12.tar
nixlib-3d52d43dd983a2e0d966cb55b84d6dd66a16bf12.tar.gz
nixlib-3d52d43dd983a2e0d966cb55b84d6dd66a16bf12.tar.bz2
nixlib-3d52d43dd983a2e0d966cb55b84d6dd66a16bf12.tar.lz
nixlib-3d52d43dd983a2e0d966cb55b84d6dd66a16bf12.tar.xz
nixlib-3d52d43dd983a2e0d966cb55b84d6dd66a16bf12.tar.zst
nixlib-3d52d43dd983a2e0d966cb55b84d6dd66a16bf12.zip
emacs: enable vfork on darwin
Issue described here:
https://lists.gnu.org/archive/html/bug-gnu-emacs/2017-04/msg00201.html

In particular fixes lagging magit, as described here:
https://magit.vc/manual/magit/MacOS-Performance.html

The .patch file is taken from the reference there.

The fix is in Emacs master, so this patch should be removed when switching to
Emacs 26.1.
Diffstat (limited to 'pkgs/applications/editors')
-rw-r--r--pkgs/applications/editors/emacs/default.nix16
1 files changed, 13 insertions, 3 deletions
diff --git a/pkgs/applications/editors/emacs/default.nix b/pkgs/applications/editors/emacs/default.nix
index af3298a5883e..f87cc72f2f2b 100644
--- a/pkgs/applications/editors/emacs/default.nix
+++ b/pkgs/applications/editors/emacs/default.nix
@@ -36,9 +36,19 @@ stdenv.mkDerivation rec {
 
   enableParallelBuilding = true;
 
-  patches =
-    [ ./clean-env.patch ]
-    ++ lib.optional stdenv.isDarwin ./at-fdcwd.patch;
+  patches = [
+    ./clean-env.patch
+  ] ++ lib.optionals stdenv.isDarwin [
+    ./at-fdcwd.patch
+
+    # Backport of the fix to
+    # https://lists.gnu.org/archive/html/bug-gnu-emacs/2017-04/msg00201.html
+    # Should be removed when switching to Emacs 26.1
+    (fetchurl {
+      url = "https://gist.githubusercontent.com/aaronjensen/f45894ddf431ecbff78b1bcf533d3e6b/raw/6a5cd7f57341aba673234348d8b0d2e776f86719/Emacs-25-OS-X-use-vfork.patch";
+      sha256 = "1nlsxiaynswqhy99jf4mw9x0sndhwcrwy8713kq1l3xqv9dbrzgj";
+    })
+  ];
 
   nativeBuildInputs = [ pkgconfig ]
     ++ lib.optionals srcRepo [ autoconf automake texinfo ]