emacs.scm 24 KB

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