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 | 20 | ;;; Copyright © 2019 Valentin Ignatev <valentignatev@gmail.com> |
4baeb727 | 21 | ;;; Copyright © 2019, 2021 Liliana Marie Prikler <liliana.prikler@gmail.com> |
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 | 43 | #:use-module (guix packages) |
64557bc6 | 44 | #:use-module (guix gexp) |
468bdabb | 45 | #:use-module (guix download) |
f906d30c | 46 | #:use-module (guix git-download) |
468bdabb | 47 | #:use-module (guix build-system gnu) |
71f57158 | 48 | #:use-module (guix build-system glib-or-gtk) |
59a43334 | 49 | #:use-module (gnu packages) |
eeb883cb | 50 | #:use-module (gnu packages acl) |
18d26210 | 51 | #:use-module (gnu packages autotools) |
be379ee7 | 52 | #:use-module (gnu packages base) |
f61e0e79 | 53 | #:use-module (gnu packages compression) |
eeb883cb | 54 | #:use-module (gnu packages fontutils) |
64557bc6 | 55 | #:use-module (gnu packages freedesktop) |
a80b60f4 AI |
56 | #:use-module (gnu packages fribidi) |
57 | #:use-module (gnu packages gd) | |
eeb883cb | 58 | #:use-module (gnu packages gettext) |
4baeb727 | 59 | #:use-module (gnu packages ghostscript) |
eeb883cb | 60 | #:use-module (gnu packages glib) |
5ce153b1 | 61 | #:use-module (gnu packages gnome) ; for librsvg |
eeb883cb RW |
62 | #:use-module (gnu packages gtk) |
63 | #:use-module (gnu packages guile) | |
64 | #:use-module (gnu packages image) | |
947398c7 | 65 | #:use-module (gnu packages linux) ; alsa-lib, gpm |
5ce153b1 | 66 | #:use-module (gnu packages mail) ; for mailutils |
36a09d18 | 67 | #:use-module (gnu packages multiprecision) |
eeb883cb | 68 | #:use-module (gnu packages ncurses) |
4baeb727 | 69 | #:use-module (gnu packages pdf) |
eeb883cb RW |
70 | #:use-module (gnu packages pkg-config) |
71 | #:use-module (gnu packages texinfo) | |
72 | #:use-module (gnu packages tls) | |
92d2205a | 73 | #:use-module (gnu packages web) ; for jansson |
5bbb04f9 | 74 | #:use-module (gnu packages webkit) |
eeb883cb RW |
75 | #:use-module (gnu packages xml) |
76 | #:use-module (gnu packages xorg) | |
4a3e602c | 77 | #:use-module (guix utils) |
5d2863df | 78 | #:use-module (ice-9 match) |
eeb883cb | 79 | #:use-module (srfi srfi-1)) |
468bdabb LC |
80 | |
81 | (define-public emacs | |
82 | (package | |
83 | (name "emacs") | |
b65a1e4a | 84 | (version "28.1") |
468bdabb | 85 | (source (origin |
3bd3a625 MC |
86 | (method url-fetch) |
87 | (uri (string-append "mirror://gnu/emacs/emacs-" | |
88 | version ".tar.xz")) | |
89 | (sha256 | |
90 | (base32 | |
b65a1e4a | 91 | "1qbmmmhnjhn4lvzsnyk7l5ganbi6wzbm38jc1a7hhyh3k78b7c98")) |
3bd3a625 MC |
92 | (patches (search-patches "emacs-exec-path.patch" |
93 | "emacs-fix-scheme-indent-function.patch" | |
94 | "emacs-source-date-epoch.patch")) | |
95 | (modules '((guix build utils))) | |
96 | (snippet | |
97 | '(with-directory-excursion "lisp" | |
98 | ;; Delete the bundled byte-compiled elisp files and generated | |
99 | ;; autoloads. | |
100 | (for-each delete-file | |
101 | (append (find-files "." "\\.elc$") | |
102 | (find-files "." "loaddefs\\.el$") | |
36a09d18 | 103 | (find-files "eshell" "^esh-groups\\.el$"))) |
dc701091 | 104 | |
3bd3a625 MC |
105 | ;; Make sure Tramp looks for binaries in the right places on |
106 | ;; remote Guix System machines, where 'getconf PATH' returns | |
107 | ;; something bogus. | |
108 | (substitute* "net/tramp-sh.el" | |
109 | ;; Patch the line after "(defcustom tramp-remote-path". | |
110 | (("\\(tramp-default-remote-path") | |
111 | (format #f "(tramp-default-remote-path ~s ~s ~s ~s " | |
112 | "~/.guix-profile/bin" "~/.guix-profile/sbin" | |
113 | "/run/current-system/profile/bin" | |
114 | "/run/current-system/profile/sbin"))) | |
d1c11418 | 115 | |
3bd3a625 MC |
116 | ;; Make sure Man looks for C header files in the right |
117 | ;; places. | |
118 | (substitute* "man.el" | |
119 | (("\"/usr/local/include\"" line) | |
120 | (string-join | |
121 | (list line | |
122 | "\"~/.guix-profile/include\"" | |
123 | "\"/var/guix/profiles/system/profile/include\"") | |
64557bc6 | 124 | " "))))))) |
71f57158 | 125 | (build-system glib-or-gtk-build-system) |
468bdabb | 126 | (arguments |
64557bc6 LMP |
127 | (list |
128 | #:tests? #f ; no check target | |
129 | #:configure-flags #~(list "--with-modules" | |
130 | "--with-cairo" | |
131 | "--disable-build-details") | |
132 | #:phases | |
133 | #~(modify-phases %standard-phases | |
5f315e1d LMP |
134 | (add-after 'unpack 'enable-elogind |
135 | (lambda _ | |
136 | (substitute* "configure.ac" | |
137 | (("libsystemd") "libelogind")) | |
138 | (when (file-exists? "configure") | |
139 | (delete-file "configure")))) | |
64557bc6 LMP |
140 | (add-after 'unpack 'patch-program-file-names |
141 | (lambda* (#:key inputs #:allow-other-keys) | |
142 | (substitute* '("src/callproc.c" | |
143 | "lisp/term.el" | |
144 | "lisp/htmlfontify.el" | |
145 | "lisp/textmodes/artist.el" | |
146 | "lisp/progmodes/sh-script.el") | |
147 | (("\"/bin/sh\"") | |
148 | (format #f "~s" (search-input-file inputs "/bin/sh")))) | |
149 | (substitute* "lisp/doc-view.el" | |
150 | (("\"(gs|dvipdf|ps2pdf|pdftotext)\"" all what) | |
151 | (let ((replacement (search-input-file | |
152 | inputs | |
153 | (string-append "/bin/" what)))) | |
154 | (if replacement | |
155 | (string-append "\"" replacement "\"") | |
156 | all)))) | |
157 | ;; match ".gvfs-fuse-daemon-real" and ".gvfsd-fuse-real" | |
158 | ;; respectively when looking for GVFS processes. | |
159 | (substitute* "lisp/net/tramp-gvfs.el" | |
160 | (("\\(tramp-compat-process-running-p \"(.*)\"\\)" all process) | |
161 | (format #f "(or ~a (tramp-compat-process-running-p ~s))" | |
162 | all (string-append "." process "-real")))))) | |
163 | (add-before 'configure 'fix-/bin/pwd | |
164 | (lambda _ | |
165 | ;; Use `pwd', not `/bin/pwd'. | |
166 | (substitute* (find-files "." "^Makefile\\.in$") | |
167 | (("/bin/pwd") | |
168 | "pwd")))) | |
169 | (add-after 'install 'install-site-start | |
170 | ;; Use 'guix-emacs' in "site-start.el", which is used autoload the | |
171 | ;; Elisp packages found in EMACSLOADPATH. | |
172 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
173 | (let* ((out (assoc-ref outputs "out")) | |
174 | (lisp-dir (string-append out "/share/emacs/site-lisp")) | |
175 | (emacs (string-append out "/bin/emacs"))) | |
ffaec307 | 176 | |
64557bc6 LMP |
177 | ;; This is duplicated from emacs-utils to prevent coupling. |
178 | (define* (emacs-byte-compile-directory dir) | |
179 | (let ((expr `(progn | |
180 | (setq byte-compile-debug t) | |
181 | (byte-recompile-directory | |
182 | (file-name-as-directory ,dir) 0 1)))) | |
183 | (invoke emacs "--quick" "--batch" | |
184 | (format #f "--eval=~s" expr)))) | |
ffaec307 | 185 | |
64557bc6 LMP |
186 | (copy-file #$(local-file |
187 | (search-auxiliary-file "emacs/guix-emacs.el")) | |
188 | (string-append lisp-dir "/guix-emacs.el")) | |
189 | (with-output-to-file (string-append lisp-dir "/site-start.el") | |
190 | (lambda () | |
191 | (display | |
192 | (string-append | |
193 | "(when (require 'guix-emacs nil t)\n" | |
194 | " (guix-emacs-autoload-packages)\n" | |
195 | " (advice-add 'package-load-all-descriptors" | |
196 | " :after #'guix-emacs-load-package-descriptors))")))) | |
197 | ;; Remove the extraneous subdirs.el file, as it causes Emacs to | |
198 | ;; add recursively all the the sub-directories of a profile's | |
199 | ;; share/emacs/site-lisp union when added to EMACSLOADPATH, | |
200 | ;; which leads to conflicts. | |
201 | (delete-file (string-append lisp-dir "/subdirs.el")) | |
202 | ;; Byte compile the site-start files. | |
203 | (emacs-byte-compile-directory lisp-dir)))) | |
204 | (add-after 'glib-or-gtk-wrap 'restore-emacs-pdmp | |
205 | ;; restore the dump file that Emacs installs somewhere in | |
206 | ;; libexec/ to its original state | |
207 | (lambda* (#:key outputs target #:allow-other-keys) | |
208 | (let* ((libexec (string-append (assoc-ref outputs "out") | |
209 | "/libexec")) | |
210 | ;; each of these ought to only match a single file, | |
211 | ;; but even if not (find-files) sorts by string<, | |
212 | ;; so the Nth element in one maps to the Nth element of | |
213 | ;; the other | |
214 | (pdmp (find-files libexec "\\.pdmp$")) | |
215 | (pdmp-real (find-files libexec "\\.pdmp-real$"))) | |
216 | (for-each rename-file pdmp-real pdmp)))) | |
217 | (add-after 'glib-or-gtk-wrap 'strip-double-wrap | |
218 | (lambda* (#:key outputs #:allow-other-keys) | |
219 | ;; Directly copy emacs-X.Y to emacs, so that it is not wrapped | |
220 | ;; twice. This also fixes a minor issue, where WMs would not be | |
221 | ;; able to track emacs back to emacs.desktop. | |
222 | (with-directory-excursion (assoc-ref outputs "out") | |
223 | (copy-file | |
224 | (car (find-files "bin" "^emacs-([0-9]+\\.)+[0-9]+$")) | |
225 | "bin/emacs")))) | |
226 | (add-after 'strip-double-wrap 'wrap-emacs-paths | |
227 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
228 | (let* ((out (assoc-ref outputs "out")) | |
229 | (lisp-dirs (find-files (string-append out "/share/emacs") | |
230 | "^lisp$" | |
231 | #:directories? #t))) | |
232 | (for-each | |
233 | (lambda (prog) | |
234 | (wrap-program prog | |
235 | ;; emacs-next and variants rely on uname being in PATH for | |
236 | ;; Tramp. Tramp paths can't be hardcoded, because they | |
237 | ;; need to be portable. | |
238 | `("PATH" suffix | |
239 | ,(map dirname | |
240 | (list (search-input-file inputs "/bin/gzip") | |
241 | ;; for coreutils | |
242 | (search-input-file inputs "/bin/yes")))) | |
243 | `("EMACSLOADPATH" suffix ,lisp-dirs))) | |
244 | (find-files (string-append out "/bin") | |
245 | ;; Matches versioned and unversioned emacs binaries. | |
246 | ;; We don't patch emacsclient, because it takes its | |
247 | ;; environment variables from emacs. | |
248 | ;; Likewise, we don't need to patch helper binaries | |
249 | ;; like etags, ctags or ebrowse. | |
250 | "^emacs(-[0-9]+(\\.[0-9]+)*)?$")))))))) | |
468bdabb | 251 | (inputs |
64557bc6 LMP |
252 | (list gnutls |
253 | ncurses | |
468bdabb | 254 | |
64557bc6 LMP |
255 | ;; Required for "core" functionality, such as dired and compression. |
256 | coreutils | |
257 | gzip | |
d13b46fa | 258 | |
64557bc6 LMP |
259 | ;; Avoid Emacs's limited movemail substitute that retrieves POP3 |
260 | ;; email only via insecure channels. | |
261 | ;; This is not needed for (modern) IMAP. | |
262 | mailutils | |
5ce153b1 | 263 | |
64557bc6 LMP |
264 | ;; TODO: Add the optional dependencies. |
265 | gpm | |
266 | libx11 | |
267 | gtk+ | |
268 | cairo | |
269 | pango | |
270 | harfbuzz | |
271 | libxft | |
272 | libtiff | |
273 | giflib | |
274 | libjpeg-turbo | |
275 | acl | |
276 | jansson | |
277 | gmp | |
278 | ghostscript | |
279 | poppler | |
5f315e1d | 280 | elogind |
50efa797 | 281 | |
64557bc6 LMP |
282 | ;; When looking for libpng `configure' links with `-lpng -lz', so we |
283 | ;; must also provide zlib as an input. | |
284 | libpng | |
285 | zlib | |
286 | (if (target-x86-64?) | |
287 | librsvg-bootstrap | |
288 | librsvg-2.40) | |
289 | libxpm | |
290 | libxml2 | |
291 | libice | |
292 | libsm | |
293 | alsa-lib | |
294 | dbus | |
01c5c21a | 295 | |
64557bc6 LMP |
296 | ;; multilingualization support |
297 | libotf | |
298 | m17n-lib)) | |
c4c4cc05 | 299 | (native-inputs |
5f315e1d | 300 | (list autoconf pkg-config texinfo)) |
64c98347 LC |
301 | (native-search-paths |
302 | (list (search-path-specification | |
215a45d9 | 303 | (variable "EMACSLOADPATH") |
307a2d2e | 304 | (files '("share/emacs/site-lisp"))) |
215a45d9 | 305 | (search-path-specification |
64c98347 LC |
306 | (variable "INFOPATH") |
307 | (files '("share/info"))))) | |
308 | ||
6fd52309 | 309 | (home-page "https://www.gnu.org/software/emacs/") |
f50d2669 | 310 | (synopsis "The extensible, customizable, self-documenting text editor") |
468bdabb | 311 | (description |
79c311b8 LC |
312 | "GNU Emacs is an extensible and highly customizable text editor. It is |
313 | based on an Emacs Lisp interpreter with extensions for text editing. Emacs | |
314 | has been extended in essentially all areas of computing, giving rise to a | |
315 | vast array of packages supporting, e.g., email, IRC and XMPP messaging, | |
316 | spreadsheets, remote server editing, and much more. Emacs includes extensive | |
317 | documentation on all aspects of the system, from basic editing to writing | |
318 | large Lisp programs. It has full Unicode support for nearly all human | |
319 | languages.") | |
f61e0e79 | 320 | (license license:gpl3+))) |
4f028c8f | 321 | |
562f7e3f | 322 | (define-public emacs-next |
eb02e086 | 323 | (let ((commit "38d87c43c2ad727406dcfe316aac5e24e202c251") |
f88fea0e | 324 | (revision "0")) |
dbcf2b61 MB |
325 | (package |
326 | (inherit emacs) | |
562f7e3f | 327 | (name "emacs-next") |
eb02e086 | 328 | (version (git-version "29.0.50" revision commit)) |
562f7e3f MS |
329 | (source |
330 | (origin | |
331 | (inherit (package-source emacs)) | |
332 | (method git-fetch) | |
333 | (uri (git-reference | |
334 | (url "https://git.savannah.gnu.org/git/emacs.git/") | |
335 | (commit commit))) | |
336 | (file-name (git-file-name name version)) | |
337 | (sha256 | |
338 | (base32 | |
eb02e086 | 339 | "0h206asgaqfzhz36p78n23yj4p7kbr6a1f0j0njzxf0ypqrmw9yr")))) |
562f7e3f | 340 | (native-inputs |
8394619b LC |
341 | (modify-inputs (package-native-inputs emacs) |
342 | (prepend autoconf)))))) | |
562f7e3f | 343 | |
2a1eda5a | 344 | (define-public emacs-next-pgtk |
52795294 LMP |
345 | (package |
346 | (inherit emacs-next) | |
347 | (name "emacs-next-pgtk") | |
348 | (arguments | |
349 | (substitute-keyword-arguments (package-arguments emacs-next) | |
350 | ((#:configure-flags flags ''()) | |
351 | `(cons* "--with-pgtk" "--with-xwidgets" ,flags)))) | |
352 | (propagated-inputs | |
353 | (list gsettings-desktop-schemas glib-networking)) | |
354 | (inputs | |
355 | `(("webkitgtk" ,webkitgtk-with-libsoup2) | |
356 | ,@(package-inputs emacs-next))) | |
357 | (home-page "https://github.com/masm11/emacs") | |
358 | (synopsis "Emacs text editor with @code{pgtk} and @code{xwidgets} support") | |
359 | (description "This Emacs build implements graphical UI purely in terms of | |
360 | GTK and also enables xwidgets."))) | |
2a1eda5a | 361 | |
b2eaf7ba | 362 | (define-public emacs-minimal |
4fd540b7 LC |
363 | ;; This is the version that you should use as an input to packages that just |
364 | ;; need to byte-compile .el files. | |
36a09d18 | 365 | (package/inherit emacs |
b2eaf7ba AK |
366 | (name "emacs-minimal") |
367 | (synopsis "The extensible text editor (used only for byte-compilation)") | |
368 | (build-system gnu-build-system) | |
369 | (arguments | |
4e941436 | 370 | (substitute-keyword-arguments (package-arguments emacs) |
4e941436 | 371 | ((#:configure-flags flags ''()) |
35707e50 | 372 | #~(list "--with-gnutls=no" "--disable-build-details")) |
36a09d18 | 373 | ((#:phases phases) |
35707e50 LMP |
374 | #~(modify-phases #$phases |
375 | (delete 'restore-emacs-pdmp) | |
376 | (delete 'strip-double-wrap))))) | |
b2eaf7ba | 377 | (inputs |
393c5e69 | 378 | `(("guix-emacs.el" ,(search-auxiliary-file "emacs/guix-emacs.el")) |
d13b46fa LP |
379 | ("ncurses" ,ncurses) |
380 | ("coreutils" ,coreutils) | |
381 | ("gzip" ,gzip))) | |
b2eaf7ba AK |
382 | (native-inputs |
383 | `(("pkg-config" ,pkg-config))))) | |
384 | ||
5bbb04f9 | 385 | (define-public emacs-xwidgets |
36a09d18 | 386 | (package/inherit emacs |
5bbb04f9 AB |
387 | (name "emacs-xwidgets") |
388 | (synopsis "The extensible, customizable, self-documenting text | |
389 | editor (with xwidgets support)") | |
390 | (build-system gnu-build-system) | |
391 | (arguments | |
4e941436 LC |
392 | (substitute-keyword-arguments (package-arguments emacs) |
393 | ((#:configure-flags flags ''()) | |
36a09d18 MW |
394 | `(cons "--with-xwidgets" ,flags)) |
395 | ((#:phases phases) | |
396 | `(modify-phases ,phases | |
68be4da8 LP |
397 | (delete 'restore-emacs-pdmp) |
398 | (delete 'strip-double-wrap))))) | |
5bbb04f9 | 399 | (inputs |
85de88f1 | 400 | `(("webkitgtk" ,webkitgtk-with-libsoup2) |
5bbb04f9 AB |
401 | ("libxcomposite" ,libxcomposite) |
402 | ,@(package-inputs emacs))))) | |
403 | ||
b2eaf7ba | 404 | (define-public emacs-no-x |
36a09d18 | 405 | (package/inherit emacs |
4fd540b7 LC |
406 | (name "emacs-no-x") |
407 | (synopsis "The extensible, customizable, self-documenting text | |
408 | editor (console only)") | |
409 | (build-system gnu-build-system) | |
410 | (inputs (fold alist-delete | |
411 | (package-inputs emacs) | |
412 | '("libx11" "gtk+" "libxft" "libtiff" "giflib" "libjpeg" | |
4adde2a9 | 413 | "imagemagick" "libpng" "librsvg" "libxpm" "libice" |
36a09d18 | 414 | "libsm" "cairo" "pango" "harfbuzz" |
4fd540b7 | 415 | |
4adde2a9 | 416 | ;; These depend on libx11, so remove them as well. |
36a09d18 MW |
417 | "libotf" "m17n-lib" "dbus"))) |
418 | (arguments | |
419 | (substitute-keyword-arguments (package-arguments emacs) | |
420 | ((#:configure-flags flags ''()) | |
421 | `(delete "--with-cairo" ,flags)) | |
422 | ((#:phases phases) | |
423 | `(modify-phases ,phases | |
68be4da8 LP |
424 | (delete 'restore-emacs-pdmp) |
425 | (delete 'strip-double-wrap))))))) | |
4fd540b7 | 426 | |
4a3e602c | 427 | (define-public emacs-no-x-toolkit |
36a09d18 | 428 | (package/inherit emacs |
4a3e602c TUBK |
429 | (name "emacs-no-x-toolkit") |
430 | (synopsis "The extensible, customizable, self-documenting text | |
431 | editor (without an X toolkit)" ) | |
71f57158 | 432 | (build-system gnu-build-system) |
388fd01b MW |
433 | (inputs (append `(("inotify-tools" ,inotify-tools)) |
434 | (alist-delete "gtk+" (package-inputs emacs)))) | |
f862697b | 435 | (arguments |
36a09d18 MW |
436 | (substitute-keyword-arguments (package-arguments emacs) |
437 | ((#:configure-flags flags ''()) | |
438 | `(cons "--with-x-toolkit=no" ,flags)) | |
439 | ((#:phases phases) | |
440 | `(modify-phases ,phases | |
68be4da8 LP |
441 | (delete 'restore-emacs-pdmp) |
442 | (delete 'strip-double-wrap))))))) | |
4a3e602c | 443 | |
abbca232 | 444 | (define-public emacs-wide-int |
36a09d18 | 445 | (package/inherit emacs |
abbca232 DNB |
446 | (name "emacs-wide-int") |
447 | (synopsis "The extensible, customizable, self-documenting text | |
448 | editor (with wide ints)" ) | |
449 | (arguments | |
450 | (substitute-keyword-arguments (package-arguments emacs) | |
451 | ((#:configure-flags flags) | |
452 | `(cons "--with-wide-int" ,flags)))))) | |
453 | ||
f906d30c | 454 | (define-public guile-emacs |
ef5fa91c LF |
455 | (let ((commit "41120e0f595b16387eebfbf731fff70481de1b4b") |
456 | (revision "0")) | |
dbcf2b61 MB |
457 | (package |
458 | (inherit emacs) | |
ef5fa91c LF |
459 | (name "guile-emacs") |
460 | (version (git-version "0.0.0" revision commit)) | |
461 | (source (origin | |
462 | (method git-fetch) | |
463 | (uri (git-reference | |
464 | (url "https://git.hcoop.net/git/bpt/emacs.git") | |
465 | (commit commit))) | |
466 | (file-name (git-file-name name version)) | |
467 | (patches (search-patches "guile-emacs-fix-configure.patch")) | |
468 | (sha256 | |
469 | (base32 | |
470 | "0lvcvsz0f4mawj04db35p1dvkffdqkz8pkhc0jzh9j9x2i63kcz6")))) | |
471 | (native-inputs | |
472 | `(("autoconf" ,autoconf) | |
473 | ("automake" ,automake) | |
474 | ("guile" ,guile-for-guile-emacs) | |
475 | ,@(package-native-inputs emacs))) | |
476 | (arguments | |
477 | (substitute-keyword-arguments `(;; Build fails if we allow parallel build. | |
478 | #:parallel-build? #f | |
479 | ;; Tests aren't passing for now. | |
480 | #:tests? #f | |
481 | ,@(package-arguments emacs)) | |
36a09d18 MW |
482 | ((#:configure-flags flags ''()) |
483 | `(delete "--with-cairo" ,flags)) | |
ef5fa91c LF |
484 | ((#:phases phases) |
485 | `(modify-phases ,phases | |
486 | (add-after 'unpack 'autogen | |
487 | (lambda _ | |
488 | (invoke "sh" "autogen.sh"))) | |
489 | ;; Build sometimes fails: deps/dispnew.d: No such file or directory | |
490 | (add-before 'build 'make-deps-dir | |
491 | (lambda _ | |
36a09d18 | 492 | (invoke "mkdir" "-p" "src/deps"))) |
68be4da8 LP |
493 | (delete 'restore-emacs-pdmp) |
494 | (delete 'strip-double-wrap)))))))) | |
f906d30c | 495 | |
eeb883cb | 496 | (define-public m17n-db |
9a4c9715 | 497 | (package |
eeb883cb RW |
498 | (name "m17n-db") |
499 | (version "1.8.0") | |
500 | (source | |
501 | (origin | |
502 | (method url-fetch) | |
503 | (uri (string-append "mirror://savannah/m17n/m17n-db-" | |
504 | version ".tar.gz")) | |
505 | (sha256 | |
506 | (base32 | |
507 | "0vfw7z9i2s9np6nmx1d4dlsywm044rkaqarn7akffmb6bf1j6zv5")))) | |
9a4c9715 | 508 | (build-system gnu-build-system) |
08fc0d68 | 509 | (inputs |
eeb883cb | 510 | `(("gettext" ,gettext-minimal))) |
77c9286d | 511 | (arguments |
eeb883cb RW |
512 | `(#:configure-flags |
513 | (list (string-append "--with-charmaps=" | |
514 | (assoc-ref %build-inputs "libc") | |
515 | "/share/i18n/charmaps")))) | |
516 | ;; With `guix lint' the home-page URI returns a small page saying | |
517 | ;; that your browser does not handle frames. This triggers the "URI | |
518 | ;; returns suspiciously small file" warning. | |
519 | (home-page "https://www.nongnu.org/m17n/") | |
520 | (synopsis "Multilingual text processing library (database)") | |
521 | (description "The m17n library realizes multilingualization of | |
522 | many aspects of applications. The m17n library represents | |
523 | multilingual text as an object named M-text. M-text is a string with | |
524 | attributes called text properties, and designed to substitute for | |
525 | string in C. Text properties carry any information required to input, | |
526 | display and edit the text. | |
c7e553a3 | 527 | |
eeb883cb RW |
528 | This package contains the library database.") |
529 | (license license:lgpl2.1+))) | |
1095bd1d | 530 | |
eeb883cb | 531 | (define-public m17n-lib |
2316078a | 532 | (package |
eeb883cb RW |
533 | (name "m17n-lib") |
534 | (version "1.8.0") | |
2316078a RW |
535 | (source |
536 | (origin | |
537 | (method url-fetch) | |
eeb883cb RW |
538 | (uri (string-append "mirror://savannah/m17n/m17n-lib-" |
539 | version ".tar.gz")) | |
2316078a RW |
540 | (sha256 |
541 | (base32 | |
eeb883cb | 542 | "0jp61y09xqj10mclpip48qlfhniw8gwy8b28cbzxy8hq8pkwmfkq")))) |
64e43c67 | 543 | (build-system gnu-build-system) |
64e43c67 | 544 | (inputs |
8394619b LC |
545 | (list fribidi |
546 | gd | |
547 | libotf | |
548 | libxft | |
549 | libxml2 | |
550 | m17n-db)) | |
85777fe5 | 551 | (arguments |
eeb883cb RW |
552 | `(#:parallel-build? #f)) |
553 | ;; With `guix lint' the home-page URI returns a small page saying | |
554 | ;; that your browser does not handle frames. This triggers the "URI | |
555 | ;; returns suspiciously small file" warning. | |
556 | (home-page "https://www.nongnu.org/m17n/") | |
557 | (synopsis "Multilingual text processing library (runtime)") | |
558 | (description "The m17n library realizes multilingualization of | |
559 | many aspects of applications. The m17n library represents | |
560 | multilingual text as an object named M-text. M-text is a string with | |
561 | attributes called text properties, and designed to substitute for | |
562 | string in C. Text properties carry any information required to input, | |
563 | display and edit the text. | |
cf9ce01f | 564 | |
eeb883cb RW |
565 | This package contains the library runtime.") |
566 | (license license:lgpl2.1+))) |