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 = "The 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;
53 maintainers = with lib.maintainers; [
59 # atemu for issues relating to Macport
62 "mainline" = lib.platforms.all;
63 "macport" = lib.platforms.darwin;
65 mainProgram = "emacs";
70 emacs28 = import ./make-emacs.nix (mkArgs {
75 hash = "sha256-4oSLcUDR0MOEt53QOiZSVU8kPJ67GwugmBxdX3F15Ag=";
76 patches = fetchpatch: [
79 url = "https://git.savannah.gnu.org/cgit/emacs.git/patch/?id=d48bb4874bc6cd3e69c7a15fc3c91cc141025c51";
80 hash = "sha256-TiBQkexn/eb6+IqJNDqR/Rn7S7LVdHmL/21A5tGsyJs=";
83 # https://lists.gnu.org/archive/html/emacs-devel/2024-03/msg00611.html
85 url = "https://gitweb.gentoo.org/proj/emacs-patches.git/plain/emacs/28.2/10_all_org-macro-eval.patch?id=af40e12cb742510e5d40a06ffc6dfca97e340dd6";
86 hash = "sha256-OdGt4e9JGjWJPkfJhbYsmQQc6jart4BH5aIKPIbWKFs=";
89 url = "https://gitweb.gentoo.org/proj/emacs-patches.git/plain/emacs/28.2/11_all_untrusted-content.patch?id=af40e12cb742510e5d40a06ffc6dfca97e340dd6";
90 hash = "sha256-wa2bsnCt5yFx0+RAFZGBPI+OoKkbrfkkMer/KBEc/wA=";
93 url = "https://gitweb.gentoo.org/proj/emacs-patches.git/plain/emacs/28.2/12_all_org-remote-unsafe.patch?id=af40e12cb742510e5d40a06ffc6dfca97e340dd6";
94 hash = "sha256-b6WU1o3PfDV/6BTPfPNUFny6oERJCNsDrvflxX3Yvek=";
99 emacs29 = import ./make-emacs.nix (mkArgs {
102 variant = "mainline";
104 hash = "sha256-4yN81djeKb9Hlr6MvaDdXqf4XOl0oolXEYGqkA+KUO0=";
107 emacs28-macport = import ./make-emacs.nix (mkArgs {
111 rev = "emacs-28.2-mac-9.1";
112 hash = "sha256-Ne2jQ2nVLNiQmnkkOXVc5AkLVkTpm8pFC7VNY2gQjPE=";
113 patches = fetchpatch: [
116 url = "https://git.savannah.gnu.org/cgit/emacs.git/patch/?id=d48bb4874bc6cd3e69c7a15fc3c91cc141025c51";
117 hash = "sha256-TiBQkexn/eb6+IqJNDqR/Rn7S7LVdHmL/21A5tGsyJs=";
120 # https://lists.gnu.org/archive/html/emacs-devel/2024-03/msg00611.html
122 url = "https://gitweb.gentoo.org/proj/emacs-patches.git/plain/emacs/28.2/10_all_org-macro-eval.patch?id=af40e12cb742510e5d40a06ffc6dfca97e340dd6";
123 hash = "sha256-OdGt4e9JGjWJPkfJhbYsmQQc6jart4BH5aIKPIbWKFs=";
126 url = "https://gitweb.gentoo.org/proj/emacs-patches.git/plain/emacs/28.2/11_all_untrusted-content.patch?id=af40e12cb742510e5d40a06ffc6dfca97e340dd6";
127 hash = "sha256-wa2bsnCt5yFx0+RAFZGBPI+OoKkbrfkkMer/KBEc/wA=";
130 url = "https://gitweb.gentoo.org/proj/emacs-patches.git/plain/emacs/28.2/12_all_org-remote-unsafe.patch?id=af40e12cb742510e5d40a06ffc6dfca97e340dd6";
131 hash = "sha256-b6WU1o3PfDV/6BTPfPNUFny6oERJCNsDrvflxX3Yvek=";
136 emacs29-macport = import ./make-emacs.nix (mkArgs {
140 rev = "emacs-29.1-mac-10.0";
141 hash = "sha256-TE829qJdPjeOQ+kD0SfyO8d5YpJjBge/g+nScwj+XVU=";