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>
14 ;;; Copyright © 2020 Mark Meyer <mark@ofosos.org>
16 ;;; This file is part of GNU Guix.
18 ;;; GNU Guix is free software; you can redistribute it and/or modify it
19 ;;; under the terms of the GNU General Public License as published by
20 ;;; the Free Software Foundation; either version 3 of the License, or (at
21 ;;; your option) any later version.
23 ;;; GNU Guix is distributed in the hope that it will be useful, but
24 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
25 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26 ;;; GNU General Public License for more details.
28 ;;; You should have received a copy of the GNU General Public License
29 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
31 (define-module (gnu packages text-editors)
32 #:use-module (guix packages)
33 #:use-module (guix download)
34 #:use-module (guix git-download)
35 #:use-module (guix utils)
36 #:use-module (guix build-system cmake)
37 #:use-module (guix build-system gnu)
38 #:use-module (guix build-system cmake)
39 #:use-module (guix build-system glib-or-gtk)
40 #:use-module (guix build-system python)
41 #:use-module ((guix licenses) #:prefix license:)
42 #:use-module (gnu packages)
43 #:use-module (gnu packages aspell)
44 #:use-module (gnu packages assembly)
45 #:use-module (gnu packages autotools)
46 #:use-module (gnu packages boost)
47 #:use-module (gnu packages code)
48 #:use-module (gnu packages documentation)
49 #:use-module (gnu packages fontutils)
50 #:use-module (gnu packages freedesktop)
51 #:use-module (gnu packages gcc)
52 #:use-module (gnu packages gettext)
53 #:use-module (gnu packages glib)
54 #:use-module (gnu packages gtk)
55 #:use-module (gnu packages guile)
56 #:use-module (gnu packages haskell-xyz)
57 #:use-module (gnu packages libbsd)
58 #:use-module (gnu packages libreoffice)
59 #:use-module (gnu packages llvm)
60 #:use-module (gnu packages lua)
61 #:use-module (gnu packages ncurses)
62 #:use-module (gnu packages pcre)
63 #:use-module (gnu packages perl)
64 #:use-module (gnu packages pkg-config)
65 #:use-module (gnu packages python)
66 #:use-module (gnu packages python-web)
67 #:use-module (gnu packages python-xyz)
68 #:use-module (gnu packages qt)
69 #:use-module (gnu packages regex)
70 #:use-module (gnu packages ruby)
71 #:use-module (gnu packages terminals)
72 #:use-module (gnu packages texinfo)
73 #:use-module (gnu packages version-control)
74 #:use-module (gnu packages xml)
75 #:use-module (gnu packages xorg))
80 (version "0.6") ; also update the vis-test input
85 (url "https://github.com/martanne/vis")
86 (commit (string-append "v" version))))
88 (base32 "1zjm89cn3rfq8fxpwp66khy53s6vqlmw6q103qyyvix8ydzxdmsh"))
89 (file-name (git-file-name name version))))
90 (build-system gnu-build-system)
92 `(#:test-target "test"
94 (modify-phases %standard-phases
95 (add-after 'unpack 'unpack-test-suite
96 (lambda* (#:key inputs #:allow-other-keys)
97 (let ((vis-test (assoc-ref inputs "vis-test")))
98 (copy-recursively vis-test "test")
100 (delete 'check) ; the tests need a wrapped vis
101 (add-after 'install 'wrap-binary
102 (lambda* (#:key inputs outputs #:allow-other-keys)
103 (let* ((out (assoc-ref outputs "out"))
104 (lpeg (assoc-ref inputs "lua-lpeg"))
105 (lua-version ,(version-major+minor (package-version lua)))
106 (LUA_PATH (string-append lpeg "/share/lua/"
107 lua-version "/?.lua"))
108 (LUA_CPATH (string-append lpeg "/lib/lua/"
109 lua-version "/?.so")))
110 (wrap-program (string-append out "/bin/vis")
111 `("LUA_PATH" ":" prefix (,LUA_PATH))
112 `("LUA_CPATH" ":" prefix (,LUA_CPATH)))
114 (add-after 'wrap-binary 'check
115 (assoc-ref %standard-phases 'check))
116 (add-before 'check 'set-up-tests
117 (lambda* (#:key outputs #:allow-other-keys)
118 (let ((out (assoc-ref outputs "out")))
119 ;; DEFAULT_COMPILER is hard-coded here.
120 (substitute* "test/core/ccan-config.c"
122 (format #f "\"~a\"" ,(cc-for-target))))
124 ;; Use the ‘vis’ executable that we wrapped above.
125 (install-file (string-append out "/bin/vis") ".")
127 ;; XXX Delete 2 failing tests. TODO: make them not fail. :-)
128 (for-each delete-file
129 (find-files "test/vis/selections" "^complement"))
136 (url "https://github.com/martanne/vis-test")
137 (commit "4c4f6645de77f697a45899e8645e0c2bbdc7208a")))
139 (base32 "10vh1pxsqw88a5xwh5irkm85xr66dbycmgpmabyw9h0vm14cvcz2"))
140 (file-name (git-file-name "vis-test" version))))))
141 (inputs `(("lua" ,lua)
143 ("libtermkey" ,libtermkey)
144 ("lua-lpeg" ,lua-lpeg)
146 (synopsis "Vim-like text editor")
148 "Vis aims to be a modern, legacy free, simple yet efficient vim-like text
149 editor. It extends vim's modal editing with built-in support for multiple
150 cursors/selections and combines it with sam's structural regular expression
151 based command language.")
152 (home-page "https://github.com/martanne/vis")
153 (license (list license:isc ; Main distribution.
154 license:public-domain ; map.[ch]
155 license:expat)))) ; lexers and libutf.[ch]
157 (define-public kakoune
160 (version "2020.09.01")
164 (uri (string-append "https://github.com/mawww/kakoune/"
165 "releases/download/v" version "/"
166 "kakoune-" version ".tar.bz2"))
168 (base32 "0x81rxy7bqnhd9374g5ypy4w4nxmm0vnqw6b52bf62jxdg2qj6l6"))))
169 (build-system gnu-build-system)
172 (list (string-append "PREFIX=" (assoc-ref %outputs "out")))
174 (modify-phases %standard-phases
175 (add-after 'unpack 'patch-source
177 ;; kakoune uses confstr with _CS_PATH to find out where to find
178 ;; a posix shell, but this doesn't work in the build
179 ;; environment. This substitution just replaces that result
180 ;; with the "sh" path.
181 (substitute* "src/shell_manager.cc"
182 (("if \\(m_shell.empty\\(\\)\\)" line)
183 (string-append "m_shell = \"" (which "sh")
186 (delete 'configure) ; no configure script
187 ;; kakoune requires us to be in the src/ directory to build.
188 (add-before 'build 'chdir
189 (lambda _ (chdir "src") #t)))))
191 `(("asciidoc" ,asciidoc)
192 ("pkg-config" ,pkg-config)
195 `(("ncurses" ,ncurses)))
196 (synopsis "Vim-inspired code editor")
198 "Kakoune is a code editor heavily inspired by Vim, as such most of its
199 commands are similar to Vi's ones, and it shares Vi's \"keystrokes as a text
200 editing language\" model. Kakoune has a strong focus on interactivity, most
201 commands provide immediate and incremental results, while still being
202 competitive (as in keystroke count) with Vim.")
203 (home-page "https://kakoune.org/")
204 (license license:unlicense)))
213 (uri (string-append "https://sourceforge.net/projects/joe-editor/"
214 "files/JOE sources/joe-" version "/"
215 "joe-" version ".tar.gz"))
218 "1pmr598xxxm9j9dl93kq4dv36zyw0q2dh6d7x07hf134y9hhlnj9"))))
219 (build-system gnu-build-system)
220 (inputs `(("ncurses" ,ncurses)))
221 (home-page "http://joe-editor.sourceforge.net/")
222 (synopsis "Console screen editor")
224 "JOE is a powerful console screen editor with a \"mode-less\" user
225 interface similar to many user-friendly editors. JOE has some of the key
226 bindings and many of the powerful features of GNU Emacs.")
227 (license license:gpl3+)))
229 (define-public jucipp
233 (home-page "https://gitlab.com/cppit/jucipp")
236 (uri (git-reference (url home-page)
237 (commit (string-append "v" version))
238 ;; Two submodules are required which are
239 ;; developed alongside JuCi++ and difficult
240 ;; to package separately.
242 (file-name (git-file-name name version))
244 (base32 "0lb477acqrm3fy3j6i7j9l68j48cnkrzi80588npwwjssqicy4g6"))))
245 (build-system cmake-build-system)
247 `(#:configure-flags '("-DBUILD_TESTING=ON"
249 ;; These arguments are here to facilitate an "in-source"
250 ;; build using "./build" instead of the default "../build".
251 ;; The test suite expects that to be the case.
254 #:phases (modify-phases %standard-phases
255 (add-before 'configure 'enter-build-directory
261 (add-after 'unpack 'patch-tiny-process-library
263 (with-directory-excursion "lib/tiny-process-library"
264 (substitute* '("process_unix.cpp"
266 (("/bin/sh") (which "sh"))))
268 (add-after 'unpack 'disable-git-test
270 (substitute* "tests/CMakeLists.txt"
271 ;; Disable the git test, as it requires the full checkout.
272 (("add_test\\(git_test.*\\)") ""))
274 (add-before 'check 'pre-check
275 (lambda* (#:key inputs #:allow-other-keys)
276 ;; Tests do not expect HOME to be empty.
277 (setenv "HOME" "/etc")
279 ;; Most tests require an X server.
280 (let ((xorg-server (assoc-ref inputs "xorg-server"))
282 (setenv "DISPLAY" display)
283 (system (string-append xorg-server "/bin/Xvfb "
286 (add-after 'install 'wrap
287 (lambda* (#:key inputs outputs #:allow-other-keys)
288 ;; The package needs GTK+ and GtkSourceView on XDG_DATA_DIRS
289 ;; for syntax highlighting to work. shared-mime-info is
290 ;; necessary for MIME handling.
291 ;; XXX: Ideally we'd reuse glib-or-gtk-wrap here, but it
292 ;; does not pick up $gtksourceview/share/gtksourceview-3.0.
293 (let ((out (assoc-ref outputs "out"))
294 (gtk+ (assoc-ref inputs "gtk+"))
295 (gtksourceview (assoc-ref inputs "gtksourceview"))
296 (shared-mime-info (assoc-ref inputs "shared-mime-info")))
297 (wrap-program (string-append out "/bin/juci")
298 `("XDG_DATA_DIRS" ":" prefix
301 (string-append pkg "/share"))
302 (list out gtk+ gtksourceview shared-mime-info))
306 `(("pkg-config" ,pkg-config)
307 ("xorg-server" ,xorg-server-for-tests)))
311 ("ctags" ,universal-ctags)
313 ("gtksourceviewmm" ,gtksourceviewmm)
314 ("libclang" ,clang-10) ;XXX: must be the same version as Mesas LLVM
315 ("libgit2" ,libgit2)))
316 (synopsis "Lightweight C++ IDE")
318 "juCi++ is a small @dfn{IDE} (Integrated Development Environment)
319 designed especially towards libclang with speed, stability, and ease of use
322 It supports autocompletion, on-the-fly warnings and errors, syntax
323 highlighting, and integrates with Git as well as the CMake and Meson build
325 (license license:expat)))
327 (define-public leafpad
333 (uri (string-append "mirror://savannah/"
334 "leafpad/leafpad-" version ".tar.gz"))
337 "0b0az2wvqgvam7w0ns1j8xp2llslm1rx6h7zcsy06a7j0yp257cm"))))
338 (build-system glib-or-gtk-build-system)
340 `(("intltool" ,intltool)
341 ("pkg-config" ,pkg-config)))
344 (home-page "http://tarot.freeshell.org/leafpad/")
345 (synopsis "GTK+ based text editor")
346 (description "Leafpad is a GTK+ text editor that emphasizes simplicity. As
347 development focuses on keeping weight down to a minimum, only the most essential
348 features are implemented in the editor. Leafpad is simple to use, is easily
349 compiled, requires few libraries, and starts up quickly. ")
350 (license license:gpl2+)))
358 (uri (string-append "https://sites.google.com/site/e3editor/Home/"
359 "e3-" version ".tgz"))
362 "0919kadkas020maqq37852isnzp053q2fnws2zh3mz81d1jiviak"))
363 (modules '((guix build utils)))
365 ;; Remove pre-built binaries.
367 (delete-file-recursively "bin")
369 (build-system gnu-build-system)
372 #:make-flags (list (string-append "PREFIX="
373 (assoc-ref %outputs "out")))
374 #:phases (modify-phases %standard-phases
375 (delete 'configure))))
378 (home-page "https://sites.google.com/site/e3editor/")
379 (synopsis "Tiny text editor written in assembly")
381 "e3 is a micro text editor with an executable code size between 3800 and
382 35000 bytes. Except for ``syntax highlighting'', the e3 binary supports all
383 of the basic functions one expects plus built in arithmetic calculations.
384 UTF-8 coding of unicode characters is supported as well. e3 can use
385 Wordstar-, EMACS-, Pico, Nedit or vi-like key bindings. e3 can be used on
386 16, 32, and 64-bit CPUs.")
387 (supported-systems '("x86_64-linux" "i686-linux"))
388 (license license:gpl2+)))
397 (url "https://github.com/hboetes/mg")
399 (file-name (git-file-name name version))
402 "14vrm8lvwksf697sqks7xfd1xaqjlqjc9afjk33sksq5p27wr203"))
403 (modules '((guix build utils)))
405 (substitute* "GNUmakefile"
408 (build-system gnu-build-system)
410 `(("pkg-config" ,pkg-config)))
413 ("ncurses" ,ncurses)))
415 ;; No test suite available.
417 #:make-flags (list (string-append "prefix=" %output)
419 #:phases (modify-phases %standard-phases
420 (delete 'configure) ; no configure script
421 (add-before 'build 'correct-location-of-difftool
423 (substitute* "buffer.c"
427 (add-before 'install 'patch-tutorial-location
428 (lambda* (#:key outputs #:allow-other-keys)
430 (("/usr") (assoc-ref outputs "out")))
432 (add-after 'install 'install-tutorial
433 (lambda* (#:key outputs #:allow-other-keys)
434 (let* ((out (assoc-ref outputs "out"))
435 (doc (string-append out "/share/doc/mg")))
436 (install-file "tutorial" doc)
438 (home-page "https://homepage.boetes.org/software/mg/")
439 (synopsis "Microscopic GNU Emacs clone")
441 "Mg (@command{mg}) is a GNU Emacs style editor, with which it is
442 \"broadly\" compatible. This is a portable version of the mg maintained by the
444 (license license:public-domain)))
446 (define-public qemacs
453 (uri (string-append "https://bellard.org/qemacs/"
454 "qemacs-" version ".tar.gz"))
456 (base32 "156z4wpj49i6j388yjird5qvrph7hz0grb4r44l4jf3q8imadyrg"))))
457 (build-system gnu-build-system)
459 `(#:tests? #f ;no test
461 (modify-phases %standard-phases
462 (add-before 'build 'build-qhtml
463 ;; Build fails without first creating qHTML library.
464 (lambda _ (invoke "make" "-C" "libqhtml")))
465 (add-before 'install 'fix-man-pages-directory
466 ;; Install in $out/share/man instead of $out/man.
468 (substitute* "Makefile"
469 (("/man/man1" all) (string-append "/share" all)))
471 (add-before 'install 'create-directories
472 ;; Ensure directories exist before installing files.
473 (lambda* (#:key outputs #:allow-other-keys)
474 (let ((out (assoc-ref outputs "out")))
475 (for-each (lambda (d) (mkdir-p (string-append out d)))
476 '("/bin" "/share/man/man1" "/share/qe"))
478 (add-after 'install 'install-extra-documentation
479 ;; Install sample configuration file, Info, and HTML manual.
480 (lambda* (#:key outputs #:allow-other-keys)
481 (let* ((share (string-append (assoc-ref outputs "out") "/share"))
482 (doc (string-append share "/doc/" ,name "-" ,version))
483 (html (string-append share "/html"))
484 (info (string-append share "/info"))
485 (makeinfo (string-append (assoc-ref %build-inputs "texinfo")
487 ;; First fix Texinfo documentation, create appropriate
488 ;; directories, then generate Info and HTML files there.
489 (substitute* "qe-doc.texi"
490 (("^M-([{}])" _ bracket) (string-append "M-@" bracket)))
491 (for-each (lambda (d) (mkdir-p d)) (list html info))
492 (invoke makeinfo "qe-doc.texi" "-o" info)
493 (invoke makeinfo "qe-doc.texi" "--html" "--no-split" "-o" html)
494 ;; Install sample configuration file.
495 (install-file "config.eg" doc)
498 `(("texinfo" ,texinfo)))
503 (home-page "https://bellard.org/qemacs/")
504 (synopsis "Small but powerful text editor")
505 (description "QEmacs (for Quick Emacs) is a very small but
506 powerful editor. It has features that even big editors lack:
510 @item Full screen editor with an Emacs look and feel with all Emacs
511 common features: multi-buffer, multi-window, command mode, universal
512 argument, keyboard macros, config file with C-like syntax, minibuffer
513 with completion and history.
515 @item Can edit files of hundreds of Megabytes without being slow by
516 using a highly optimized internal representation and by mmaping the
519 @item Full Unicode support, including multi charset handling (8859-x,
520 UTF8, SJIS, EUC-JP, ...) and bidirectional editing respecting the
521 Unicode bidi algorithm. Arabic and Indic scripts handling (in
524 @item WYSIWYG HTML/XML/CSS2 mode graphical editing. Also supports
525 Lynx like rendering on VT100 terminals.
527 @item WYSIWYG DocBook mode based on XML/CSS2 renderer.
529 @item C mode: coloring with immediate update. Emacs like auto-indent.
531 @item Shell mode: colorized VT100 emulation so that your shell work
532 exactly as you expect. Compile mode with next/prev error.
534 @item Input methods for most languages, including Chinese (input
535 methods come from the Yudit editor).
537 @item Hexadecimal editing mode with insertion and block commands.
538 Unicode hexa editing is also supported.
540 @item Works on any VT100 terminals without termcap. UTF8 VT100
541 support included with double width glyphs.
543 @item X11 support. Support multiple proportional fonts at the same
544 time (as XEmacs). X Input methods supported. Xft extension supported
545 for anti aliased font display.
547 @item Small! Full version (including HTML/XML/CSS2/DocBook rendering
548 and all charsets): 200KB big. Basic version (without bidir/unicode
549 scripts/input/X11/C/Shell/HTML/Dired): 49KB.
551 (license license:lgpl2.1+)))
553 (define-public ghostwriter
560 (url "https://github.com/wereturtle/ghostwriter")
561 (commit (string-append "v" version))))
562 (file-name (git-file-name name version))
565 "0jc6szfh5sdnafhwsr1xv7cn1fznniq58bix41hb9wlbkvq7wzi6"))))
566 (build-system gnu-build-system)
568 `(("pkg-config" ,pkg-config)
569 ("qttools" ,qttools))) ; for lrelease
571 `(("hunspell" ,hunspell)
573 ("qtdeclarative" ,qtdeclarative)
574 ("qtmultimedia" ,qtmultimedia)
575 ("qtquickcontrols" ,qtquickcontrols)
577 ("qtwebchannel" ,qtwebchannel)))
578 (propagated-inputs ; To get native-search-path
579 `(("qtwebengine" ,qtwebengine)))
582 (modify-phases %standard-phases
584 (lambda* (#:key outputs #:allow-other-keys)
585 (let ((out (assoc-ref outputs "out")))
586 (invoke "qmake" (string-append "PREFIX=" out)))))
587 (add-after 'configure 'create-translations
589 ;; `lrelease` will not overwrite, so delete existing .qm files
590 (for-each delete-file (find-files "translations" ".*\\.qm"))
591 (apply invoke "lrelease" (find-files "translations" ".*\\.ts"))))
592 ;; Ensure that icons are found at runtime.
593 (add-after 'install 'wrap-executable
594 (lambda* (#:key inputs outputs #:allow-other-keys)
595 (let ((out (assoc-ref outputs "out")))
596 (wrap-program (string-append out "/bin/ghostwriter")
597 `("QT_PLUGIN_PATH" ":" prefix
598 ,(map (lambda (label)
599 (string-append (assoc-ref inputs label)
600 "/lib/qt5/plugins/"))
601 '("qtsvg" "qtmultimedia"))))))))))
602 (home-page "https://wereturtle.github.io/ghostwriter/")
603 (synopsis "Write without distractions")
605 "@code{ghostwriter} provides a relaxing, distraction-free writing
606 environment with Markdown markup.")
607 (license license:gpl3+))) ; icons/* under CC-BY-SA3
609 (define-public manuskript
617 (url "https://github.com/olivierkes/manuskript")
619 (file-name (git-file-name name version))
621 (base32 "1l6l9k6k69yv8xqpll0zv9cwdqqg4zvxy90l6sx5nv2yywh5crla"))))
622 (build-system python-build-system)
624 `(#:tests? #f ;no test
626 (modify-phases %standard-phases
630 (lambda* (#:key outputs #:allow-other-keys)
631 (let* ((out (assoc-ref outputs "out"))
632 (share (string-append out "/share/manuskript")))
637 (let ((destination (string-append share "/" d)))
638 (mkdir-p destination)
639 (copy-recursively d destination)))
640 '("bin" "i18n" "icons" "libs" "manuskript" "resources"))
641 ;; Install documentation.
642 (let ((doc (string-append out
643 "/doc/manuskript-" ,version
644 "/sample-projects")))
646 (copy-recursively "sample-projects" doc))
647 ;; Wrap executable in "$out/share/manuskript/bin" and
648 ;; link to it from "$out/bin".
649 (let ((bin (string-append out "/bin"))
650 (executable (string-append share "/bin/manuskript")))
651 (wrap-program executable
652 (list "PYTHONPATH" 'prefix (list (getenv "PYTHONPATH"))))
654 (with-directory-excursion bin
655 (symlink (string-append share "/bin/manuskript")
657 ;; Install icons and create .desktop file.
658 (let ((apps (string-append out "/share/applications"))
659 (icons-dir (string-append out "/share/pixmaps")))
660 (install-file "icons/Manuskript/manuskript.svg" icons-dir)
662 (make-desktop-entry-file (string-append apps "/manuskript.desktop")
664 #:mime-type "application/x-manuskript-book;"
665 #:exec (string-append out "/bin/manuskript %f")
666 #:comment '((#f "Tool for writers")
667 ("es" "Herramienta para escritores/as"))
668 #:keywords "manuskript;office;write;edit;novel;text;msk"
672 #:categories "Office;WordProcessor;"))
676 ("python-lxml" ,python-lxml)
677 ("python-markdown" ,python-markdown)
678 ("python-pyqt" ,python-pyqt)
680 (home-page "http://www.theologeek.ch/manuskript/")
681 (synopsis "Tool for writers")
682 (description "Manuskript provides a rich environment to help
683 writers create their first draft and then further refine and edit
684 their masterpiece. With Manuskript you can:
687 @item Grow your premise from one sentence, to a paragraph, to a full
689 @item Create characters,
690 @item Conceive plots,
691 @item Construct outlines (Outline mode and/or Index cards),
692 @item Write with focus (Distraction free mode),
695 @item Edit and re-organize chapters and scenes,
696 @item View Story line,
697 @item Compose with fiction or non-fiction templates and writing modes,
698 @item Import and export document formats such as HTML, ePub,
699 OpenDocument, DocX, and more.
702 Additionally Manuskript can help in many more ways with a spell
703 checker, markdown highlighter, frequency analyzer, and automatic save
704 in plain text file format.")
705 (license license:gpl3+)))
707 (define-public editorconfig-core-c
709 (name "editorconfig-core-c")
715 (url "https://github.com/editorconfig/editorconfig-core-c")
716 (commit (string-append "v" version))))
717 (file-name (git-file-name name version))
719 (base32 "1311fhh2jfsja2hhk3nwb6nijlq03jw8dk35cwbrac0p9jvy03jx"))))
720 (build-system cmake-build-system)
723 (modify-phases %standard-phases
724 (add-after 'unpack 'insert-tests
725 (lambda* (#:key inputs #:allow-other-keys)
726 (let ((tests (assoc-ref inputs "tests")))
727 (copy-recursively tests "tests"))
729 (add-after 'install 'delete-static-library
730 (lambda* (#:key outputs #:allow-other-keys)
731 (let* ((out (assoc-ref outputs "out"))
732 (lib (string-append out "/lib")))
733 (with-directory-excursion lib
734 (delete-file "libeditorconfig_static.a"))
741 (url "https://github.com/editorconfig/editorconfig-core-test")
742 ;; The tests submodule commit matching this package's version.
743 (commit "48610d43b7455af12195473377f93c4ceea654f5")))
744 (file-name (git-file-name "editorconfig-core-test" version))
746 (base32 "1s29p4brmcsc3xsww3gk85dg45f1kk3iykh1air3ij0hymf5dyqy"))))))
749 (home-page "https://editorconfig.org/")
750 (synopsis "EditorConfig core library written in C")
751 (description "EditorConfig makes it easy to maintain the correct coding
752 style when switching between different text editors and between different
753 projects. The EditorConfig project maintains a file format and plugins for
754 various text editors which allow this file format to be read and used by those
756 (license license:bsd-2)))
758 (define-public texmacs
765 (uri (string-append "https://www.texmacs.org/Download/ftp/tmftp/"
766 "source/TeXmacs-" version "-src.tar.gz"))
768 (base32 "118sk75k0k9pkyfyx000n2ypab8vm1lz5zxkkdmsi5nwyr3rp56s"))))
769 (build-system gnu-build-system)
771 `(("pkg-config" ,pkg-config)
772 ("xdg-utils" ,xdg-utils))) ;for xdg-icon-resource
774 `(("freetype" ,freetype)
777 ("python" ,python-wrapper)
781 `(#:tests? #f ; no check target
783 (modify-phases %standard-phases
784 (add-after 'unpack 'fix-icon-directory
785 (lambda* (#:key outputs #:allow-other-keys)
786 (let ((out (assoc-ref outputs "out")))
787 (substitute* "packages/linux/icons.sh"
789 (string-append out "/share")))
791 (add-before 'configure 'gzip-flags
793 (substitute* "Makefile.in"
794 (("^GZIP = gzip -f") "GZIP = gzip -f -n")))))))
795 (synopsis "Editing platform with special features for scientists")
797 "GNU TeXmacs is a text editing platform which is specialized for
798 scientists. It is ideal for editing structured documents with different types
799 of content. It has robust support for mathematical formulas and plots. It
800 can also act as an interface to external mathematical programs such as R and
801 Octave. TeXmacs is completely extensible via Guile.")
802 (license license:gpl3+)
803 (home-page "https://www.texmacs.org/tmweb/home/welcome.en.html")))
805 (define-public scintilla
812 (uri (let ((v (apply string-append (string-split version #\.))))
813 (string-append "https://www.scintilla.org/scintilla" v ".tgz")))
815 (base32 "1p62dq2fgdkvdn2clz1xjdj09acv87rbifl67zhlz7skqip31y9d"))))
816 (build-system gnu-build-system)
818 `(#:make-flags (list "GTK3=1" "CC=gcc" "-Cgtk")
819 #:tests? #f ;require un-packaged Pyside
821 (modify-phases %standard-phases
822 (delete 'configure) ;no configure script
824 ;; Upstream provides no install script.
825 (lambda* (#:key outputs #:allow-other-keys)
826 (let* ((out (assoc-ref outputs "out"))
827 (lib (string-append out "/lib"))
828 (include (string-append out "/include")))
829 (for-each (lambda (f) (install-file f lib))
830 (find-files "bin/" "\\.so$"))
831 (for-each (lambda (f) (install-file f include))
832 (find-files "include/" "."))
835 `(("pkg-config" ,pkg-config)
836 ("python" ,python-wrapper)))
839 (home-page "https://www.scintilla.org/")
840 (synopsis "Code editor for GTK+")
841 (description "Scintilla is a source code editing component for
842 GTK+. It has the usual features found in text editing components, as
843 well as some that are especially useful for editing and debugging
844 source code; these include support for syntax styling, error
845 indicators, code completion and call tips. Styling choices are more
846 open than with many editors: Scintilla lets you use proportional
847 fonts, bold and italics, multiple foreground and background colours,
848 and multiple fonts.")
849 (license license:hpnd)))
858 (uri (string-append "https://download.geany.org/"
859 "geany-" version ".tar.bz2"))
861 (base32 "060sachn33xpx3a609f09y97qq5ky17gvv686zbvrn618ij7bi8q"))))
862 (build-system gnu-build-system)
864 `(("autoconf" ,autoconf)
865 ("automake" ,automake)
868 ("intltool" ,intltool)
870 ("pkg-config" ,pkg-config)
871 ("python-docutils" ,python-docutils))) ;for rst2html
874 ;; FIXME: Geany bundles a 3.X release of Scintilla. It is not
875 ;; currently possible to replace it with our Scintilla package.
876 ;; ("scintilla" ,scintilla)
879 `(#:imported-modules ((guix build glib-or-gtk-build-system)
880 ,@%gnu-build-system-modules)
881 #:modules (((guix build glib-or-gtk-build-system) #:prefix glib-or-gtk:)
882 (guix build gnu-build-system)
885 (modify-phases %standard-phases
886 (add-after 'install 'glib-or-gtk-wrap
887 (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-wrap)))))
888 (home-page "https://www.geany.org")
889 (synopsis "Fast and lightweight IDE")
890 (description "Geany is a small and fast Integrated Development
891 Environment (IDE) that only has a few dependencies on other packages and is as
892 independent as possible from special desktop environments like KDE or GNOME.
894 The basic features of Geany are:
896 @item syntax highlighting
897 @item code completion
898 @item auto completion of often constructed constructs like if, for and while
899 @item auto completion of XML and HTML tags
902 @item many supported filetypes like C, Java, PHP, HTML, Python, Perl, Pascal
904 @item embedded terminal emulation
905 @item extensibility through plugins
907 (license license:gpl2+)))
912 ;; Stable release is 1.8. However, this development version
913 ;; introduces support for UTF-8.
917 (uri (string-append "http://www.moria.de/~michael/fe/"
918 "fe-" version ".tar.gz"))
921 "1hwws7si1752z6hp61zxznvgsb6846lp8zl1hn5ddhsbafwalwb9"))))
922 (build-system gnu-build-system)
924 `(#:tests? #f ;no test
925 ;; Sendmail is only used to send a crash log. Disable the
926 ;; feature since it is (1) undocumented (2) not very useful.
927 #:configure-flags (list "--disable-sendmail")
929 (modify-phases %standard-phases
930 (add-after 'install 'install-doc
931 (lambda* (#:key outputs #:allow-other-keys)
932 (let* ((out (assoc-ref outputs "out"))
933 (doc (string-append out "/share/doc/" ,name "-" ,version)))
934 (for-each (lambda (f) (install-file f doc))
935 '("fe.doc" "fe.html" "fe.ps" "feref.ps" "README"))
938 `(("gettext" ,gettext-minimal)))
940 `(("ncurses" ,ncurses)))
941 (home-page "http://www.moria.de/~michael/fe/")
942 (synopsis "Small folding editor")
943 (description "Fe is a small folding editor. It folds
944 arbitrary text regions; it is not bound to syntactic units.
946 Fe has no configuration or extension language and requires no setup.
947 Its user interface is emacs-like and it has menus for the very most
948 important functions to help beginners. Further there is a reference
952 @item Regions and Emacs-like kill ring
953 @item Incremental search
954 @item Keyboard macros
955 @item Editing binary files
956 @item Multiple windows and views
957 @item Compose function for Latin 1 characters
959 (license license:gpl2+)))
968 (url "https://github.com/vigna/ne")
970 (file-name (git-file-name name version))
973 "01aglnsfljlvx0wvyvpjfn4y88jf450a06qnj9a8lgdqv1hdkq1a"))))
974 (build-system gnu-build-system)
977 ("texinfo" ,texinfo)))
979 `(("ncurses" ,ncurses)))
984 (string-append "PREFIX=" (assoc-ref %outputs "out"))
985 (string-append "LDFLAGS=-L" (assoc-ref %build-inputs "ncurses")
988 (modify-phases %standard-phases
991 (substitute* "src/makefile"
992 (("-lcurses") "-lncurses"))
994 (home-page "http://ne.di.unimi.it/")
995 (synopsis "Text editor with menu bar")
996 (description "This package provides a modeless text editor with menu bar.
997 It supports syntax highlighting, regular expressions, configurable menus,
998 keybindings, autocomplete and unlimited undo. It can pipe a marked block
999 of text through any command line filter. It can also open very large binary
1000 files. It was originally developed on the Amiga 3000T.")
1001 (license license:gpl3+)))
1003 (define-public hexer
1010 (uri (string-append "https://devel.ringlet.net/files/editors/hexer/"
1011 "hexer-" version ".tar.xz"))
1013 (base32 "157z17z8qivdin2km2wp86x1bv1nx15frrwcz11mk0l3ab74mf76"))))
1014 (build-system gnu-build-system)
1016 `(#:tests? #f ;no upstream tests
1019 (string-append "PREFIX=" (assoc-ref %outputs "out"))
1020 (string-append "LTERMCAP=-lncurses")
1021 (string-append "LDFLAGS=-L" (assoc-ref %build-inputs "ncurses")
1024 (modify-phases %standard-phases
1025 (delete 'configure)))) ;no configure script
1027 `(("ncurses" ,ncurses)))
1028 (home-page "https://devel.ringlet.net/editors/hexer/")
1029 (synopsis "Multi buffer editor for binary files with vi-like interface")
1030 (description "Hexer is a multi-buffer editor for binary files for Unix-like
1031 systems that displays its buffer(s) as a hex dump. The user interface is kept
1033 (license license:bsd-3)))
1035 (define-public virtaal
1041 (uri (string-append "mirror://sourceforge/translate/Virtaal/"
1042 version "/virtaal-" version ".tar.bz2"))
1045 "0cyimjp3191qlmw6n0ipqdr9xr0cq4f6dqvz4rl9q31h6l3kywf9"))))
1046 (build-system python-build-system)
1048 `(#:python ,python-2
1049 #:use-setuptools? #f
1050 #:tests? #f ;; Failing tests
1052 (modify-phases %standard-phases
1053 (add-before 'build 'configure
1054 (lambda* (#:key outputs #:allow-other-keys)
1055 ;; Set data file path to absolute store path.
1056 (substitute* "virtaal/common/pan_app.py"
1057 (("file_discovery\\.get_abs_data_filename.*")
1058 (string-append "os.path.join('"
1059 (assoc-ref outputs "out")
1060 "/share', *path_parts)"))))))))
1062 `(("python2-lxml" ,python2-lxml)
1063 ("python2-pygtk" ,python2-pygtk)
1064 ("python2-simplejson" ,python2-simplejson)
1065 ("python2-translate-toolkit" ,python2-translate-toolkit)
1066 ("python2-pycurl" ,python2-pycurl)))
1067 (synopsis "Graphical translation tool")
1068 (description "Virtaal is a powerful yet simple translation tool with an
1069 uncluttered user interface. It supports a multitude of translation formats
1070 provided by the Translate Toolkit, including XLIFF and PO.")
1071 (home-page "https://virtaal.translatehouse.org/")
1072 (license license:gpl2+)))