gnu: Add qemacs.
[jackhill/guix/guix.git] / gnu / packages / text-editors.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2016 José Miguel Sánchez García <jmi2k@openmailbox.org>
3 ;;; Copyright © 2016 Carlo Zancanaro <carlo@zancanaro.id.au>
4 ;;; Copyright © 2017, 2018 Eric Bavier <bavier@member.fsf.org>
5 ;;; Copyright © 2017 Feng Shu <tumashu@163.com>
6 ;;; Copyright © 2017 ng0 <ng0@n0.is>
7 ;;; Copyright © 2014 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.org>
8 ;;; Copyright © 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
9 ;;; Copyright © 2019 Efraim Flashner <efraim@flashner.co.il>
10 ;;; Copyright © 2019 Andreas Enge <andreas@enge.fr>
11 ;;; Copyright © 2019, 2020 Nicolas Goaziou <mail@nicolasgoaziou.fr>
12 ;;;
13 ;;; This file is part of GNU Guix.
14 ;;;
15 ;;; GNU Guix is free software; you can redistribute it and/or modify it
16 ;;; under the terms of the GNU General Public License as published by
17 ;;; the Free Software Foundation; either version 3 of the License, or (at
18 ;;; your option) any later version.
19 ;;;
20 ;;; GNU Guix is distributed in the hope that it will be useful, but
21 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
22 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 ;;; GNU General Public License for more details.
24 ;;;
25 ;;; You should have received a copy of the GNU General Public License
26 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
27
28 (define-module (gnu packages text-editors)
29 #:use-module (guix packages)
30 #:use-module (guix download)
31 #:use-module (guix git-download)
32 #:use-module (guix utils)
33 #:use-module (guix build-system gnu)
34 #:use-module (guix build-system cmake)
35 #:use-module (guix build-system glib-or-gtk)
36 #:use-module (guix build-system python)
37 #:use-module ((guix licenses) #:prefix license:)
38 #:use-module (gnu packages)
39 #:use-module (gnu packages assembly)
40 #:use-module (gnu packages autotools)
41 #:use-module (gnu packages boost)
42 #:use-module (gnu packages documentation)
43 #:use-module (gnu packages fontutils)
44 #:use-module (gnu packages gcc)
45 #:use-module (gnu packages gettext)
46 #:use-module (gnu packages glib)
47 #:use-module (gnu packages gtk)
48 #:use-module (gnu packages guile)
49 #:use-module (gnu packages haskell-xyz)
50 #:use-module (gnu packages libbsd)
51 #:use-module (gnu packages libreoffice)
52 #:use-module (gnu packages lua)
53 #:use-module (gnu packages ncurses)
54 #:use-module (gnu packages pcre)
55 #:use-module (gnu packages perl)
56 #:use-module (gnu packages pkg-config)
57 #:use-module (gnu packages python)
58 #:use-module (gnu packages python-xyz)
59 #:use-module (gnu packages qt)
60 #:use-module (gnu packages regex)
61 #:use-module (gnu packages ruby)
62 #:use-module (gnu packages terminals)
63 #:use-module (gnu packages texinfo)
64 #:use-module (gnu packages xml))
65
66 (define-public vis
67 (package
68 (name "vis")
69 (version "0.5")
70 (source (origin
71 (method url-fetch)
72 (uri (string-append "https://github.com/martanne/vis/releases"
73 "/download/v" version
74 "/vis-v" version ".tar.gz"))
75 (sha256
76 (base32
77 "0aw35n8xk7ir84ckvczc6yshj9ynishrlz0qlv4yc1afbra1gxmn"))))
78 (build-system gnu-build-system)
79 (arguments
80 `(#:test-target "test"
81 #:tests? #f ; no releases; snapshots are missing tests
82 #:phases
83 (modify-phases %standard-phases
84 (add-after 'install 'wrap-binary
85 (lambda* (#:key inputs outputs #:allow-other-keys)
86 (let* ((out (assoc-ref outputs "out"))
87 (lpeg (assoc-ref inputs "lua-lpeg"))
88 (lua-version ,(version-major+minor (package-version lua)))
89 (LUA_PATH (string-append lpeg "/share/lua/"
90 lua-version "/?.lua"))
91 (LUA_CPATH (string-append lpeg "/lib/lua/"
92 lua-version "/?.so")))
93 (wrap-program (string-append out "/bin/vis")
94 `("LUA_PATH" ":" prefix (,LUA_PATH))
95 `("LUA_CPATH" ":" prefix (,LUA_CPATH)))
96 #t))))))
97 (native-search-paths
98 (list (search-path-specification
99 (variable "VIS_PATH")
100 (files '("share/vis")))))
101 (inputs `(("lua" ,lua)
102 ("ncurses" ,ncurses)
103 ("libtermkey" ,libtermkey)
104 ("lua-lpeg" ,lua-lpeg)
105 ("tre" ,tre)))
106 (synopsis "Vim-like text editor")
107 (description
108 "Vis aims to be a modern, legacy free, simple yet efficient vim-like text
109 editor. It extends vim's modal editing with built-in support for multiple
110 cursors/selections and combines it with sam's structural regular expression
111 based command language.")
112 (home-page "https://github.com/martanne/vis")
113 (license (list license:isc ; Main distribution.
114 license:public-domain ; map.[ch]
115 license:expat)))) ; lexers and libutf.[ch]
116
117 (define-public kakoune
118 (package
119 (name "kakoune")
120 (version "2019.12.10")
121 (source
122 (origin
123 (method url-fetch)
124 (uri (string-append "https://github.com/mawww/kakoune/"
125 "releases/download/v" version "/"
126 "kakoune-" version ".tar.bz2"))
127 (sha256
128 (base32 "1y1gzax2dl7flh676k0rl1vacv10j7p5krkmb67b0afbrql8vbb6"))))
129 (build-system gnu-build-system)
130 (arguments
131 `(#:make-flags
132 (list (string-append "PREFIX=" (assoc-ref %outputs "out")))
133 #:phases
134 (modify-phases %standard-phases
135 (add-after 'unpack 'patch-source
136 (lambda _
137 ;; kakoune uses confstr with _CS_PATH to find out where to find
138 ;; a posix shell, but this doesn't work in the build
139 ;; environment. This substitution just replaces that result
140 ;; with the "sh" path.
141 (substitute* "src/shell_manager.cc"
142 (("if \\(m_shell.empty\\(\\)\\)" line)
143 (string-append "m_shell = \"" (which "sh")
144 "\";\n " line)))
145 #t))
146 (delete 'configure) ; no configure script
147 ;; kakoune requires us to be in the src/ directory to build
148 (add-before 'build 'chdir
149 (lambda _ (chdir "src") #t)))))
150 (native-inputs
151 `(("asciidoc" ,asciidoc)
152 ("pkg-config" ,pkg-config)
153 ("ruby" ,ruby)))
154 (inputs
155 `(("ncurses" ,ncurses)))
156 (synopsis "Vim-inspired code editor")
157 (description
158 "Kakoune is a code editor heavily inspired by Vim, as such most of its
159 commands are similar to Vi's ones, and it shares Vi's \"keystrokes as a text
160 editing language\" model. Kakoune has a strong focus on interactivity, most
161 commands provide immediate and incremental results, while still being
162 competitive (as in keystroke count) with Vim.")
163 (home-page "https://kakoune.org/")
164 (license license:unlicense)))
165
166 (define-public joe
167 (package
168 (name "joe")
169 (version "4.6")
170 (source
171 (origin
172 (method url-fetch)
173 (uri (string-append "https://sourceforge.net/projects/joe-editor/"
174 "files/JOE sources/joe-" version "/"
175 "joe-" version ".tar.gz"))
176 (sha256
177 (base32
178 "1pmr598xxxm9j9dl93kq4dv36zyw0q2dh6d7x07hf134y9hhlnj9"))))
179 (build-system gnu-build-system)
180 (inputs `(("ncurses" ,ncurses)))
181 (home-page "http://joe-editor.sourceforge.net/")
182 (synopsis "Console screen editor")
183 (description
184 "JOE is a powerful console screen editor with a \"mode-less\" user
185 interface similar to many user-friendly editors. JOE has some of the key
186 bindings and many of the powerful features of GNU Emacs.")
187 (license license:gpl3+)))
188
189 (define-public leafpad
190 (package
191 (name "leafpad")
192 (version "0.8.18.1")
193 (source (origin
194 (method url-fetch)
195 (uri (string-append "mirror://savannah/"
196 "leafpad/leafpad-" version ".tar.gz"))
197 (sha256
198 (base32
199 "0b0az2wvqgvam7w0ns1j8xp2llslm1rx6h7zcsy06a7j0yp257cm"))))
200 (build-system glib-or-gtk-build-system)
201 (native-inputs
202 `(("intltool" ,intltool)
203 ("pkg-config" ,pkg-config)))
204 (inputs
205 `(("gtk+" ,gtk+-2)))
206 (home-page "http://tarot.freeshell.org/leafpad/")
207 (synopsis "GTK+ based text editor")
208 (description "Leafpad is a GTK+ text editor that emphasizes simplicity. As
209 development focuses on keeping weight down to a minimum, only the most essential
210 features are implemented in the editor. Leafpad is simple to use, is easily
211 compiled, requires few libraries, and starts up quickly. ")
212 (license license:gpl2+)))
213
214 (define-public e3
215 (package
216 (name "e3")
217 (version "2.82")
218 (source (origin
219 (method url-fetch)
220 (uri (string-append "https://sites.google.com/site/e3editor/Home/"
221 "e3-" version ".tgz"))
222 (sha256
223 (base32
224 "0919kadkas020maqq37852isnzp053q2fnws2zh3mz81d1jiviak"))
225 (modules '((guix build utils)))
226
227 ;; Remove pre-built binaries.
228 (snippet '(begin
229 (delete-file-recursively "bin")
230 #t))))
231 (build-system gnu-build-system)
232 (arguments
233 `(#:tests? #f
234 #:make-flags (list (string-append "PREFIX="
235 (assoc-ref %outputs "out")))
236 #:phases (modify-phases %standard-phases
237 (delete 'configure))))
238 (native-inputs
239 `(("nasm" ,nasm)))
240 (home-page "https://sites.google.com/site/e3editor/")
241 (synopsis "Tiny text editor written in assembly")
242 (description
243 "e3 is a micro text editor with an executable code size between 3800 and
244 35000 bytes. Except for ``syntax highlighting'', the e3 binary supports all
245 of the basic functions one expects plus built in arithmetic calculations.
246 UTF-8 coding of unicode characters is supported as well. e3 can use
247 Wordstar-, EMACS-, Pico, Nedit or vi-like key bindings. e3 can be used on
248 16, 32, and 64-bit CPUs.")
249 (supported-systems '("x86_64-linux" "i686-linux"))
250 (license license:gpl2+)))
251
252 (define-public mg
253 (package
254 (name "mg")
255 (version "20180927")
256 (source (origin
257 (method git-fetch)
258 (uri (git-reference
259 (url "https://github.com/hboetes/mg")
260 (commit version)))
261 (file-name (git-file-name name version))
262 (sha256
263 (base32
264 "14vrm8lvwksf697sqks7xfd1xaqjlqjc9afjk33sksq5p27wr203"))
265 (modules '((guix build utils)))
266 (snippet '(begin
267 (substitute* "GNUmakefile"
268 (("/usr/bin/") ""))
269 #t))))
270 (build-system gnu-build-system)
271 (native-inputs
272 `(("pkg-config" ,pkg-config)))
273 (inputs
274 `(("libbsd" ,libbsd)
275 ("ncurses" ,ncurses)))
276 (arguments
277 ;; No test suite available.
278 '(#:tests? #f
279 #:make-flags (list (string-append "prefix=" %output)
280 "CC=gcc")
281 #:phases (modify-phases %standard-phases
282 (delete 'configure) ; no configure script
283 (add-before 'build 'correct-location-of-difftool
284 (lambda _
285 (substitute* "buffer.c"
286 (("/usr/bin/diff")
287 (which "diff")))
288 #t))
289 (add-before 'install 'patch-tutorial-location
290 (lambda* (#:key outputs #:allow-other-keys)
291 (substitute* "mg.1"
292 (("/usr") (assoc-ref outputs "out")))
293 #t))
294 (add-after 'install 'install-tutorial
295 (lambda* (#:key outputs #:allow-other-keys)
296 (let* ((out (assoc-ref outputs "out"))
297 (doc (string-append out "/share/doc/mg")))
298 (install-file "tutorial" doc)
299 #t))))))
300 (home-page "https://homepage.boetes.org/software/mg/")
301 (synopsis "Microscopic GNU Emacs clone")
302 (description
303 "Mg (@command{mg}) is a GNU Emacs style editor, with which it is
304 \"broadly\" compatible. This is a portable version of the mg maintained by the
305 OpenBSD team.")
306 (license license:public-domain)))
307
308 (define-public qemacs
309 (package
310 (name "qemacs")
311 (version "0.3.3")
312 (source
313 (origin
314 (method url-fetch)
315 (uri (string-append "https://bellard.org/qemacs/"
316 "qemacs-" version ".tar.gz"))
317 (sha256
318 (base32 "156z4wpj49i6j388yjird5qvrph7hz0grb4r44l4jf3q8imadyrg"))))
319 (build-system gnu-build-system)
320 (arguments
321 `(#:tests? #f ;no test
322 #:phases
323 (modify-phases %standard-phases
324 (add-before 'build 'build-qhtml
325 ;; Build fails without first creating qHTML library.
326 (lambda _ (invoke "make" "-C" "libqhtml")))
327 (add-before 'install 'fix-man-pages-directory
328 ;; Install in $out/share/man instead of $out/man.
329 (lambda _
330 (substitute* "Makefile"
331 (("/man/man1" all) (string-append "/share" all)))
332 #t))
333 (add-before 'install 'create-directories
334 ;; Ensure directories exist before installing files.
335 (lambda* (#:key outputs #:allow-other-keys)
336 (let ((out (assoc-ref outputs "out")))
337 (for-each (lambda (d) (mkdir-p (string-append out d)))
338 '("/bin" "/share/man/man1" "/share/qe"))
339 #t)))
340 (add-after 'install 'install-extra-documentation
341 ;; Install sample configuration file, Info, and HTML manual.
342 (lambda* (#:key outputs #:allow-other-keys)
343 (let* ((share (string-append (assoc-ref outputs "out") "/share"))
344 (doc (string-append share "/doc/" ,name "-" ,version))
345 (html (string-append share "/html"))
346 (info (string-append share "/info"))
347 (makeinfo (string-append (assoc-ref %build-inputs "texinfo")
348 "/bin/makeinfo")))
349 ;; First fix Texinfo documentation, create appropriate
350 ;; directories, then generate Info and HTML files there.
351 (substitute* "qe-doc.texi"
352 (("^M-([{}])" _ bracket) (string-append "M-@" bracket)))
353 (for-each (lambda (d) (mkdir-p d)) (list html info))
354 (invoke makeinfo "qe-doc.texi" "-o" info)
355 (invoke makeinfo "qe-doc.texi" "--html" "--no-split" "-o" html)
356 ;; Install sample configuration file.
357 (install-file "config.eg" doc)
358 #t))))))
359 (native-inputs
360 `(("texinfo" ,texinfo)))
361 (inputs
362 `(("libx11" ,libx11)
363 ("libxext" ,libxext)
364 ("libxv" ,libxv)))
365 (home-page "https://bellard.org/qemacs/")
366 (synopsis "Small but powerful text editor")
367 (description "QEmacs (for Quick Emacs) is a very small but
368 powerful editor. It has features that even big editors lack:
369
370 @itemize
371
372 @item Full screen editor with an Emacs look and feel with all Emacs
373 common features: multi-buffer, multi-window, command mode, universal
374 argument, keyboard macros, config file with C-like syntax, minibuffer
375 with completion and history.
376
377 @item Can edit files of hundreds of Megabytes without being slow by
378 using a highly optimized internal representation and by mmaping the
379 file.
380
381 @item Full Unicode support, including multi charset handling (8859-x,
382 UTF8, SJIS, EUC-JP, ...) and bidirectional editing respecting the
383 Unicode bidi algorithm. Arabic and Indic scripts handling (in
384 progress).
385
386 @item WYSIWYG HTML/XML/CSS2 mode graphical editing. Also supports
387 Lynx like rendering on VT100 terminals.
388
389 @item WYSIWYG DocBook mode based on XML/CSS2 renderer.
390
391 @item C mode: coloring with immediate update. Emacs like auto-indent.
392
393 @item Shell mode: colorized VT100 emulation so that your shell work
394 exactly as you expect. Compile mode with next/prev error.
395
396 @item Input methods for most languages, including Chinese (input
397 methods come from the Yudit editor).
398
399 @item Hexadecimal editing mode with insertion and block commands.
400 Unicode hexa editing is also supported.
401
402 @item Works on any VT100 terminals without termcap. UTF8 VT100
403 support included with double width glyphs.
404
405 @item X11 support. Support multiple proportional fonts at the same
406 time (as XEmacs). X Input methods supported. Xft extension supported
407 for anti aliased font display.
408
409 @item Small! Full version (including HTML/XML/CSS2/DocBook rendering
410 and all charsets): 200KB big. Basic version (without bidir/unicode
411 scripts/input/X11/C/Shell/HTML/Dired): 49KB.
412 @end itemize")
413 (license license:lgpl2.1+)))
414
415 (define-public ghostwriter
416 (package
417 (name "ghostwriter")
418 (version "1.7.4")
419 (source (origin
420 (method git-fetch)
421 (uri (git-reference
422 (url "https://github.com/wereturtle/ghostwriter.git")
423 (commit (string-append "v" version))))
424 (file-name (git-file-name name version))
425 (sha256
426 (base32
427 "1pqlr08z5syqcq5p282asxwzrrm7c1w94baxyb467swh8yp3fj5m"))))
428 (build-system gnu-build-system)
429 (native-inputs
430 `(("pkg-config" ,pkg-config)
431 ("qttools" ,qttools))) ; for lrelease
432 (inputs
433 `(("hunspell" ,hunspell)
434 ("qtbase" ,qtbase)
435 ("qtmultimedia" ,qtmultimedia)
436 ("qtsvg" ,qtsvg)
437 ("qtwebkit" ,qtwebkit)))
438 (arguments
439 `(#:phases
440 (modify-phases %standard-phases
441 (replace 'configure
442 (lambda* (#:key outputs #:allow-other-keys)
443 (let ((out (assoc-ref outputs "out")))
444 (invoke "qmake" (string-append "PREFIX=" out)))))
445 (add-after 'configure 'create-translations
446 (lambda _
447 ;; `lrelease` will not overwrite, so delete existing .qm files
448 (for-each delete-file (find-files "translations" ".*\\.qm"))
449 (apply invoke "lrelease" (find-files "translations" ".*\\.ts"))))
450 ;; Ensure that icons are found at runtime.
451 (add-after 'install 'wrap-executable
452 (lambda* (#:key inputs outputs #:allow-other-keys)
453 (let ((out (assoc-ref outputs "out")))
454 (wrap-program (string-append out "/bin/ghostwriter")
455 `("QT_PLUGIN_PATH" ":" prefix
456 ,(map (lambda (label)
457 (string-append (assoc-ref inputs label)
458 "/lib/qt5/plugins/"))
459 '("qtsvg" "qtmultimedia"))))))))))
460 (home-page "https://wereturtle.github.io/ghostwriter/")
461 (synopsis "Write without distractions")
462 (description
463 "@code{ghostwriter} provides a relaxing, distraction-free writing
464 environment with Markdown markup.")
465 (license license:gpl3+))) ; icons/* under CC-BY-SA3
466
467 (define-public manuskript
468 (package
469 (name "manuskript")
470 (version "0.10.0")
471 (source
472 (origin
473 (method git-fetch)
474 (uri (git-reference
475 (url "https://github.com/olivierkes/manuskript.git")
476 (commit version)))
477 (file-name (git-file-name name version))
478 (sha256
479 (base32 "0q413vym7hzjpyg3krj5y63hwpncdifjkyswqmr76zg5yqnklnh3"))))
480 (build-system python-build-system)
481 (arguments
482 `(#:tests? #f ;no test
483 #:phases
484 (modify-phases %standard-phases
485 (delete 'configure)
486 (delete 'build)
487 (replace 'install
488 (lambda* (#:key outputs #:allow-other-keys)
489 (let* ((out (assoc-ref outputs "out"))
490 (share (string-append out "/share/manuskript")))
491 ;; Install data.
492 (mkdir-p share)
493 (for-each
494 (lambda (d)
495 (let ((destination (string-append share "/" d)))
496 (mkdir-p destination)
497 (copy-recursively d destination)))
498 '("bin" "i18n" "icons" "libs" "manuskript" "resources"))
499 ;; Install documentation.
500 (let ((doc (string-append out
501 "/doc/manuskript-" ,version
502 "/sample-projects")))
503 (mkdir-p doc)
504 (copy-recursively "sample-projects" doc))
505 ;; Wrap executable in "$out/share/manuskript/bin" and
506 ;; link to it from "$out/bin".
507 (let ((bin (string-append out "/bin"))
508 (executable (string-append share "/bin/manuskript")))
509 (wrap-program executable
510 (list "PYTHONPATH" 'prefix (list (getenv "PYTHONPATH"))))
511 (mkdir-p bin)
512 (with-directory-excursion bin
513 (symlink (string-append share "/bin/manuskript")
514 "manuskript")))
515 ;; Install icons and create .desktop file.
516 (let ((apps (string-append out "/share/applications"))
517 (icons-dir (string-append out "/share/pixmaps")))
518 (install-file "icons/Manuskript/manuskript.svg" icons-dir)
519 (mkdir-p apps)
520 (with-output-to-file (string-append apps "/manuskript.desktop")
521 (lambda _
522 (format #t
523 "[Desktop Entry]~@
524 Name=Manuskript~@
525 MimeType=application/x-manuskript-book;~@
526 Exec=~a/bin/manuskript %f~@
527 Comment=Tool for writers~@
528 Comment[es]=Herramienta para escritores/as~@
529 Keywords=manuskript;office;write;edit;novel;text;msk~@
530 Terminal=false~@
531 Type=Application~@
532 Icon=manuskript~@
533 Categories=Office;WordProcessor;~%"
534 out))))
535 #t))))))
536 (inputs
537 `(("ghc-pandoc" ,ghc-pandoc)
538 ("python-lxml" ,python-lxml)
539 ("python-markdown" ,python-markdown)
540 ("python-pyqt" ,python-pyqt)
541 ("qtsvg" ,qtsvg)))
542 (home-page "http://www.theologeek.ch/manuskript/")
543 (synopsis "Tool for writers")
544 (description "Manuskript provides a rich environment to help
545 writers create their first draft and then further refine and edit
546 their masterpiece. With Manuskript you can:
547
548 @itemize
549 @item Grow your premise from one sentence, to a paragraph, to a full
550 summary,
551 @item Create characters,
552 @item Conceive plots,
553 @item Construct outlines (Outline mode and/or Index cards),
554 @item Write with focus (Distraction free mode),
555 @item Build worlds,
556 @item Track items,
557 @item Edit and re-organize chapters and scenes,
558 @item View Story line,
559 @item Compose with fiction or non-fiction templates and writing modes,
560 @item Import and export document formats such as HTML, ePub,
561 OpenDocument, DocX, and more.
562 @end itemize
563
564 Additionally Manuskript can help in many more ways with a spell
565 checker, markdown highlighter, frequency analyzer, and automatic save
566 in plain text file format.")
567 (license license:gpl3+)))
568
569 (define-public editorconfig-core-c
570 (package
571 (name "editorconfig-core-c")
572 (version "0.12.3")
573 (source
574 (origin
575 (method git-fetch)
576 (uri (git-reference
577 (url "https://github.com/editorconfig/editorconfig-core-c.git")
578 (commit (string-append "v" version))))
579 (file-name (git-file-name name version))
580 (sha256
581 (base32
582 "0jkc69r4jwn4rih6h6cqvgljjc3ff49cxj8286mi515aczr48cm1"))))
583 (build-system cmake-build-system)
584 (arguments
585 '(#:phases
586 (modify-phases %standard-phases
587 (add-after 'unpack 'insert-tests
588 (lambda* (#:key inputs #:allow-other-keys)
589 (let ((tests (assoc-ref inputs "tests")))
590 (copy-recursively tests "tests"))
591 #t)))))
592 (native-inputs
593 `(("tests" ,(origin
594 (method git-fetch)
595 (uri (git-reference
596 (url "https://github.com/editorconfig/editorconfig-core-test")
597 (commit "6ea1d8ece62cac9cf72c79dce4879b046abe1fe7"))) ; matches version
598 (file-name (git-file-name "editorconfig-core-test" version))
599 (sha256
600 (base32
601 "1sf6910idnd4bgzbj8w8f9ldsbkaqa0lh6syymwy3hfqda63acj7"))))))
602 (inputs
603 `(("pcre2" ,pcre2)))
604 (home-page "https://editorconfig.org/")
605 (synopsis "EditorConfig core library written in C")
606 (description "EditorConfig makes it easy to maintain the correct coding
607 style when switching between different text editors and between different
608 projects. The EditorConfig project maintains a file format and plugins for
609 various text editors which allow this file format to be read and used by those
610 editors.")
611 (license license:bsd-2)))
612
613 (define-public texmacs
614 (package
615 (name "texmacs")
616 (version "1.99.11")
617 (source
618 (origin
619 (method url-fetch)
620 (uri (string-append "https://www.texmacs.org/Download/ftp/tmftp/"
621 "source/TeXmacs-" version "-src.tar.gz"))
622 (sha256
623 (base32 "12bp0f34izzqimz49lfpgf4lyz3h45s9xbmk8v6zsawdjki76alg"))
624 (modules '((guix build utils)))
625 (snippet
626 '(begin
627 (delete-file-recursively "3rdparty")
628 #t))))
629 (build-system gnu-build-system)
630 (native-inputs
631 `(("pkg-config" ,pkg-config)))
632 (inputs
633 `(("freetype" ,freetype)
634 ("guile" ,guile-1.8)
635 ("perl" ,perl)
636 ("python" ,python-wrapper)
637 ("qt" ,qt-4)))
638 (arguments
639 `(#:tests? #f ; no check target
640 #:phases
641 (modify-phases %standard-phases
642 (add-before 'configure 'gzip-flags
643 (lambda _
644 (substitute* "Makefile.in"
645 (("^GZIP = gzip -f") "GZIP = gzip -f -n")))))))
646 (synopsis "Editing platform with special features for scientists")
647 (description
648 "GNU TeXmacs is a text editing platform which is specialized for
649 scientists. It is ideal for editing structured documents with different
650 types of content. It has robust support for mathematical formulas and plots.
651 It can also act as an interface to external mathematical programs such as R
652 and Octave. TeXmacs is completely extensible via Guile.")
653 (license license:gpl3+)
654 (home-page "https://www.texmacs.org/tmweb/home/welcome.en.html")))
655
656 (define-public scintilla
657 (package
658 (name "scintilla")
659 (version "4.2.2")
660 (source (origin
661 (method url-fetch)
662 (uri (let ((v (apply string-append (string-split version #\.))))
663 (string-append
664 "https://www.scintilla.org/scintilla" v ".tgz")))
665 (sha256
666 (base32
667 "01gq31ggvasw4sy9xs544h7v1dmxrlxs5bzxpasqb9yi3ps3nl0f"))))
668 (build-system gnu-build-system)
669 (arguments
670 `(#:make-flags (list "GTK3=1" "CC=gcc" "-Cgtk")
671 #:tests? #f ;require un-packaged Pyside
672 #:phases
673 (modify-phases %standard-phases
674 (delete 'configure) ;no configure script
675 (add-after 'unpack 'build-shared-library
676 (lambda _
677 (substitute* "gtk/makefile"
678 (("scintilla\\.a") "libscintilla.so")
679 (("\\$\\(AR\\) \\$\\(ARFLAGS\\) \\$@ \\$\\^")
680 "$(CC) -shared $^ -o $@")
681 (("\\$\\(RANLIB\\) \\$@") ""))
682 #t))
683 (replace 'install
684 (lambda* (#:key outputs #:allow-other-keys)
685 (let* ((out (assoc-ref outputs "out"))
686 (lib (string-append out "/lib"))
687 (include (string-append out "/include")))
688 (install-file "bin/libscintilla.so" lib)
689 (for-each (lambda (f) (install-file f include))
690 (find-files "include/" "."))
691 #t))))))
692 (native-inputs
693 `(("pkg-config" ,pkg-config)
694 ("python" ,python-wrapper)))
695 (inputs
696 `(("gtk+" ,gtk+)))
697 (home-page "https://www.scintilla.org/")
698 (synopsis "Code editor for GTK+")
699 (description "Scintilla is a source code editing component for
700 GTK+. It has the usual features found in text editing components, as
701 well as some that are especially useful for editing and debugging
702 source code; these include support for syntax styling, error
703 indicators, code completion and call tips. Styling choices are more
704 open than with many editors: Scintilla lets you use proportional
705 fonts, bold and italics, multiple foreground and background colours,
706 and multiple fonts.")
707 (license license:hpnd)))
708
709 (define-public geany
710 (package
711 (name "geany")
712 (version "1.36")
713 (source (origin
714 (method url-fetch)
715 (uri (string-append "https://download.geany.org/"
716 "geany-" version ".tar.bz2"))
717 (sha256
718 (base32
719 "0gnm17cr4rf3pmkf0axz4a0fxwnvp55ji0q0lzy88yqbshyxv14i"))
720 (modules '((guix build utils)))
721 (snippet '(begin
722 (delete-file-recursively "scintilla")
723 #t))))
724 (build-system gnu-build-system)
725 (native-inputs
726 `(("autoconf" ,autoconf)
727 ("automake" ,automake)
728 ("doxygen" ,doxygen)
729 ("glib" ,glib "bin")
730 ("intltool" ,intltool)
731 ("libtool" ,libtool)
732 ("pkg-config" ,pkg-config)
733 ("python-docutils" ,python-docutils))) ;for rst2html
734 (inputs
735 `(("gtk+" ,gtk+)
736 ("scintilla" ,scintilla)))
737 (arguments
738 `(#:phases
739 (modify-phases %standard-phases
740 (add-after 'unpack 'use-scintilla-shared-library
741 (lambda* (#:key inputs #:allow-other-keys)
742 (substitute* "configure.ac"
743 (("scintilla/Makefile") "")
744 (("scintilla/include/Makefile") ""))
745 (substitute* "Makefile.am"
746 (("scintilla ") ""))
747 (substitute* "src/Makefile.am"
748 (("\\$\\(top_builddir\\)/scintilla/libscintilla.la") "")
749 (("geany_LDFLAGS =" all) (string-append all " -lscintilla")))
750 (substitute* "doc/Makefile.am"
751 (("\\$\\(INSTALL_DATA\\) \\$\\(top_srcdir\\)/scintilla/License.txt \\$\\(DOCDIR\\)/ScintillaLicense.txt") ""))
752 (substitute* "tests/Makefile.am"
753 (("AM_LDFLAGS =" all) (string-append all " -lscintilla")))
754 (for-each delete-file (list "autogen.sh" "configure" "Makefile.in"))
755 #t)))))
756 (home-page "https://www.geany.org")
757 (synopsis "Fast and lightweight IDE")
758 (description "Geany is a small and fast Integrated Development
759 Environment (IDE) that only has a few dependencies on other packages and is as
760 independent as possible from special desktop environments like KDE or GNOME.
761
762 The basic features of Geany are:
763 @itemize
764 @item syntax highlighting
765 @item code completion
766 @item auto completion of often constructed constructs like if, for and while
767 @item auto completion of XML and HTML tags
768 @item call tips
769 @item folding
770 @item many supported filetypes like C, Java, PHP, HTML, Python, Perl, Pascal
771 @item symbol lists
772 @item embedded terminal emulation
773 @item extensibility through plugins
774 @end itemize")
775 (license license:gpl2+)))
776
777 (define-public fe
778 (package
779 (name "fe")
780 ;; Stable release is 1.8. However, this development version
781 ;; introduces support for UTF-8.
782 (version "2.0")
783 (source (origin
784 (method url-fetch)
785 (uri (string-append "http://www.moria.de/~michael/fe/"
786 "fe-" version ".tar.gz"))
787 (sha256
788 (base32
789 "1hwws7si1752z6hp61zxznvgsb6846lp8zl1hn5ddhsbafwalwb9"))))
790 (build-system gnu-build-system)
791 (arguments
792 `(#:tests? #f ;no test
793 ;; Sendmail is only used to send a crash log. Disable the
794 ;; feature since it is (1) undocumented (2) not very useful.
795 #:configure-flags (list "--disable-sendmail")
796 #:phases
797 (modify-phases %standard-phases
798 (add-after 'install 'install-doc
799 (lambda* (#:key outputs #:allow-other-keys)
800 (let* ((out (assoc-ref outputs "out"))
801 (doc (string-append out "/share/doc/" ,name "-" ,version)))
802 (for-each (lambda (f) (install-file f doc))
803 '("fe.doc" "fe.html" "fe.ps" "feref.ps" "README"))
804 #t))))))
805 (native-inputs
806 `(("gettext" ,gettext-minimal)))
807 (inputs
808 `(("ncurses" ,ncurses)))
809 (home-page "http://www.moria.de/~michael/fe/")
810 (synopsis "Small folding editor")
811 (description "Fe is a small folding editor. It allows to fold
812 arbitrary text regions; it is not bound to syntactic units.
813
814 Fe has no configuration or extension language and requires no setup.
815 Its user interface is emacs-like and it has menus for the very most
816 important functions to help beginners. Further there is a reference
817 card. It offers:
818
819 @itemize
820 @item Regions and Emacs-like kill ring
821 @item Incremental search
822 @item Keyboard macros
823 @item Editing binary files
824 @item Multiple windows and views
825 @item Compose function for Latin 1 characters
826 @end itemize")
827 (license license:gpl2+)))
828
829 (define-public ne
830 (package
831 (name "ne")
832 (version "3.2.1")
833 (source (origin
834 (method git-fetch)
835 (uri (git-reference
836 (url "https://github.com/vigna/ne.git")
837 (commit version)))
838 (file-name (git-file-name name version))
839 (sha256
840 (base32
841 "0h6d08cnwrk96ss83i9bragwwanph6x54sm3ak1z81146dsqsiif"))))
842 (build-system gnu-build-system)
843 (native-inputs
844 `(("perl" ,perl)
845 ("texinfo" ,texinfo)))
846 (inputs
847 `(("ncurses" ,ncurses)))
848 (arguments
849 `(#:tests? #f
850 #:make-flags
851 (list "CC=gcc"
852 (string-append "PREFIX=" (assoc-ref %outputs "out"))
853 (string-append "LDFLAGS=-L" (assoc-ref %build-inputs "ncurses")
854 "/lib"))
855 #:phases
856 (modify-phases %standard-phases
857 (replace 'configure
858 (lambda _
859 (substitute* "src/makefile"
860 (("-lcurses") "-lncurses"))
861 #t)))))
862 (home-page "http://ne.di.unimi.it/")
863 (synopsis "Text editor with menu bar")
864 (description "This package provides a modeless text editor with menu bar.
865 It supports syntax highlighting, regular expressions, configurable menus,
866 keybindings, autocomplete and unlimited undo. It can pipe a marked block
867 of text through any command line filter. It can also open very large binary
868 files. It was originally developed on the Amiga 3000T.")
869 (license license:gpl3+)))