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