Commit | Line | Data |
---|---|---|
468bdabb | 1 | ;;; GNU Guix --- Functional package management for GNU |
8d2465fc | 2 | ;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2019, 2021 Ludovic Courtès <ludo@gnu.org> |
eeb883cb | 3 | ;;; Copyright © 2013 Andreas Enge <andreas@enge.fr> |
4a3e602c | 4 | ;;; Copyright © 2014 Taylan Ulrich Bayirli/Kammer <taylanbayirli@gmail.com> |
36a09d18 | 5 | ;;; Copyright © 2014, 2015, 2016, 2017, 2018, 2019, 2020 Mark H Weaver <mhw@netris.org> |
eeb883cb RW |
6 | ;;; Copyright © 2014, 2015, 2016, 2017 Alex Kost <alezost@gmail.com> |
7 | ;;; Copyright © 2016, 2018 Arun Isaac <arunisaac@systemreboot.net> | |
8 | ;;; Copyright © 2016 Federico Beffa <beffa@fbengineering.ch> | |
9 | ;;; Copyright © 2016 David Thompson <dthompson2@worcester.edu> | |
3c986a7d | 10 | ;;; Copyright © 2016 Nikita <nikita@n0.is> |
eeb883cb | 11 | ;;; Copyright © 2017 Marius Bakke <mbakke@fastmail.com> |
ffaec307 | 12 | ;;; Copyright © 2017, 2019, 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com> |
eeb883cb RW |
13 | ;;; Copyright © 2017 Alex Vong <alexvong1995@gmail.com> |
14 | ;;; Copyright © 2017, 2018 Ricardo Wurmus <rekado@elephly.net> | |
7a0efa77 | 15 | ;;; Copyright © 2017 Jan Nieuwenhuizen <janneke@gnu.org> |
eeb883cb RW |
16 | ;;; Copyright © 2018 Efraim Flashner <efraim@flashner.co.il> |
17 | ;;; Copyright © 2018 Mathieu Othacehe <m.othacehe@gmail.com> | |
f5ef08c4 | 18 | ;;; Copyright © 2018, 2019, 2021 Tobias Geerinckx-Rice <me@tobias.gr> |
5ce153b1 | 19 | ;;; Copyright © 2019 Jesse John Gildersleve <jessejohngildersleve@zohomail.eu> |
92d2205a AB |
20 | ;;; Copyright © 2019 Valentin Ignatev <valentignatev@gmail.com> |
21 | ;;; Copyright © 2019 Leo Prikler <leo.prikler@student.tugraz.at> | |
c2cf286c | 22 | ;;; Copyright © 2019 Amin Bandali <bandali@gnu.org> |
ef0cb0dd | 23 | ;;; Copyright © 2020 Jack Hill <jackhill@jackhill.us> |
562f7e3f | 24 | ;;; Copyright © 2020 Morgan Smith <Morgan.J.Smith@outlook.com> |
468bdabb LC |
25 | ;;; |
26 | ;;; This file is part of GNU Guix. | |
27 | ;;; | |
28 | ;;; GNU Guix is free software; you can redistribute it and/or modify it | |
29 | ;;; under the terms of the GNU General Public License as published by | |
30 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
31 | ;;; your option) any later version. | |
32 | ;;; | |
33 | ;;; GNU Guix is distributed in the hope that it will be useful, but | |
34 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of | |
35 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
36 | ;;; GNU General Public License for more details. | |
37 | ;;; | |
38 | ;;; You should have received a copy of the GNU General Public License | |
39 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. | |
40 | ||
1ffa7090 | 41 | (define-module (gnu packages emacs) |
f61e0e79 | 42 | #:use-module ((guix licenses) #:prefix license:) |
468bdabb LC |
43 | #:use-module (guix packages) |
44 | #:use-module (guix download) | |
f906d30c | 45 | #:use-module (guix git-download) |
468bdabb | 46 | #:use-module (guix build-system gnu) |
71f57158 | 47 | #:use-module (guix build-system glib-or-gtk) |
59a43334 | 48 | #:use-module (gnu packages) |
eeb883cb | 49 | #:use-module (gnu packages acl) |
18d26210 | 50 | #:use-module (gnu packages autotools) |
be379ee7 | 51 | #:use-module (gnu packages base) |
f61e0e79 | 52 | #:use-module (gnu packages compression) |
eeb883cb | 53 | #:use-module (gnu packages fontutils) |
a80b60f4 AI |
54 | #:use-module (gnu packages fribidi) |
55 | #:use-module (gnu packages gd) | |
eeb883cb RW |
56 | #:use-module (gnu packages gettext) |
57 | #:use-module (gnu packages glib) | |
5ce153b1 | 58 | #:use-module (gnu packages gnome) ; for librsvg |
eeb883cb RW |
59 | #:use-module (gnu packages gtk) |
60 | #:use-module (gnu packages guile) | |
61 | #:use-module (gnu packages image) | |
5ce153b1 | 62 | #:use-module (gnu packages linux) ; alsa-lib |
63 | #:use-module (gnu packages mail) ; for mailutils | |
36a09d18 | 64 | #:use-module (gnu packages multiprecision) |
eeb883cb RW |
65 | #:use-module (gnu packages ncurses) |
66 | #:use-module (gnu packages pkg-config) | |
67 | #:use-module (gnu packages texinfo) | |
68 | #:use-module (gnu packages tls) | |
92d2205a | 69 | #:use-module (gnu packages web) ; for jansson |
5bbb04f9 | 70 | #:use-module (gnu packages webkit) |
eeb883cb RW |
71 | #:use-module (gnu packages xml) |
72 | #:use-module (gnu packages xorg) | |
4a3e602c | 73 | #:use-module (guix utils) |
eeb883cb | 74 | #:use-module (srfi srfi-1)) |
468bdabb LC |
75 | |
76 | (define-public emacs | |
77 | (package | |
78 | (name "emacs") | |
f5ef08c4 | 79 | (version "27.2") |
468bdabb | 80 | (source (origin |
3bd3a625 MC |
81 | (method url-fetch) |
82 | (uri (string-append "mirror://gnu/emacs/emacs-" | |
83 | version ".tar.xz")) | |
84 | (sha256 | |
85 | (base32 | |
f5ef08c4 | 86 | "1ff182gjw9wqsbx1kj5gl2r5pbqhp4ar54g04j33fgz6g17cr9xl")) |
3bd3a625 MC |
87 | (patches (search-patches "emacs-exec-path.patch" |
88 | "emacs-fix-scheme-indent-function.patch" | |
f574f859 | 89 | "emacs-ignore-empty-xim-styles.patch" |
3bd3a625 MC |
90 | "emacs-source-date-epoch.patch")) |
91 | (modules '((guix build utils))) | |
92 | (snippet | |
93 | '(with-directory-excursion "lisp" | |
94 | ;; Delete the bundled byte-compiled elisp files and generated | |
95 | ;; autoloads. | |
96 | (for-each delete-file | |
97 | (append (find-files "." "\\.elc$") | |
98 | (find-files "." "loaddefs\\.el$") | |
36a09d18 | 99 | (find-files "eshell" "^esh-groups\\.el$"))) |
dc701091 | 100 | |
3bd3a625 MC |
101 | ;; Make sure Tramp looks for binaries in the right places on |
102 | ;; remote Guix System machines, where 'getconf PATH' returns | |
103 | ;; something bogus. | |
104 | (substitute* "net/tramp-sh.el" | |
105 | ;; Patch the line after "(defcustom tramp-remote-path". | |
106 | (("\\(tramp-default-remote-path") | |
107 | (format #f "(tramp-default-remote-path ~s ~s ~s ~s " | |
108 | "~/.guix-profile/bin" "~/.guix-profile/sbin" | |
109 | "/run/current-system/profile/bin" | |
110 | "/run/current-system/profile/sbin"))) | |
d1c11418 | 111 | |
3bd3a625 MC |
112 | ;; Make sure Man looks for C header files in the right |
113 | ;; places. | |
114 | (substitute* "man.el" | |
115 | (("\"/usr/local/include\"" line) | |
116 | (string-join | |
117 | (list line | |
118 | "\"~/.guix-profile/include\"" | |
119 | "\"/var/guix/profiles/system/profile/include\"") | |
120 | " "))) | |
121 | #t)))) | |
71f57158 | 122 | (build-system glib-or-gtk-build-system) |
468bdabb | 123 | (arguments |
7ab5c4e0 | 124 | `(#:tests? #f ; no check target |
494978c4 | 125 | #:configure-flags (list "--with-modules" |
36a09d18 | 126 | "--with-cairo" |
494978c4 | 127 | "--disable-build-details") |
2206c7ad | 128 | #:phases |
13fe4891 | 129 | (modify-phases %standard-phases |
4cbd6069 MC |
130 | (add-after 'unpack 'patch-program-file-names |
131 | (lambda _ | |
132 | (substitute* '("src/callproc.c" | |
133 | "lisp/term.el" | |
134 | "lisp/htmlfontify.el" | |
135 | "lisp/textmodes/artist.el" | |
136 | "lisp/progmodes/sh-script.el") | |
137 | (("\"/bin/sh\"") | |
a3efa4f9 | 138 | (format #f "~s" (which "sh")))) |
4cbd6069 | 139 | #t)) |
13fe4891 FB |
140 | (add-before 'configure 'fix-/bin/pwd |
141 | (lambda _ | |
142 | ;; Use `pwd', not `/bin/pwd'. | |
143 | (substitute* (find-files "." "^Makefile\\.in$") | |
144 | (("/bin/pwd") | |
e2d90ee4 MW |
145 | "pwd")) |
146 | #t)) | |
13fe4891 | 147 | (add-after 'install 'install-site-start |
c6a91ada MC |
148 | ;; Use 'guix-emacs' in "site-start.el", which is used autoload the |
149 | ;; Elisp packages found in EMACSLOADPATH. | |
13fe4891 | 150 | (lambda* (#:key inputs outputs #:allow-other-keys) |
59d04f63 | 151 | (let* ((out (assoc-ref outputs "out")) |
4714d0fc | 152 | (lisp-dir (string-append out "/share/emacs/site-lisp")) |
36a09d18 | 153 | (emacs (string-append out "/bin/emacs"))) |
ffaec307 MC |
154 | |
155 | ;; This is duplicated from emacs-utils to prevent coupling. | |
156 | (define* (emacs-byte-compile-directory dir) | |
157 | (let ((expr `(progn | |
158 | (setq byte-compile-debug t) | |
159 | (byte-recompile-directory | |
160 | (file-name-as-directory ,dir) 0 1)))) | |
161 | (invoke emacs "--quick" "--batch" | |
a3efa4f9 | 162 | (format #f "--eval=~s" expr)))) |
ffaec307 | 163 | |
59d04f63 AK |
164 | (copy-file (assoc-ref inputs "guix-emacs.el") |
165 | (string-append lisp-dir "/guix-emacs.el")) | |
13fe4891 FB |
166 | (with-output-to-file (string-append lisp-dir "/site-start.el") |
167 | (lambda () | |
9bd94544 AK |
168 | (display |
169 | (string-append "(when (require 'guix-emacs nil t)\n" | |
170 | " (guix-emacs-autoload-packages))\n")))) | |
a7a49289 MC |
171 | ;; Remove the extraneous subdirs.el file, as it causes Emacs to |
172 | ;; add recursively all the the sub-directories of a profile's | |
173 | ;; share/emacs/site-lisp union when added to EMACSLOADPATH, | |
174 | ;; which leads to conflicts. | |
175 | (delete-file (string-append lisp-dir "/subdirs.el")) | |
4714d0fc | 176 | ;; Byte compile the site-start files. |
36a09d18 MW |
177 | (emacs-byte-compile-directory lisp-dir)) |
178 | #t)) | |
179 | (add-after 'glib-or-gtk-wrap 'restore-emacs-pdmp | |
180 | ;; restore the dump file that Emacs installs somewhere in | |
181 | ;; libexec/ to its original state | |
182 | (lambda* (#:key outputs target #:allow-other-keys) | |
183 | (let* ((libexec (string-append (assoc-ref outputs "out") | |
184 | "/libexec")) | |
185 | ;; each of these find-files should return one file | |
186 | (pdmp (find-files libexec "^emacs\\.pdmp$")) | |
187 | (pdmp-real (find-files libexec | |
188 | "^\\.emacs\\.pdmp-real$"))) | |
189 | (for-each (lambda (wrapper real) | |
190 | (delete-file wrapper) | |
191 | (rename-file real wrapper)) | |
192 | pdmp pdmp-real)) | |
193 | #t)) | |
68be4da8 LP |
194 | (add-after 'glib-or-gtk-wrap 'strip-double-wrap |
195 | (lambda* (#:key outputs #:allow-other-keys) | |
196 | ;; Directly copy emacs-X.Y to emacs, so that it is not wrapped | |
197 | ;; twice. This also fixes a minor issue, where WMs would not be | |
8d2465fc | 198 | ;; able to track emacs back to emacs.desktop. |
68be4da8 | 199 | (with-directory-excursion (assoc-ref outputs "out") |
8d2465fc MS |
200 | (copy-file |
201 | (car (find-files "bin" "^emacs-([0-9]+\\.)+[0-9]+$")) | |
202 | "bin/emacs") | |
68be4da8 | 203 | #t))) |
36a09d18 MW |
204 | (add-before 'reset-gzip-timestamps 'make-compressed-files-writable |
205 | ;; The 'reset-gzip-timestamps phase will throw a permission error | |
206 | ;; if gzip files aren't writable then. This phase is needed when | |
207 | ;; building from a git checkout. | |
208 | (lambda _ | |
209 | (for-each make-file-writable | |
210 | (find-files %output ".*\\.t?gz$")) | |
211 | #t))))) | |
468bdabb | 212 | (inputs |
c4c4cc05 | 213 | `(("gnutls" ,gnutls) |
468bdabb LC |
214 | ("ncurses" ,ncurses) |
215 | ||
5ce153b1 | 216 | ;; Avoid Emacs's limited movemail substitute that retrieves POP3 email |
217 | ;; only via insecure channels. This is not needed for (modern) IMAP. | |
218 | ("mailutils" ,mailutils) | |
219 | ||
468bdabb | 220 | ;; TODO: Add the optional dependencies. |
fa275717 | 221 | ("libx11" ,libx11) |
0a9e9a63 | 222 | ("gtk+" ,gtk+) |
36a09d18 MW |
223 | ("cairo" ,cairo) |
224 | ("pango" ,pango) | |
225 | ("harfbuzz" ,harfbuzz) | |
fa275717 | 226 | ("libxft" ,libxft) |
50efa797 | 227 | ("libtiff" ,libtiff) |
504a83af | 228 | ("giflib" ,giflib) |
4bd428a7 | 229 | ("libjpeg" ,libjpeg-turbo) |
388fd01b | 230 | ("acl" ,acl) |
36a09d18 MW |
231 | ("jansson" ,jansson) |
232 | ("gmp" ,gmp) | |
50efa797 LC |
233 | |
234 | ;; When looking for libpng `configure' links with `-lpng -lz', so we | |
235 | ;; must also provide zlib as an input. | |
236 | ("libpng" ,libpng) | |
f61e0e79 | 237 | ("zlib" ,zlib) |
50efa797 | 238 | |
8ba4dc63 | 239 | ("librsvg" ,librsvg) |
fa275717 | 240 | ("libxpm" ,libxpm) |
50efa797 | 241 | ("libxml2" ,libxml2) |
504a83af MW |
242 | ("libice" ,libice) |
243 | ("libsm" ,libsm) | |
244 | ("alsa-lib" ,alsa-lib) | |
13fe4891 | 245 | ("dbus" ,dbus) |
01c5c21a AI |
246 | |
247 | ;; multilingualization support | |
248 | ("libotf" ,libotf) | |
249 | ("m17n-lib" ,m17n-lib))) | |
c4c4cc05 | 250 | (native-inputs |
59d04f63 AK |
251 | `(("guix-emacs.el" ,(search-auxiliary-file "emacs/guix-emacs.el")) |
252 | ("pkg-config" ,pkg-config) | |
c4c4cc05 | 253 | ("texinfo" ,texinfo))) |
64c98347 LC |
254 | |
255 | (native-search-paths | |
256 | (list (search-path-specification | |
215a45d9 | 257 | (variable "EMACSLOADPATH") |
9aca5cea | 258 | ;; The versioned entry is for the Emacs' builtin libraries. |
3ffdd002 MC |
259 | (files (list "share/emacs/site-lisp" |
260 | (string-append "share/emacs/" version "/lisp")))) | |
215a45d9 | 261 | (search-path-specification |
64c98347 LC |
262 | (variable "INFOPATH") |
263 | (files '("share/info"))))) | |
264 | ||
6fd52309 | 265 | (home-page "https://www.gnu.org/software/emacs/") |
f50d2669 | 266 | (synopsis "The extensible, customizable, self-documenting text editor") |
468bdabb | 267 | (description |
79c311b8 LC |
268 | "GNU Emacs is an extensible and highly customizable text editor. It is |
269 | based on an Emacs Lisp interpreter with extensions for text editing. Emacs | |
270 | has been extended in essentially all areas of computing, giving rise to a | |
271 | vast array of packages supporting, e.g., email, IRC and XMPP messaging, | |
272 | spreadsheets, remote server editing, and much more. Emacs includes extensive | |
273 | documentation on all aspects of the system, from basic editing to writing | |
274 | large Lisp programs. It has full Unicode support for nearly all human | |
275 | languages.") | |
f61e0e79 | 276 | (license license:gpl3+))) |
4f028c8f | 277 | |
562f7e3f MS |
278 | (define-public emacs-next |
279 | (let ((commit "2ea34662c20f71d35dd52a5ed996542c7386b9cb") | |
f88fea0e | 280 | (revision "0")) |
562f7e3f MS |
281 | (package/inherit emacs |
282 | (name "emacs-next") | |
f88fea0e | 283 | (version (git-version "28.0.50" revision commit)) |
562f7e3f MS |
284 | (source |
285 | (origin | |
286 | (inherit (package-source emacs)) | |
287 | (method git-fetch) | |
288 | (uri (git-reference | |
289 | (url "https://git.savannah.gnu.org/git/emacs.git/") | |
290 | (commit commit))) | |
291 | (file-name (git-file-name name version)) | |
292 | (sha256 | |
293 | (base32 | |
294 | "0igjm9kwiswn2dpiy2k9xikbdfc7njs07ry48fqz70anljj8y7y3")))) | |
562f7e3f MS |
295 | (native-inputs |
296 | `(("autoconf" ,autoconf) | |
f88fea0e MS |
297 | ,@(package-native-inputs emacs))) |
298 | (native-search-paths | |
299 | (list (search-path-specification | |
300 | (variable "EMACSLOADPATH") | |
301 | ;; The versioned entry is for the Emacs' builtin libraries. | |
302 | (files (list "share/emacs/site-lisp" | |
303 | (string-append "share/emacs/" | |
304 | (version-major+minor+point version) | |
305 | "/lisp")))) | |
306 | (search-path-specification | |
307 | (variable "INFOPATH") | |
308 | (files '("share/info")))))))) | |
562f7e3f | 309 | |
2a1eda5a | 310 | (define-public emacs-next-pgtk |
5ecc0955 LLB |
311 | (let ((commit "ae18c8ec4f0ef37c8c9cda473770ff47e41291e2") |
312 | (revision "1")) | |
2a1eda5a AT |
313 | (package/inherit emacs-next |
314 | (name "emacs-next-pgtk") | |
315 | (version (git-version "28.0.50" revision commit)) | |
316 | (source | |
317 | (origin | |
318 | (method git-fetch) | |
319 | (uri (git-reference | |
50b18b5c | 320 | (url "https://git.savannah.gnu.org/git/emacs.git/") |
2a1eda5a AT |
321 | (commit commit))) |
322 | (file-name (git-file-name name version)) | |
323 | (sha256 | |
324 | (base32 | |
5ecc0955 | 325 | "07hgfqh965zmra0rbmnf63p3lsinpv5hn5payqcrjx25pl75xnaf")))) |
2a1eda5a AT |
326 | (arguments |
327 | (substitute-keyword-arguments (package-arguments emacs-next) | |
328 | ((#:configure-flags flags ''()) | |
329 | `(cons* "--with-pgtk" "--with-xwidgets" ,flags)))) | |
330 | (propagated-inputs | |
331 | `(("gsettings-desktop-schemas" ,gsettings-desktop-schemas) | |
332 | ("glib-networking" ,glib-networking))) | |
333 | (inputs | |
334 | `(("webkitgtk" ,webkitgtk) | |
335 | ,@(package-inputs emacs-next))) | |
336 | (home-page "https://github.com/masm11/emacs") | |
337 | (synopsis "Emacs text editor with @code{pgtk} and @code{xwidgets} support") | |
338 | (description "This is an unofficial Emacs fork build with a pure-GTK | |
339 | graphical toolkit to work natively on Wayland. In addition to that, xwidgets | |
340 | also enabled and works without glitches even on X server.")))) | |
341 | ||
b2eaf7ba | 342 | (define-public emacs-minimal |
4fd540b7 LC |
343 | ;; This is the version that you should use as an input to packages that just |
344 | ;; need to byte-compile .el files. | |
36a09d18 | 345 | (package/inherit emacs |
b2eaf7ba AK |
346 | (name "emacs-minimal") |
347 | (synopsis "The extensible text editor (used only for byte-compilation)") | |
348 | (build-system gnu-build-system) | |
349 | (arguments | |
4e941436 | 350 | (substitute-keyword-arguments (package-arguments emacs) |
4e941436 | 351 | ((#:configure-flags flags ''()) |
36a09d18 MW |
352 | `(list "--with-gnutls=no" "--disable-build-details")) |
353 | ((#:phases phases) | |
354 | `(modify-phases ,phases | |
68be4da8 LP |
355 | (delete 'restore-emacs-pdmp) |
356 | (delete 'strip-double-wrap))))) | |
b2eaf7ba | 357 | (inputs |
393c5e69 MC |
358 | `(("guix-emacs.el" ,(search-auxiliary-file "emacs/guix-emacs.el")) |
359 | ("ncurses" ,ncurses))) | |
b2eaf7ba AK |
360 | (native-inputs |
361 | `(("pkg-config" ,pkg-config))))) | |
362 | ||
5bbb04f9 | 363 | (define-public emacs-xwidgets |
36a09d18 | 364 | (package/inherit emacs |
5bbb04f9 AB |
365 | (name "emacs-xwidgets") |
366 | (synopsis "The extensible, customizable, self-documenting text | |
367 | editor (with xwidgets support)") | |
368 | (build-system gnu-build-system) | |
369 | (arguments | |
4e941436 LC |
370 | (substitute-keyword-arguments (package-arguments emacs) |
371 | ((#:configure-flags flags ''()) | |
36a09d18 MW |
372 | `(cons "--with-xwidgets" ,flags)) |
373 | ((#:phases phases) | |
374 | `(modify-phases ,phases | |
68be4da8 LP |
375 | (delete 'restore-emacs-pdmp) |
376 | (delete 'strip-double-wrap))))) | |
5bbb04f9 AB |
377 | (inputs |
378 | `(("webkitgtk" ,webkitgtk) | |
379 | ("libxcomposite" ,libxcomposite) | |
380 | ,@(package-inputs emacs))))) | |
381 | ||
b2eaf7ba | 382 | (define-public emacs-no-x |
36a09d18 | 383 | (package/inherit emacs |
4fd540b7 LC |
384 | (name "emacs-no-x") |
385 | (synopsis "The extensible, customizable, self-documenting text | |
386 | editor (console only)") | |
387 | (build-system gnu-build-system) | |
388 | (inputs (fold alist-delete | |
389 | (package-inputs emacs) | |
390 | '("libx11" "gtk+" "libxft" "libtiff" "giflib" "libjpeg" | |
4adde2a9 | 391 | "imagemagick" "libpng" "librsvg" "libxpm" "libice" |
36a09d18 | 392 | "libsm" "cairo" "pango" "harfbuzz" |
4fd540b7 | 393 | |
4adde2a9 | 394 | ;; These depend on libx11, so remove them as well. |
36a09d18 MW |
395 | "libotf" "m17n-lib" "dbus"))) |
396 | (arguments | |
397 | (substitute-keyword-arguments (package-arguments emacs) | |
398 | ((#:configure-flags flags ''()) | |
399 | `(delete "--with-cairo" ,flags)) | |
400 | ((#:phases phases) | |
401 | `(modify-phases ,phases | |
68be4da8 LP |
402 | (delete 'restore-emacs-pdmp) |
403 | (delete 'strip-double-wrap))))))) | |
4fd540b7 | 404 | |
4a3e602c | 405 | (define-public emacs-no-x-toolkit |
36a09d18 | 406 | (package/inherit emacs |
4a3e602c TUBK |
407 | (name "emacs-no-x-toolkit") |
408 | (synopsis "The extensible, customizable, self-documenting text | |
409 | editor (without an X toolkit)" ) | |
71f57158 | 410 | (build-system gnu-build-system) |
388fd01b MW |
411 | (inputs (append `(("inotify-tools" ,inotify-tools)) |
412 | (alist-delete "gtk+" (package-inputs emacs)))) | |
f862697b | 413 | (arguments |
36a09d18 MW |
414 | (substitute-keyword-arguments (package-arguments emacs) |
415 | ((#:configure-flags flags ''()) | |
416 | `(cons "--with-x-toolkit=no" ,flags)) | |
417 | ((#:phases phases) | |
418 | `(modify-phases ,phases | |
68be4da8 LP |
419 | (delete 'restore-emacs-pdmp) |
420 | (delete 'strip-double-wrap))))))) | |
4a3e602c | 421 | |
abbca232 | 422 | (define-public emacs-wide-int |
36a09d18 | 423 | (package/inherit emacs |
abbca232 DNB |
424 | (name "emacs-wide-int") |
425 | (synopsis "The extensible, customizable, self-documenting text | |
426 | editor (with wide ints)" ) | |
427 | (arguments | |
428 | (substitute-keyword-arguments (package-arguments emacs) | |
429 | ((#:configure-flags flags) | |
430 | `(cons "--with-wide-int" ,flags)))))) | |
431 | ||
f906d30c | 432 | (define-public guile-emacs |
ef5fa91c LF |
433 | (let ((commit "41120e0f595b16387eebfbf731fff70481de1b4b") |
434 | (revision "0")) | |
36a09d18 | 435 | (package/inherit emacs |
ef5fa91c LF |
436 | (name "guile-emacs") |
437 | (version (git-version "0.0.0" revision commit)) | |
438 | (source (origin | |
439 | (method git-fetch) | |
440 | (uri (git-reference | |
441 | (url "https://git.hcoop.net/git/bpt/emacs.git") | |
442 | (commit commit))) | |
443 | (file-name (git-file-name name version)) | |
444 | (patches (search-patches "guile-emacs-fix-configure.patch")) | |
445 | (sha256 | |
446 | (base32 | |
447 | "0lvcvsz0f4mawj04db35p1dvkffdqkz8pkhc0jzh9j9x2i63kcz6")))) | |
448 | (native-inputs | |
449 | `(("autoconf" ,autoconf) | |
450 | ("automake" ,automake) | |
451 | ("guile" ,guile-for-guile-emacs) | |
452 | ,@(package-native-inputs emacs))) | |
453 | (arguments | |
454 | (substitute-keyword-arguments `(;; Build fails if we allow parallel build. | |
455 | #:parallel-build? #f | |
456 | ;; Tests aren't passing for now. | |
457 | #:tests? #f | |
458 | ,@(package-arguments emacs)) | |
36a09d18 MW |
459 | ((#:configure-flags flags ''()) |
460 | `(delete "--with-cairo" ,flags)) | |
ef5fa91c LF |
461 | ((#:phases phases) |
462 | `(modify-phases ,phases | |
463 | (add-after 'unpack 'autogen | |
464 | (lambda _ | |
465 | (invoke "sh" "autogen.sh"))) | |
466 | ;; Build sometimes fails: deps/dispnew.d: No such file or directory | |
467 | (add-before 'build 'make-deps-dir | |
468 | (lambda _ | |
36a09d18 | 469 | (invoke "mkdir" "-p" "src/deps"))) |
68be4da8 LP |
470 | (delete 'restore-emacs-pdmp) |
471 | (delete 'strip-double-wrap)))))))) | |
f906d30c | 472 | |
eeb883cb | 473 | (define-public m17n-db |
9a4c9715 | 474 | (package |
eeb883cb RW |
475 | (name "m17n-db") |
476 | (version "1.8.0") | |
477 | (source | |
478 | (origin | |
479 | (method url-fetch) | |
480 | (uri (string-append "mirror://savannah/m17n/m17n-db-" | |
481 | version ".tar.gz")) | |
482 | (sha256 | |
483 | (base32 | |
484 | "0vfw7z9i2s9np6nmx1d4dlsywm044rkaqarn7akffmb6bf1j6zv5")))) | |
9a4c9715 | 485 | (build-system gnu-build-system) |
08fc0d68 | 486 | (inputs |
eeb883cb | 487 | `(("gettext" ,gettext-minimal))) |
77c9286d | 488 | (arguments |
eeb883cb RW |
489 | `(#:configure-flags |
490 | (list (string-append "--with-charmaps=" | |
491 | (assoc-ref %build-inputs "libc") | |
492 | "/share/i18n/charmaps")))) | |
493 | ;; With `guix lint' the home-page URI returns a small page saying | |
494 | ;; that your browser does not handle frames. This triggers the "URI | |
495 | ;; returns suspiciously small file" warning. | |
496 | (home-page "https://www.nongnu.org/m17n/") | |
497 | (synopsis "Multilingual text processing library (database)") | |
498 | (description "The m17n library realizes multilingualization of | |
499 | many aspects of applications. The m17n library represents | |
500 | multilingual text as an object named M-text. M-text is a string with | |
501 | attributes called text properties, and designed to substitute for | |
502 | string in C. Text properties carry any information required to input, | |
503 | display and edit the text. | |
c7e553a3 | 504 | |
eeb883cb RW |
505 | This package contains the library database.") |
506 | (license license:lgpl2.1+))) | |
1095bd1d | 507 | |
eeb883cb | 508 | (define-public m17n-lib |
2316078a | 509 | (package |
eeb883cb RW |
510 | (name "m17n-lib") |
511 | (version "1.8.0") | |
2316078a RW |
512 | (source |
513 | (origin | |
514 | (method url-fetch) | |
eeb883cb RW |
515 | (uri (string-append "mirror://savannah/m17n/m17n-lib-" |
516 | version ".tar.gz")) | |
2316078a RW |
517 | (sha256 |
518 | (base32 | |
eeb883cb | 519 | "0jp61y09xqj10mclpip48qlfhniw8gwy8b28cbzxy8hq8pkwmfkq")))) |
64e43c67 | 520 | (build-system gnu-build-system) |
64e43c67 | 521 | (inputs |
eeb883cb RW |
522 | `(("fribidi" ,fribidi) |
523 | ("gd" ,gd) | |
524 | ("libotf" ,libotf) | |
525 | ("libxft" ,libxft) | |
526 | ("libxml2" ,libxml2) | |
527 | ("m17n-db" ,m17n-db))) | |
85777fe5 | 528 | (arguments |
eeb883cb RW |
529 | `(#:parallel-build? #f)) |
530 | ;; With `guix lint' the home-page URI returns a small page saying | |
531 | ;; that your browser does not handle frames. This triggers the "URI | |
532 | ;; returns suspiciously small file" warning. | |
533 | (home-page "https://www.nongnu.org/m17n/") | |
534 | (synopsis "Multilingual text processing library (runtime)") | |
535 | (description "The m17n library realizes multilingualization of | |
536 | many aspects of applications. The m17n library represents | |
537 | multilingual text as an object named M-text. M-text is a string with | |
538 | attributes called text properties, and designed to substitute for | |
539 | string in C. Text properties carry any information required to input, | |
540 | display and edit the text. | |
cf9ce01f | 541 | |
eeb883cb RW |
542 | This package contains the library runtime.") |
543 | (license license:lgpl2.1+))) |