biglybt: 3.5.0.0 -> 3.6.0.0
[NixPkgs.git] / pkgs / applications / editors / emacs / sources.nix
blobc8f80ef9fe6c933b91928a57eb959277686a17a3
1 { lib
2 , fetchFromBitbucket
3 , fetchFromSavannah
4 }:
6 let
7   mkArgs = { pname, version, variant, patches ? _: [ ], rev, hash }: {
8     inherit pname version variant patches;
10     src = {
11       "mainline" = (fetchFromSavannah {
12         repo = "emacs";
13         inherit rev hash;
14       });
15       "macport" = (fetchFromBitbucket {
16         owner = "mituharu";
17         repo = "emacs-mac";
18         inherit rev hash;
19       });
20     }.${variant};
22     meta = {
23       homepage = {
24         "mainline" = "https://www.gnu.org/software/emacs/";
25         "macport" = "https://bitbucket.org/mituharu/emacs-mac/";
26       }.${variant};
27       description = "The extensible, customizable GNU text editor"
28                     + lib.optionalString (variant == "macport") " - macport variant";
29       longDescription = ''
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
46       tailored for macOS.
47     '';
48       changelog = {
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";
51       }.${variant};
52       license = lib.licenses.gpl3Plus;
53       maintainers = with lib.maintainers; [
54         AndersonTorres
55         adisbladis
56         jwiegley
57         lovek323
58         matthewbauer
59         # atemu for issues relating to Macport
60       ];
61       platforms = {
62         "mainline" = lib.platforms.all;
63         "macport" = lib.platforms.darwin;
64       }.${variant};
65       mainProgram = "emacs";
66     };
67   };
70   emacs28 = import ./make-emacs.nix (mkArgs {
71     pname = "emacs";
72     version = "28.2";
73     variant = "mainline";
74     rev = "28.2";
75     hash = "sha256-4oSLcUDR0MOEt53QOiZSVU8kPJ67GwugmBxdX3F15Ag=";
76     patches = fetchpatch: [
77       # CVE-2022-45939
78       (fetchpatch {
79         url = "https://git.savannah.gnu.org/cgit/emacs.git/patch/?id=d48bb4874bc6cd3e69c7a15fc3c91cc141025c51";
80         hash = "sha256-TiBQkexn/eb6+IqJNDqR/Rn7S7LVdHmL/21A5tGsyJs=";
81       })
83       # https://lists.gnu.org/archive/html/emacs-devel/2024-03/msg00611.html
84       (fetchpatch {
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=";
87       })
88       (fetchpatch {
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=";
91       })
92       (fetchpatch {
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=";
95       })
96     ];
97   });
99   emacs29 = import ./make-emacs.nix (mkArgs {
100     pname = "emacs";
101     version = "29.3";
102     variant = "mainline";
103     rev = "29.3";
104     hash = "sha256-4yN81djeKb9Hlr6MvaDdXqf4XOl0oolXEYGqkA+KUO0=";
105   });
107   emacs28-macport = import ./make-emacs.nix (mkArgs {
108     pname = "emacs-mac";
109     version = "28.2";
110     variant = "macport";
111     rev = "emacs-28.2-mac-9.1";
112     hash = "sha256-Ne2jQ2nVLNiQmnkkOXVc5AkLVkTpm8pFC7VNY2gQjPE=";
113     patches = fetchpatch: [
114       # CVE-2022-45939
115       (fetchpatch {
116         url = "https://git.savannah.gnu.org/cgit/emacs.git/patch/?id=d48bb4874bc6cd3e69c7a15fc3c91cc141025c51";
117         hash = "sha256-TiBQkexn/eb6+IqJNDqR/Rn7S7LVdHmL/21A5tGsyJs=";
118       })
120       # https://lists.gnu.org/archive/html/emacs-devel/2024-03/msg00611.html
121       (fetchpatch {
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=";
124       })
125       (fetchpatch {
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=";
128       })
129       (fetchpatch {
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=";
132       })
133     ];
134   });
136   emacs29-macport = import ./make-emacs.nix (mkArgs {
137     pname = "emacs-mac";
138     version = "29.1";
139     variant = "macport";
140     rev = "emacs-29.1-mac-10.0";
141     hash = "sha256-TE829qJdPjeOQ+kD0SfyO8d5YpJjBge/g+nScwj+XVU=";
142   });