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, 2020 Eric Bavier <bavier@posteo.net>
5 ;;; Copyright © 2017 Feng Shu <tumashu@163.com>
6 ;;; Copyright © 2017 Nikita <nikita@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 ;;; Copyright © 2020 Marius Bakke <mbakke@fastmail.com>
13 ;;; Copyright © 2020 Tom Zander <tomz@freedommail.ch>
15 ;;; This file is part of GNU Guix.
17 ;;; GNU Guix is free software; you can redistribute it and/or modify it
18 ;;; under the terms of the GNU General Public License as published by
19 ;;; the Free Software Foundation; either version 3 of the License, or (at
20 ;;; your option) any later version.
22 ;;; GNU Guix is distributed in the hope that it will be useful, but
23 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
24 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25 ;;; GNU General Public License for more details.
27 ;;; You should have received a copy of the GNU General Public License
28 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
30 (define-module (gnu packages text-editors)
31 #:use-module (guix packages)
32 #:use-module (guix download)
33 #:use-module (guix git-download)
34 #:use-module (guix utils)
35 #:use-module (guix build-system cmake)
36 #:use-module (guix build-system gnu)
37 #:use-module (guix build-system cmake)
38 #:use-module (guix build-system glib-or-gtk)
39 #:use-module (guix build-system python)
40 #:use-module ((guix licenses) #:prefix license:)
41 #:use-module (gnu packages)
42 #:use-module (gnu packages aspell)
43 #:use-module (gnu packages assembly)
44 #:use-module (gnu packages autotools)
45 #:use-module (gnu packages boost)
46 #:use-module (gnu packages code)
47 #:use-module (gnu packages documentation)
48 #:use-module (gnu packages fontutils)
49 #:use-module (gnu packages freedesktop)
50 #:use-module (gnu packages gcc)
51 #:use-module (gnu packages gettext)
52 #:use-module (gnu packages glib)
53 #:use-module (gnu packages gtk)
54 #:use-module (gnu packages guile)
55 #:use-module (gnu packages haskell-xyz)
56 #:use-module (gnu packages libbsd)
57 #:use-module (gnu packages libreoffice)
58 #:use-module (gnu packages llvm)
59 #:use-module (gnu packages lua)
60 #:use-module (gnu packages ncurses)
61 #:use-module (gnu packages pcre)
62 #:use-module (gnu packages perl)
63 #:use-module (gnu packages pkg-config)
64 #:use-module (gnu packages python)
65 #:use-module (gnu packages python-xyz)
66 #:use-module (gnu packages qt)
67 #:use-module (gnu packages regex)
68 #:use-module (gnu packages ruby)
69 #:use-module (gnu packages terminals)
70 #:use-module (gnu packages texinfo)
71 #:use-module (gnu packages version-control)
72 #:use-module (gnu packages xml)
73 #:use-module (gnu packages xorg))
83 (url "https://github.com/martanne/vis")
84 (commit (string-append "v" version))))
86 (base32 "1zjm89cn3rfq8fxpwp66khy53s6vqlmw6q103qyyvix8ydzxdmsh"))
87 (file-name (git-file-name name version))))
88 (build-system gnu-build-system)
90 `(#:test-target "test"
91 #:tests? #f ; no releases; snapshots are missing tests
93 (modify-phases %standard-phases
94 (add-after 'install 'wrap-binary
95 (lambda* (#:key inputs outputs #:allow-other-keys)
96 (let* ((out (assoc-ref outputs "out"))
97 (lpeg (assoc-ref inputs "lua-lpeg"))
98 (lua-version ,(version-major+minor (package-version lua)))
99 (LUA_PATH (string-append lpeg "/share/lua/"
100 lua-version "/?.lua"))
101 (LUA_CPATH (string-append lpeg "/lib/lua/"
102 lua-version "/?.so")))
103 (wrap-program (string-append out "/bin/vis")
104 `("LUA_PATH" ":" prefix (,LUA_PATH))
105 `("LUA_CPATH" ":" prefix (,LUA_CPATH)))
107 (inputs `(("lua" ,lua)
109 ("libtermkey" ,libtermkey)
110 ("lua-lpeg" ,lua-lpeg)
112 (synopsis "Vim-like text editor")
114 "Vis aims to be a modern, legacy free, simple yet efficient vim-like text
115 editor. It extends vim's modal editing with built-in support for multiple
116 cursors/selections and combines it with sam's structural regular expression
117 based command language.")
118 (home-page "https://github.com/martanne/vis")
119 (license (list license:isc ; Main distribution.
120 license:public-domain ; map.[ch]
121 license:expat)))) ; lexers and libutf.[ch]
123 (define-public kakoune
126 (version "2020.08.04")
130 (uri (string-append "https://github.com/mawww/kakoune/"
131 "releases/download/v" version "/"
132 "kakoune-" version ".tar.bz2"))
134 (base32 "08gikjxyvcr415br1g1llzh5pnq737q55yinalb92cgq3yn9yih2"))))
135 (build-system gnu-build-system)
138 (list (string-append "PREFIX=" (assoc-ref %outputs "out")))
140 (modify-phases %standard-phases
141 (add-after 'unpack 'patch-source
143 ;; kakoune uses confstr with _CS_PATH to find out where to find
144 ;; a posix shell, but this doesn't work in the build
145 ;; environment. This substitution just replaces that result
146 ;; with the "sh" path.
147 (substitute* "src/shell_manager.cc"
148 (("if \\(m_shell.empty\\(\\)\\)" line)
149 (string-append "m_shell = \"" (which "sh")
152 (delete 'configure) ; no configure script
153 ;; kakoune requires us to be in the src/ directory to build.
154 (add-before 'build 'chdir
155 (lambda _ (chdir "src") #t)))))
157 `(("asciidoc" ,asciidoc)
158 ("pkg-config" ,pkg-config)
161 `(("ncurses" ,ncurses)))
162 (synopsis "Vim-inspired code editor")
164 "Kakoune is a code editor heavily inspired by Vim, as such most of its
165 commands are similar to Vi's ones, and it shares Vi's \"keystrokes as a text
166 editing language\" model. Kakoune has a strong focus on interactivity, most
167 commands provide immediate and incremental results, while still being
168 competitive (as in keystroke count) with Vim.")
169 (home-page "https://kakoune.org/")
170 (license license:unlicense)))
179 (uri (string-append "https://sourceforge.net/projects/joe-editor/"
180 "files/JOE sources/joe-" version "/"
181 "joe-" version ".tar.gz"))
184 "1pmr598xxxm9j9dl93kq4dv36zyw0q2dh6d7x07hf134y9hhlnj9"))))
185 (build-system gnu-build-system)
186 (inputs `(("ncurses" ,ncurses)))
187 (home-page "http://joe-editor.sourceforge.net/")
188 (synopsis "Console screen editor")
190 "JOE is a powerful console screen editor with a \"mode-less\" user
191 interface similar to many user-friendly editors. JOE has some of the key
192 bindings and many of the powerful features of GNU Emacs.")
193 (license license:gpl3+)))
195 (define-public jucipp
199 (home-page "https://gitlab.com/cppit/jucipp")
202 (uri (git-reference (url home-page)
203 (commit (string-append "v" version))
204 ;; Two submodules are required which are
205 ;; developed alongside JuCi++ and difficult
206 ;; to package separately.
208 (file-name (git-file-name name version))
210 (base32 "177myy6qvjlb6j3f3i3xmfml5r3p9in8xzpvm0n59dn56s81gpnr"))))
211 (build-system cmake-build-system)
213 `(#:configure-flags '("-DBUILD_TESTING=ON"
215 ;; These arguments are here to facilitate an "in-source"
216 ;; build using "./build" instead of the default "../build".
217 ;; The test suite expects that to be the case.
220 #:phases (modify-phases %standard-phases
221 (add-before 'configure 'enter-build-directory
227 (add-after 'unpack 'patch-tiny-process-library
229 (with-directory-excursion "lib/tiny-process-library"
230 (substitute* '("process_unix.cpp"
232 (("/bin/sh") (which "sh"))))
234 (add-after 'unpack 'disable-git-test
236 (substitute* "tests/CMakeLists.txt"
237 ;; Disable the git test, as it requires the full checkout.
238 (("add_test\\(git_test.*\\)") ""))
240 (add-before 'check 'pre-check
241 (lambda* (#:key inputs #:allow-other-keys)
242 ;; Tests do not expect HOME to be empty.
243 (setenv "HOME" "/etc")
245 ;; Most tests require an X server.
246 (let ((xorg-server (assoc-ref inputs "xorg-server"))
248 (setenv "DISPLAY" display)
249 (system (string-append xorg-server "/bin/Xvfb "
252 (add-after 'install 'wrap
253 (lambda* (#:key inputs outputs #:allow-other-keys)
254 ;; The package needs GTK+ and GtkSourceView on XDG_DATA_DIRS
255 ;; for syntax highlighting to work. shared-mime-info is
256 ;; necessary for MIME handling.
257 ;; XXX: Ideally we'd reuse glib-or-gtk-wrap here, but it
258 ;; does not pick up $gtksourceview/share/gtksourceview-3.0.
259 (let ((out (assoc-ref outputs "out"))
260 (gtk+ (assoc-ref inputs "gtk+"))
261 (gtksourceview (assoc-ref inputs "gtksourceview"))
262 (shared-mime-info (assoc-ref inputs "shared-mime-info")))
263 (wrap-program (string-append out "/bin/juci")
264 `("XDG_DATA_DIRS" ":" prefix
267 (string-append pkg "/share"))
268 (list out gtk+ gtksourceview shared-mime-info))
272 `(("pkg-config" ,pkg-config)
273 ("xorg-server" ,xorg-server-for-tests)))
277 ("ctags" ,universal-ctags)
279 ("gtksourceviewmm" ,gtksourceviewmm)
280 ("libclang" ,clang-10) ;XXX: must be the same version as Mesas LLVM
281 ("libgit2" ,libgit2)))
282 (synopsis "Lightweight C++ IDE")
284 "juCi++ is a small @dfn{IDE} (Integrated Development Environment)
285 designed especially towards libclang with speed, stability, and ease of use
288 It supports autocompletion, on-the-fly warnings and errors, syntax
289 highlighting, and integrates with Git as well as the CMake and Meson build
291 (license license:expat)))
293 (define-public leafpad
299 (uri (string-append "mirror://savannah/"
300 "leafpad/leafpad-" version ".tar.gz"))
303 "0b0az2wvqgvam7w0ns1j8xp2llslm1rx6h7zcsy06a7j0yp257cm"))))
304 (build-system glib-or-gtk-build-system)
306 `(("intltool" ,intltool)
307 ("pkg-config" ,pkg-config)))
310 (home-page "http://tarot.freeshell.org/leafpad/")
311 (synopsis "GTK+ based text editor")
312 (description "Leafpad is a GTK+ text editor that emphasizes simplicity. As
313 development focuses on keeping weight down to a minimum, only the most essential
314 features are implemented in the editor. Leafpad is simple to use, is easily
315 compiled, requires few libraries, and starts up quickly. ")
316 (license license:gpl2+)))
324 (uri (string-append "https://sites.google.com/site/e3editor/Home/"
325 "e3-" version ".tgz"))
328 "0919kadkas020maqq37852isnzp053q2fnws2zh3mz81d1jiviak"))
329 (modules '((guix build utils)))
331 ;; Remove pre-built binaries.
333 (delete-file-recursively "bin")
335 (build-system gnu-build-system)
338 #:make-flags (list (string-append "PREFIX="
339 (assoc-ref %outputs "out")))
340 #:phases (modify-phases %standard-phases
341 (delete 'configure))))
344 (home-page "https://sites.google.com/site/e3editor/")
345 (synopsis "Tiny text editor written in assembly")
347 "e3 is a micro text editor with an executable code size between 3800 and
348 35000 bytes. Except for ``syntax highlighting'', the e3 binary supports all
349 of the basic functions one expects plus built in arithmetic calculations.
350 UTF-8 coding of unicode characters is supported as well. e3 can use
351 Wordstar-, EMACS-, Pico, Nedit or vi-like key bindings. e3 can be used on
352 16, 32, and 64-bit CPUs.")
353 (supported-systems '("x86_64-linux" "i686-linux"))
354 (license license:gpl2+)))
363 (url "https://github.com/hboetes/mg")
365 (file-name (git-file-name name version))
368 "14vrm8lvwksf697sqks7xfd1xaqjlqjc9afjk33sksq5p27wr203"))
369 (modules '((guix build utils)))
371 (substitute* "GNUmakefile"
374 (build-system gnu-build-system)
376 `(("pkg-config" ,pkg-config)))
379 ("ncurses" ,ncurses)))
381 ;; No test suite available.
383 #:make-flags (list (string-append "prefix=" %output)
385 #:phases (modify-phases %standard-phases
386 (delete 'configure) ; no configure script
387 (add-before 'build 'correct-location-of-difftool
389 (substitute* "buffer.c"
393 (add-before 'install 'patch-tutorial-location
394 (lambda* (#:key outputs #:allow-other-keys)
396 (("/usr") (assoc-ref outputs "out")))
398 (add-after 'install 'install-tutorial
399 (lambda* (#:key outputs #:allow-other-keys)
400 (let* ((out (assoc-ref outputs "out"))
401 (doc (string-append out "/share/doc/mg")))
402 (install-file "tutorial" doc)
404 (home-page "https://homepage.boetes.org/software/mg/")
405 (synopsis "Microscopic GNU Emacs clone")
407 "Mg (@command{mg}) is a GNU Emacs style editor, with which it is
408 \"broadly\" compatible. This is a portable version of the mg maintained by the
410 (license license:public-domain)))
412 (define-public qemacs
419 (uri (string-append "https://bellard.org/qemacs/"
420 "qemacs-" version ".tar.gz"))
422 (base32 "156z4wpj49i6j388yjird5qvrph7hz0grb4r44l4jf3q8imadyrg"))))
423 (build-system gnu-build-system)
425 `(#:tests? #f ;no test
427 (modify-phases %standard-phases
428 (add-before 'build 'build-qhtml
429 ;; Build fails without first creating qHTML library.
430 (lambda _ (invoke "make" "-C" "libqhtml")))
431 (add-before 'install 'fix-man-pages-directory
432 ;; Install in $out/share/man instead of $out/man.
434 (substitute* "Makefile"
435 (("/man/man1" all) (string-append "/share" all)))
437 (add-before 'install 'create-directories
438 ;; Ensure directories exist before installing files.
439 (lambda* (#:key outputs #:allow-other-keys)
440 (let ((out (assoc-ref outputs "out")))
441 (for-each (lambda (d) (mkdir-p (string-append out d)))
442 '("/bin" "/share/man/man1" "/share/qe"))
444 (add-after 'install 'install-extra-documentation
445 ;; Install sample configuration file, Info, and HTML manual.
446 (lambda* (#:key outputs #:allow-other-keys)
447 (let* ((share (string-append (assoc-ref outputs "out") "/share"))
448 (doc (string-append share "/doc/" ,name "-" ,version))
449 (html (string-append share "/html"))
450 (info (string-append share "/info"))
451 (makeinfo (string-append (assoc-ref %build-inputs "texinfo")
453 ;; First fix Texinfo documentation, create appropriate
454 ;; directories, then generate Info and HTML files there.
455 (substitute* "qe-doc.texi"
456 (("^M-([{}])" _ bracket) (string-append "M-@" bracket)))
457 (for-each (lambda (d) (mkdir-p d)) (list html info))
458 (invoke makeinfo "qe-doc.texi" "-o" info)
459 (invoke makeinfo "qe-doc.texi" "--html" "--no-split" "-o" html)
460 ;; Install sample configuration file.
461 (install-file "config.eg" doc)
464 `(("texinfo" ,texinfo)))
469 (home-page "https://bellard.org/qemacs/")
470 (synopsis "Small but powerful text editor")
471 (description "QEmacs (for Quick Emacs) is a very small but
472 powerful editor. It has features that even big editors lack:
476 @item Full screen editor with an Emacs look and feel with all Emacs
477 common features: multi-buffer, multi-window, command mode, universal
478 argument, keyboard macros, config file with C-like syntax, minibuffer
479 with completion and history.
481 @item Can edit files of hundreds of Megabytes without being slow by
482 using a highly optimized internal representation and by mmaping the
485 @item Full Unicode support, including multi charset handling (8859-x,
486 UTF8, SJIS, EUC-JP, ...) and bidirectional editing respecting the
487 Unicode bidi algorithm. Arabic and Indic scripts handling (in
490 @item WYSIWYG HTML/XML/CSS2 mode graphical editing. Also supports
491 Lynx like rendering on VT100 terminals.
493 @item WYSIWYG DocBook mode based on XML/CSS2 renderer.
495 @item C mode: coloring with immediate update. Emacs like auto-indent.
497 @item Shell mode: colorized VT100 emulation so that your shell work
498 exactly as you expect. Compile mode with next/prev error.
500 @item Input methods for most languages, including Chinese (input
501 methods come from the Yudit editor).
503 @item Hexadecimal editing mode with insertion and block commands.
504 Unicode hexa editing is also supported.
506 @item Works on any VT100 terminals without termcap. UTF8 VT100
507 support included with double width glyphs.
509 @item X11 support. Support multiple proportional fonts at the same
510 time (as XEmacs). X Input methods supported. Xft extension supported
511 for anti aliased font display.
513 @item Small! Full version (including HTML/XML/CSS2/DocBook rendering
514 and all charsets): 200KB big. Basic version (without bidir/unicode
515 scripts/input/X11/C/Shell/HTML/Dired): 49KB.
517 (license license:lgpl2.1+)))
519 (define-public ghostwriter
526 (url "https://github.com/wereturtle/ghostwriter")
527 (commit (string-append "v" version))))
528 (file-name (git-file-name name version))
531 "0jc6szfh5sdnafhwsr1xv7cn1fznniq58bix41hb9wlbkvq7wzi6"))))
532 (build-system gnu-build-system)
534 `(("pkg-config" ,pkg-config)
535 ("qttools" ,qttools))) ; for lrelease
537 `(("hunspell" ,hunspell)
539 ("qtdeclarative" ,qtdeclarative)
540 ("qtmultimedia" ,qtmultimedia)
541 ("qtquickcontrols" ,qtquickcontrols)
543 ("qtwebchannel" ,qtwebchannel)))
544 (propagated-inputs ; To get native-search-path
545 `(("qtwebengine" ,qtwebengine)))
548 (modify-phases %standard-phases
550 (lambda* (#:key outputs #:allow-other-keys)
551 (let ((out (assoc-ref outputs "out")))
552 (invoke "qmake" (string-append "PREFIX=" out)))))
553 (add-after 'configure 'create-translations
555 ;; `lrelease` will not overwrite, so delete existing .qm files
556 (for-each delete-file (find-files "translations" ".*\\.qm"))
557 (apply invoke "lrelease" (find-files "translations" ".*\\.ts"))))
558 ;; Ensure that icons are found at runtime.
559 (add-after 'install 'wrap-executable
560 (lambda* (#:key inputs outputs #:allow-other-keys)
561 (let ((out (assoc-ref outputs "out")))
562 (wrap-program (string-append out "/bin/ghostwriter")
563 `("QT_PLUGIN_PATH" ":" prefix
564 ,(map (lambda (label)
565 (string-append (assoc-ref inputs label)
566 "/lib/qt5/plugins/"))
567 '("qtsvg" "qtmultimedia"))))))))))
568 (home-page "https://wereturtle.github.io/ghostwriter/")
569 (synopsis "Write without distractions")
571 "@code{ghostwriter} provides a relaxing, distraction-free writing
572 environment with Markdown markup.")
573 (license license:gpl3+))) ; icons/* under CC-BY-SA3
575 (define-public manuskript
583 (url "https://github.com/olivierkes/manuskript")
585 (file-name (git-file-name name version))
587 (base32 "1l6l9k6k69yv8xqpll0zv9cwdqqg4zvxy90l6sx5nv2yywh5crla"))))
588 (build-system python-build-system)
590 `(#:tests? #f ;no test
592 (modify-phases %standard-phases
596 (lambda* (#:key outputs #:allow-other-keys)
597 (let* ((out (assoc-ref outputs "out"))
598 (share (string-append out "/share/manuskript")))
603 (let ((destination (string-append share "/" d)))
604 (mkdir-p destination)
605 (copy-recursively d destination)))
606 '("bin" "i18n" "icons" "libs" "manuskript" "resources"))
607 ;; Install documentation.
608 (let ((doc (string-append out
609 "/doc/manuskript-" ,version
610 "/sample-projects")))
612 (copy-recursively "sample-projects" doc))
613 ;; Wrap executable in "$out/share/manuskript/bin" and
614 ;; link to it from "$out/bin".
615 (let ((bin (string-append out "/bin"))
616 (executable (string-append share "/bin/manuskript")))
617 (wrap-program executable
618 (list "PYTHONPATH" 'prefix (list (getenv "PYTHONPATH"))))
620 (with-directory-excursion bin
621 (symlink (string-append share "/bin/manuskript")
623 ;; Install icons and create .desktop file.
624 (let ((apps (string-append out "/share/applications"))
625 (icons-dir (string-append out "/share/pixmaps")))
626 (install-file "icons/Manuskript/manuskript.svg" icons-dir)
628 (with-output-to-file (string-append apps "/manuskript.desktop")
633 MimeType=application/x-manuskript-book;~@
634 Exec=~a/bin/manuskript %f~@
635 Comment=Tool for writers~@
636 Comment[es]=Herramienta para escritores/as~@
637 Keywords=manuskript;office;write;edit;novel;text;msk~@
641 Categories=Office;WordProcessor;~%"
645 `(("ghc-pandoc" ,ghc-pandoc)
646 ("python-lxml" ,python-lxml)
647 ("python-markdown" ,python-markdown)
648 ("python-pyqt" ,python-pyqt)
650 (home-page "http://www.theologeek.ch/manuskript/")
651 (synopsis "Tool for writers")
652 (description "Manuskript provides a rich environment to help
653 writers create their first draft and then further refine and edit
654 their masterpiece. With Manuskript you can:
657 @item Grow your premise from one sentence, to a paragraph, to a full
659 @item Create characters,
660 @item Conceive plots,
661 @item Construct outlines (Outline mode and/or Index cards),
662 @item Write with focus (Distraction free mode),
665 @item Edit and re-organize chapters and scenes,
666 @item View Story line,
667 @item Compose with fiction or non-fiction templates and writing modes,
668 @item Import and export document formats such as HTML, ePub,
669 OpenDocument, DocX, and more.
672 Additionally Manuskript can help in many more ways with a spell
673 checker, markdown highlighter, frequency analyzer, and automatic save
674 in plain text file format.")
675 (license license:gpl3+)))
677 (define-public editorconfig-core-c
679 (name "editorconfig-core-c")
685 (url "https://github.com/editorconfig/editorconfig-core-c")
686 (commit (string-append "v" version))))
687 (file-name (git-file-name name version))
690 "0jkc69r4jwn4rih6h6cqvgljjc3ff49cxj8286mi515aczr48cm1"))))
691 (build-system cmake-build-system)
694 (modify-phases %standard-phases
695 (add-after 'unpack 'insert-tests
696 (lambda* (#:key inputs #:allow-other-keys)
697 (let ((tests (assoc-ref inputs "tests")))
698 (copy-recursively tests "tests"))
704 (url "https://github.com/editorconfig/editorconfig-core-test")
705 (commit "6ea1d8ece62cac9cf72c79dce4879b046abe1fe7"))) ; matches version
706 (file-name (git-file-name "editorconfig-core-test" version))
709 "1sf6910idnd4bgzbj8w8f9ldsbkaqa0lh6syymwy3hfqda63acj7"))))))
712 (home-page "https://editorconfig.org/")
713 (synopsis "EditorConfig core library written in C")
714 (description "EditorConfig makes it easy to maintain the correct coding
715 style when switching between different text editors and between different
716 projects. The EditorConfig project maintains a file format and plugins for
717 various text editors which allow this file format to be read and used by those
719 (license license:bsd-2)))
721 (define-public texmacs
728 (uri (string-append "https://www.texmacs.org/Download/ftp/tmftp/"
729 "source/TeXmacs-" version "-src.tar.gz"))
731 (base32 "1d590yyanh2ar88pd0ns4mf616bq1lq4cwg93m863anhir5irb82"))))
732 (build-system gnu-build-system)
734 `(("pkg-config" ,pkg-config)
735 ("xdg-utils" ,xdg-utils))) ;for xdg-icon-resource
737 `(("freetype" ,freetype)
740 ("python" ,python-wrapper)
743 `(#:tests? #f ; no check target
745 (modify-phases %standard-phases
746 (add-after 'unpack 'fix-icon-directory
747 (lambda* (#:key outputs #:allow-other-keys)
748 (let ((out (assoc-ref outputs "out")))
749 (substitute* "packages/linux/icons.sh"
751 (string-append out "/share")))
753 (add-before 'configure 'gzip-flags
755 (substitute* "Makefile.in"
756 (("^GZIP = gzip -f") "GZIP = gzip -f -n")))))))
757 (synopsis "Editing platform with special features for scientists")
759 "GNU TeXmacs is a text editing platform which is specialized for
760 scientists. It is ideal for editing structured documents with different types
761 of content. It has robust support for mathematical formulas and plots. It
762 can also act as an interface to external mathematical programs such as R and
763 Octave. TeXmacs is completely extensible via Guile.")
764 (license license:gpl3+)
765 (home-page "https://www.texmacs.org/tmweb/home/welcome.en.html")))
767 (define-public scintilla
774 (uri (let ((v (apply string-append (string-split version #\.))))
775 (string-append "https://www.scintilla.org/scintilla" v ".tgz")))
777 (base32 "1zjsb6iiqi4cw9r9md3xv8qyy86ssz11p680xn7vmllrxshxvs8y"))))
778 (build-system gnu-build-system)
780 `(#:make-flags (list "GTK3=1" "CC=gcc" "-Cgtk")
781 #:tests? #f ;require un-packaged Pyside
783 (modify-phases %standard-phases
784 (delete 'configure) ;no configure script
786 ;; Upstream provides no install script.
787 (lambda* (#:key outputs #:allow-other-keys)
788 (let* ((out (assoc-ref outputs "out"))
789 (lib (string-append out "/lib"))
790 (include (string-append out "/include")))
791 (for-each (lambda (f) (install-file f lib))
792 (find-files "bin/" "\\.so$"))
793 (for-each (lambda (f) (install-file f include))
794 (find-files "include/" "."))
797 `(("pkg-config" ,pkg-config)
798 ("python" ,python-wrapper)))
801 (home-page "https://www.scintilla.org/")
802 (synopsis "Code editor for GTK+")
803 (description "Scintilla is a source code editing component for
804 GTK+. It has the usual features found in text editing components, as
805 well as some that are especially useful for editing and debugging
806 source code; these include support for syntax styling, error
807 indicators, code completion and call tips. Styling choices are more
808 open than with many editors: Scintilla lets you use proportional
809 fonts, bold and italics, multiple foreground and background colours,
810 and multiple fonts.")
811 (license license:hpnd)))
820 (uri (string-append "https://download.geany.org/"
821 "geany-" version ".tar.bz2"))
823 (base32 "0gnm17cr4rf3pmkf0axz4a0fxwnvp55ji0q0lzy88yqbshyxv14i"))))
824 (build-system gnu-build-system)
826 `(("autoconf" ,autoconf)
827 ("automake" ,automake)
830 ("intltool" ,intltool)
832 ("pkg-config" ,pkg-config)
833 ("python-docutils" ,python-docutils))) ;for rst2html
836 ;; FIXME: Geany bundles a 3.X release of Scintilla. It is not
837 ;; currently possible to replace it with our Scintilla package.
838 ;; ("scintilla" ,scintilla)
841 `(#:imported-modules ((guix build glib-or-gtk-build-system)
842 ,@%gnu-build-system-modules)
843 #:modules (((guix build glib-or-gtk-build-system) #:prefix glib-or-gtk:)
844 (guix build gnu-build-system)
847 (modify-phases %standard-phases
848 (add-after 'install 'glib-or-gtk-wrap
849 (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-wrap)))))
850 (home-page "https://www.geany.org")
851 (synopsis "Fast and lightweight IDE")
852 (description "Geany is a small and fast Integrated Development
853 Environment (IDE) that only has a few dependencies on other packages and is as
854 independent as possible from special desktop environments like KDE or GNOME.
856 The basic features of Geany are:
858 @item syntax highlighting
859 @item code completion
860 @item auto completion of often constructed constructs like if, for and while
861 @item auto completion of XML and HTML tags
864 @item many supported filetypes like C, Java, PHP, HTML, Python, Perl, Pascal
866 @item embedded terminal emulation
867 @item extensibility through plugins
869 (license license:gpl2+)))
874 ;; Stable release is 1.8. However, this development version
875 ;; introduces support for UTF-8.
879 (uri (string-append "http://www.moria.de/~michael/fe/"
880 "fe-" version ".tar.gz"))
883 "1hwws7si1752z6hp61zxznvgsb6846lp8zl1hn5ddhsbafwalwb9"))))
884 (build-system gnu-build-system)
886 `(#:tests? #f ;no test
887 ;; Sendmail is only used to send a crash log. Disable the
888 ;; feature since it is (1) undocumented (2) not very useful.
889 #:configure-flags (list "--disable-sendmail")
891 (modify-phases %standard-phases
892 (add-after 'install 'install-doc
893 (lambda* (#:key outputs #:allow-other-keys)
894 (let* ((out (assoc-ref outputs "out"))
895 (doc (string-append out "/share/doc/" ,name "-" ,version)))
896 (for-each (lambda (f) (install-file f doc))
897 '("fe.doc" "fe.html" "fe.ps" "feref.ps" "README"))
900 `(("gettext" ,gettext-minimal)))
902 `(("ncurses" ,ncurses)))
903 (home-page "http://www.moria.de/~michael/fe/")
904 (synopsis "Small folding editor")
905 (description "Fe is a small folding editor. It folds
906 arbitrary text regions; it is not bound to syntactic units.
908 Fe has no configuration or extension language and requires no setup.
909 Its user interface is emacs-like and it has menus for the very most
910 important functions to help beginners. Further there is a reference
914 @item Regions and Emacs-like kill ring
915 @item Incremental search
916 @item Keyboard macros
917 @item Editing binary files
918 @item Multiple windows and views
919 @item Compose function for Latin 1 characters
921 (license license:gpl2+)))
930 (url "https://github.com/vigna/ne")
932 (file-name (git-file-name name version))
935 "0h6d08cnwrk96ss83i9bragwwanph6x54sm3ak1z81146dsqsiif"))))
936 (build-system gnu-build-system)
939 ("texinfo" ,texinfo)))
941 `(("ncurses" ,ncurses)))
946 (string-append "PREFIX=" (assoc-ref %outputs "out"))
947 (string-append "LDFLAGS=-L" (assoc-ref %build-inputs "ncurses")
950 (modify-phases %standard-phases
953 (substitute* "src/makefile"
954 (("-lcurses") "-lncurses"))
956 (home-page "http://ne.di.unimi.it/")
957 (synopsis "Text editor with menu bar")
958 (description "This package provides a modeless text editor with menu bar.
959 It supports syntax highlighting, regular expressions, configurable menus,
960 keybindings, autocomplete and unlimited undo. It can pipe a marked block
961 of text through any command line filter. It can also open very large binary
962 files. It was originally developed on the Amiga 3000T.")
963 (license license:gpl3+)))
972 (uri (string-append "https://devel.ringlet.net/files/editors/hexer/"
973 "hexer-" version ".tar.xz"))
975 (base32 "157z17z8qivdin2km2wp86x1bv1nx15frrwcz11mk0l3ab74mf76"))))
976 (build-system gnu-build-system)
978 `(#:tests? #f ;no upstream tests
981 (string-append "PREFIX=" (assoc-ref %outputs "out"))
982 (string-append "LTERMCAP=-lncurses")
983 (string-append "LDFLAGS=-L" (assoc-ref %build-inputs "ncurses")
986 (modify-phases %standard-phases
987 (delete 'configure)))) ;no configure script
989 `(("ncurses" ,ncurses)))
990 (home-page "https://devel.ringlet.net/editors/hexer/")
991 (synopsis "Multi buffer editor for binary files with vi-like interface")
992 (description "Hexer is a multi-buffer editor for binary files for Unix-like
993 systems that displays its buffer(s) as a hex dump. The user interface is kept
995 (license license:bsd-3)))