7 mkArgs = { pname, version, variant, patches ? _: [ ], rev, hash }: {
8 inherit pname version variant patches;
11 "mainline" = (fetchFromSavannah {
15 "macport" = (fetchFromBitbucket {
24 "mainline" = "https://www.gnu.org/software/emacs/";
25 "macport" = "https://bitbucket.org/mituharu/emacs-mac/";
27 description = "Extensible, customizable GNU text editor"
28 + lib.optionalString (variant == "macport") " - macport variant";
30 GNU Emacs is an extensible, customizable text editor—and more. At its core
31 is an interpreter for Emacs Lisp, a dialect of the Lisp programming
32 language with extensions to support text editing.
34 The features of GNU Emacs include: content-sensitive editing modes,
35 including syntax coloring, for a wide variety of file types including
36 plain text, source code, and HTML; complete built-in documentation,
37 including a tutorial for new users; full Unicode support for nearly all
38 human languages and their scripts; highly customizable, using Emacs Lisp
39 code or a graphical interface; a large number of extensions that add other
40 functionality, including a project planner, mail and news reader, debugger
41 interface, calendar, and more. Many of these extensions are distributed
42 with GNU Emacs; others are available separately.
43 '' + lib.optionalString (variant == "macport") ''
45 This release is built from Mitsuharu Yamamoto's patched source code
49 "mainline" = "https://www.gnu.org/savannah-checkouts/gnu/emacs/news/NEWS.${version}";
50 "macport" = "https://bitbucket.org/mituharu/emacs-mac/raw/${rev}/NEWS-mac";
52 license = lib.licenses.gpl3Plus;
54 "mainline" = with lib.maintainers; [
61 "macport" = with lib.maintainers; [ ];
64 "mainline" = lib.platforms.all;
65 "macport" = lib.platforms.darwin;
67 mainProgram = "emacs";
72 emacs28 = import ./make-emacs.nix (mkArgs {
77 hash = "sha256-4oSLcUDR0MOEt53QOiZSVU8kPJ67GwugmBxdX3F15Ag=";
78 patches = fetchpatch: [
81 url = "https://git.savannah.gnu.org/cgit/emacs.git/patch/?id=d48bb4874bc6cd3e69c7a15fc3c91cc141025c51";
82 hash = "sha256-TiBQkexn/eb6+IqJNDqR/Rn7S7LVdHmL/21A5tGsyJs=";
85 # https://lists.gnu.org/archive/html/emacs-devel/2024-03/msg00611.html
87 url = "https://gitweb.gentoo.org/proj/emacs-patches.git/plain/emacs/28.2/10_all_org-macro-eval.patch?id=af40e12cb742510e5d40a06ffc6dfca97e340dd6";
88 hash = "sha256-OdGt4e9JGjWJPkfJhbYsmQQc6jart4BH5aIKPIbWKFs=";
91 url = "https://gitweb.gentoo.org/proj/emacs-patches.git/plain/emacs/28.2/11_all_untrusted-content.patch?id=af40e12cb742510e5d40a06ffc6dfca97e340dd6";
92 hash = "sha256-wa2bsnCt5yFx0+RAFZGBPI+OoKkbrfkkMer/KBEc/wA=";
95 url = "https://gitweb.gentoo.org/proj/emacs-patches.git/plain/emacs/28.2/12_all_org-remote-unsafe.patch?id=af40e12cb742510e5d40a06ffc6dfca97e340dd6";
96 hash = "sha256-b6WU1o3PfDV/6BTPfPNUFny6oERJCNsDrvflxX3Yvek=";
99 # security fix from Emacs 29.4
101 url = "https://git.savannah.gnu.org/cgit/emacs.git/patch/?id=c645e1d8205f0f0663ec4a2d27575b238c646c7c";
102 hash = "sha256-G+gGQx5w3KuWMotR1n/sYYL8WyAABYW3fUPeffMMs38=";
107 emacs29 = import ./make-emacs.nix (mkArgs {
110 variant = "mainline";
112 hash = "sha256-FCP6ySkN9mAdp2T09n6foS2OciqZXc/54guRZ0B4Z2s=";
115 emacs30 = import ./make-emacs.nix (mkArgs {
118 variant = "mainline";
120 hash = "sha256-V2TXLemSCIPTpg6RDChv4va7pHfVcqSMw/EWqvlRQ1o=";
123 emacs28-macport = import ./make-emacs.nix (mkArgs {
127 rev = "emacs-28.2-mac-9.1";
128 hash = "sha256-Ne2jQ2nVLNiQmnkkOXVc5AkLVkTpm8pFC7VNY2gQjPE=";
129 patches = fetchpatch: [
132 url = "https://git.savannah.gnu.org/cgit/emacs.git/patch/?id=d48bb4874bc6cd3e69c7a15fc3c91cc141025c51";
133 hash = "sha256-TiBQkexn/eb6+IqJNDqR/Rn7S7LVdHmL/21A5tGsyJs=";
136 # https://lists.gnu.org/archive/html/emacs-devel/2024-03/msg00611.html
138 url = "https://gitweb.gentoo.org/proj/emacs-patches.git/plain/emacs/28.2/10_all_org-macro-eval.patch?id=af40e12cb742510e5d40a06ffc6dfca97e340dd6";
139 hash = "sha256-OdGt4e9JGjWJPkfJhbYsmQQc6jart4BH5aIKPIbWKFs=";
142 url = "https://gitweb.gentoo.org/proj/emacs-patches.git/plain/emacs/28.2/11_all_untrusted-content.patch?id=af40e12cb742510e5d40a06ffc6dfca97e340dd6";
143 hash = "sha256-wa2bsnCt5yFx0+RAFZGBPI+OoKkbrfkkMer/KBEc/wA=";
146 url = "https://gitweb.gentoo.org/proj/emacs-patches.git/plain/emacs/28.2/12_all_org-remote-unsafe.patch?id=af40e12cb742510e5d40a06ffc6dfca97e340dd6";
147 hash = "sha256-b6WU1o3PfDV/6BTPfPNUFny6oERJCNsDrvflxX3Yvek=";
152 emacs29-macport = import ./make-emacs.nix (mkArgs {
156 rev = "emacs-29.1-mac-10.0";
157 hash = "sha256-TE829qJdPjeOQ+kD0SfyO8d5YpJjBge/g+nScwj+XVU=";