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