anchor.diff:        url = "https://gist.githubusercontent.com/aaronjensen/f45894ddf431ecbff78b1bcf533d3e6b/raw/6a5cd7f57341aba673234348d8b0d2e776f86719/Emacs-25-OS-X-use-vfork.patch";
         sha256 = "1nlsxiaynswqhy99jf4mw9x0sndhwcrwy8713kq1l3xqv9dbrzgj";
       })
  +  ] ++ [
  +    # Backport patches so we can use webkitgtk with xwidgets.
  +    (fetchpatch {
  +      name = "0001-Omit-unnecessary-includes-from-xwidget-c.patch";
  +      url = "https://github.com/emacs-mirror/emacs/commit/a36ed9b5e95afea5716256bac24d883263aefbaf.patch";
  +      sha256 = "1j34c0vkj87il87xy1px23yk6bw73adpr7wqa79ncj89i4lc8qkb";
  +    })
  +    (fetchpatch {
  +      name = "0002-xwidget-Use-WebKit2-API.patch";
  +      url = "https://github.com/emacs-mirror/emacs/commit/d781662873f228b110a128f7a2b6583a4d5e0a3a.patch";
  +      sha256 = "1lld56zi4cw2hmjxhhdcc0f07k8lbj32h10wcq4ml3asdwa31ryr";
  +    })
     ];
   
  -  nativeBuildInputs = [ pkgconfig ]
  -    ++ lib.optionals srcRepo [ autoconf automake texinfo ]
  +  nativeBuildInputs = [ pkgconfig autoconf automake texinfo ]
       ++ lib.optional (withX && (withGTK3 || withXwidgets)) wrapGAppsHook;
   
     buildInputs =
  
positive.code:              "--with-gif=no" "--with-tiff=no" ])
      ++ lib.optional withXwidgets "--with-xwidgets";
  
    preConfigure = lib.optionalString srcRepo ''
      ./autogen.sh
    '' + ''
      substituteInPlace lisp/international/mule-cmds.el \
  
negative.code:     ++ lib.optional (withX && withGTK2) gtk2
      ++ lib.optionals (withX && withGTK3) [ gtk3 gsettings-desktop-schemas ]
      ++ lib.optional (stdenv.isDarwin && withX) cairo
      ++ lib.optionals (withX && withXwidgets) [ webkitgtk glib-networking ]
      ++ lib.optionals stdenv.isDarwin [ AppKit GSS ImageIO ];
  
    hardeningDisable = [ "format" ];
  