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>
15 ;;; Copyright © 2020 Maxime Devos <maximedevos@telenet.be>
17 ;;; This file is part of GNU Guix.
19 ;;; GNU Guix is free software; you can redistribute it and/or modify it
20 ;;; under the terms of the GNU General Public License as published by
21 ;;; the Free Software Foundation; either version 3 of the License, or (at
22 ;;; your option) any later version.
24 ;;; GNU Guix is distributed in the hope that it will be useful, but
25 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
26 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27 ;;; GNU General Public License for more details.
29 ;;; You should have received a copy of the GNU General Public License
30 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
32 (define-module (gnu packages text-editors)
33 #:use-module (guix packages)
34 #:use-module (guix download)
35 #:use-module (guix git-download)
36 #:use-module (guix utils)
37 #:use-module (guix build-system cmake)
38 #:use-module (guix build-system gnu)
39 #:use-module (guix build-system cmake)
40 #:use-module (guix build-system glib-or-gtk)
41 #:use-module (guix build-system python)
42 #:use-module ((guix licenses) #:prefix license:)
43 #:use-module (gnu packages)
44 #:use-module (gnu packages aspell)
45 #:use-module (gnu packages assembly)
46 #:use-module (gnu packages autotools)
47 #:use-module (gnu packages boost)
48 #:use-module (gnu packages code)
49 #:use-module (gnu packages documentation)
50 #:use-module (gnu packages fontutils)
51 #:use-module (gnu packages freedesktop)
52 #:use-module (gnu packages gcc)
53 #:use-module (gnu packages gettext)
54 #:use-module (gnu packages glib)
55 #:use-module (gnu packages gtk)
56 #:use-module (gnu packages guile)
57 #:use-module (gnu packages haskell-xyz)
58 #:use-module (gnu packages libbsd)
59 #:use-module (gnu packages libreoffice)
60 #:use-module (gnu packages llvm)
61 #:use-module (gnu packages lua)
62 #:use-module (gnu packages ncurses)
63 #:use-module (gnu packages pcre)
64 #:use-module (gnu packages perl)
65 #:use-module (gnu packages pkg-config)
66 #:use-module (gnu packages python)
67 #:use-module (gnu packages python-web)
68 #:use-module (gnu packages python-xyz)
69 #:use-module (gnu packages qt)
70 #:use-module (gnu packages regex)
71 #:use-module (gnu packages ruby)
72 #:use-module (gnu packages terminals)
73 #:use-module (gnu packages texinfo)
74 #:use-module (gnu packages version-control)
75 #:use-module (gnu packages xml)
76 #:use-module (gnu packages xorg))
81 (version "0.6") ; also update the vis-test input
86 (url "https://github.com/martanne/vis")
87 (commit (string-append "v" version))))
89 (base32 "1zjm89cn3rfq8fxpwp66khy53s6vqlmw6q103qyyvix8ydzxdmsh"))
90 (file-name (git-file-name name version))))
91 (build-system gnu-build-system)
93 `(#:test-target "test"
95 (modify-phases %standard-phases
96 (add-after 'unpack 'unpack-test-suite
97 (lambda* (#:key inputs #:allow-other-keys)
98 (let ((vis-test (assoc-ref inputs "vis-test")))
99 (copy-recursively vis-test "test")
101 (delete 'check) ; the tests need a wrapped vis
102 (add-after 'install 'wrap-binary
103 (lambda* (#:key inputs outputs #:allow-other-keys)
104 (let* ((out (assoc-ref outputs "out"))
105 (lpeg (assoc-ref inputs "lua-lpeg"))
106 (lua-version ,(version-major+minor (package-version lua)))
107 (LUA_PATH (string-append lpeg "/share/lua/"
108 lua-version "/?.lua"))
109 (LUA_CPATH (string-append lpeg "/lib/lua/"
110 lua-version "/?.so")))
111 (wrap-program (string-append out "/bin/vis")
112 `("LUA_PATH" ":" prefix (,LUA_PATH))
113 `("LUA_CPATH" ":" prefix (,LUA_CPATH)))
115 (add-after 'wrap-binary 'check
116 (assoc-ref %standard-phases 'check))
117 (add-before 'check 'set-up-tests
118 (lambda* (#:key outputs #:allow-other-keys)
119 (let ((out (assoc-ref outputs "out")))
120 ;; DEFAULT_COMPILER is hard-coded here.
121 (substitute* "test/core/ccan-config.c"
123 (format #f "\"~a\"" ,(cc-for-target))))
125 ;; Use the ‘vis’ executable that we wrapped above.
126 (install-file (string-append out "/bin/vis") ".")
128 ;; XXX Delete 2 failing tests. TODO: make them not fail. :-)
129 (for-each delete-file
130 (find-files "test/vis/selections" "^complement"))
137 (url "https://github.com/martanne/vis-test")
138 (commit "4c4f6645de77f697a45899e8645e0c2bbdc7208a")))
140 (base32 "10vh1pxsqw88a5xwh5irkm85xr66dbycmgpmabyw9h0vm14cvcz2"))
141 (file-name (git-file-name "vis-test" version))))))
142 (inputs `(("lua" ,lua)
144 ("libtermkey" ,libtermkey)
145 ("lua-lpeg" ,lua-lpeg)
147 (synopsis "Vim-like text editor")
149 "Vis aims to be a modern, legacy free, simple yet efficient vim-like text
150 editor. It extends vim's modal editing with built-in support for multiple
151 cursors/selections and combines it with sam's structural regular expression
152 based command language.")
153 (home-page "https://github.com/martanne/vis")
154 (license (list license:isc ; Main distribution.
155 license:public-domain ; map.[ch]
156 license:expat)))) ; lexers and libutf.[ch]
158 (define-public kakoune
161 (version "2020.09.01")
165 (uri (string-append "https://github.com/mawww/kakoune/"
166 "releases/download/v" version "/"
167 "kakoune-" version ".tar.bz2"))
169 (base32 "0x81rxy7bqnhd9374g5ypy4w4nxmm0vnqw6b52bf62jxdg2qj6l6"))))
170 (build-system gnu-build-system)
173 (list (string-append "PREFIX=" (assoc-ref %outputs "out")))
175 (modify-phases %standard-phases
176 (add-after 'unpack 'patch-source
178 ;; kakoune uses confstr with _CS_PATH to find out where to find
179 ;; a posix shell, but this doesn't work in the build
180 ;; environment. This substitution just replaces that result
181 ;; with the "sh" path.
182 (substitute* "src/shell_manager.cc"
183 (("if \\(m_shell.empty\\(\\)\\)" line)
184 (string-append "m_shell = \"" (which "sh")
187 (delete 'configure) ; no configure script
188 ;; kakoune requires us to be in the src/ directory to build.
189 (add-before 'build 'chdir
190 (lambda _ (chdir "src") #t)))))
192 `(("asciidoc" ,asciidoc)
193 ("pkg-config" ,pkg-config)
196 `(("ncurses" ,ncurses)))
197 (synopsis "Vim-inspired code editor")
199 "Kakoune is a code editor heavily inspired by Vim, as such most of its
200 commands are similar to Vi's ones, and it shares Vi's \"keystrokes as a text
201 editing language\" model. Kakoune has a strong focus on interactivity, most
202 commands provide immediate and incremental results, while still being
203 competitive (as in keystroke count) with Vim.")
204 (home-page "https://kakoune.org/")
205 (license license:unlicense)))
214 (uri (string-append "https://sourceforge.net/projects/joe-editor/"
215 "files/JOE sources/joe-" version "/"
216 "joe-" version ".tar.gz"))
219 "1pmr598xxxm9j9dl93kq4dv36zyw0q2dh6d7x07hf134y9hhlnj9"))))
220 (build-system gnu-build-system)
221 (inputs `(("ncurses" ,ncurses)))
222 (home-page "http://joe-editor.sourceforge.net/")
223 (synopsis "Console screen editor")
225 "JOE is a powerful console screen editor with a \"mode-less\" user
226 interface similar to many user-friendly editors. JOE has some of the key
227 bindings and many of the powerful features of GNU Emacs.")
228 (license license:gpl3+)))
230 (define-public jucipp
234 (home-page "https://gitlab.com/cppit/jucipp")
237 (uri (git-reference (url home-page)
238 (commit (string-append "v" version))
239 ;; Two submodules are required which are
240 ;; developed alongside JuCi++ and difficult
241 ;; to package separately.
243 (file-name (git-file-name name version))
245 (base32 "0lb477acqrm3fy3j6i7j9l68j48cnkrzi80588npwwjssqicy4g6"))))
246 (build-system cmake-build-system)
248 `(#:configure-flags '("-DBUILD_TESTING=ON"
250 ;; These arguments are here to facilitate an "in-source"
251 ;; build using "./build" instead of the default "../build".
252 ;; The test suite expects that to be the case.
255 #:phases (modify-phases %standard-phases
256 (add-before 'configure 'enter-build-directory
262 (add-after 'unpack 'patch-tiny-process-library
264 (with-directory-excursion "lib/tiny-process-library"
265 (substitute* '("process_unix.cpp"
267 (("/bin/sh") (which "sh"))))
269 (add-after 'unpack 'disable-git-test
271 (substitute* "tests/CMakeLists.txt"
272 ;; Disable the git test, as it requires the full checkout.
273 (("add_test\\(git_test.*\\)") ""))
275 (add-before 'check 'pre-check
276 (lambda* (#:key inputs #:allow-other-keys)
277 ;; Tests do not expect HOME to be empty.
278 (setenv "HOME" "/etc")
280 ;; Most tests require an X server.
281 (let ((xorg-server (assoc-ref inputs "xorg-server"))
283 (setenv "DISPLAY" display)
284 (system (string-append xorg-server "/bin/Xvfb "
287 (add-after 'install 'wrap
288 (lambda* (#:key inputs outputs #:allow-other-keys)
289 ;; The package needs GTK+ and GtkSourceView on XDG_DATA_DIRS
290 ;; for syntax highlighting to work. shared-mime-info is
291 ;; necessary for MIME handling.
292 ;; XXX: Ideally we'd reuse glib-or-gtk-wrap here, but it
293 ;; does not pick up $gtksourceview/share/gtksourceview-3.0.
294 (let ((out (assoc-ref outputs "out"))
295 (gtk+ (assoc-ref inputs "gtk+"))
296 (gtksourceview (assoc-ref inputs "gtksourceview"))
297 (shared-mime-info (assoc-ref inputs "shared-mime-info")))
298 (wrap-program (string-append out "/bin/juci")
299 `("XDG_DATA_DIRS" ":" prefix
302 (string-append pkg "/share"))
303 (list out gtk+ gtksourceview shared-mime-info))
307 `(("pkg-config" ,pkg-config)
308 ("xorg-server" ,xorg-server-for-tests)))
312 ("ctags" ,universal-ctags)
314 ("gtksourceviewmm" ,gtksourceviewmm)
315 ("libclang" ,clang-10) ;XXX: must be the same version as Mesas LLVM
316 ("libgit2" ,libgit2)))
317 (synopsis "Lightweight C++ IDE")
319 "juCi++ is a small @dfn{IDE} (Integrated Development Environment)
320 designed especially towards libclang with speed, stability, and ease of use
323 It supports autocompletion, on-the-fly warnings and errors, syntax
324 highlighting, and integrates with Git as well as the CMake and Meson build
326 (license license:expat)))
328 (define-public leafpad
334 (uri (string-append "mirror://savannah/"
335 "leafpad/leafpad-" version ".tar.gz"))
338 "0b0az2wvqgvam7w0ns1j8xp2llslm1rx6h7zcsy06a7j0yp257cm"))))
339 (build-system glib-or-gtk-build-system)
341 `(("intltool" ,intltool)
342 ("pkg-config" ,pkg-config)))
345 (home-page "http://tarot.freeshell.org/leafpad/")
346 (synopsis "GTK+ based text editor")
347 (description "Leafpad is a GTK+ text editor that emphasizes simplicity. As
348 development focuses on keeping weight down to a minimum, only the most essential
349 features are implemented in the editor. Leafpad is simple to use, is easily
350 compiled, requires few libraries, and starts up quickly. ")
351 (license license:gpl2+)))
359 (uri (string-append "https://sites.google.com/site/e3editor/Home/"
360 "e3-" version ".tgz"))
363 "0919kadkas020maqq37852isnzp053q2fnws2zh3mz81d1jiviak"))
364 (modules '((guix build utils)))
366 ;; Remove pre-built binaries.
368 (delete-file-recursively "bin")
370 (build-system gnu-build-system)
373 #:make-flags (list (string-append "PREFIX="
374 (assoc-ref %outputs "out")))
375 #:phases (modify-phases %standard-phases
376 (delete 'configure))))
379 (home-page "https://sites.google.com/site/e3editor/")
380 (synopsis "Tiny text editor written in assembly")
382 "e3 is a micro text editor with an executable code size between 3800 and
383 35000 bytes. Except for ``syntax highlighting'', the e3 binary supports all
384 of the basic functions one expects plus built in arithmetic calculations.
385 UTF-8 coding of unicode characters is supported as well. e3 can use
386 Wordstar-, EMACS-, Pico, Nedit or vi-like key bindings. e3 can be used on
387 16, 32, and 64-bit CPUs.")
388 (supported-systems '("x86_64-linux" "i686-linux"))
389 (license license:gpl2+)))
398 (url "https://github.com/hboetes/mg")
400 (file-name (git-file-name name version))
403 "14vrm8lvwksf697sqks7xfd1xaqjlqjc9afjk33sksq5p27wr203"))
404 (modules '((guix build utils)))
406 (substitute* "GNUmakefile"
409 (build-system gnu-build-system)
411 `(("pkg-config" ,pkg-config)))
414 ("ncurses" ,ncurses)))
416 ;; No test suite available.
418 #:make-flags (list (string-append "prefix=" %output)
420 #:phases (modify-phases %standard-phases
421 (delete 'configure) ; no configure script
422 (add-before 'build 'correct-location-of-difftool
424 (substitute* "buffer.c"
428 (add-before 'install 'patch-tutorial-location
429 (lambda* (#:key outputs #:allow-other-keys)
431 (("/usr") (assoc-ref outputs "out")))
433 (add-after 'install 'install-tutorial
434 (lambda* (#:key outputs #:allow-other-keys)
435 (let* ((out (assoc-ref outputs "out"))
436 (doc (string-append out "/share/doc/mg")))
437 (install-file "tutorial" doc)
439 (home-page "https://homepage.boetes.org/software/mg/")
440 (synopsis "Microscopic GNU Emacs clone")
442 "Mg (@command{mg}) is a GNU Emacs style editor, with which it is
443 \"broadly\" compatible. This is a portable version of the mg maintained by the
445 (license license:public-domain)))
447 (define-public qemacs
454 (uri (string-append "https://bellard.org/qemacs/"
455 "qemacs-" version ".tar.gz"))
457 (base32 "156z4wpj49i6j388yjird5qvrph7hz0grb4r44l4jf3q8imadyrg"))))
458 (build-system gnu-build-system)
460 `(#:tests? #f ;no test
462 (modify-phases %standard-phases
463 (add-before 'build 'build-qhtml
464 ;; Build fails without first creating qHTML library.
465 (lambda _ (invoke "make" "-C" "libqhtml")))
466 (add-before 'install 'fix-man-pages-directory
467 ;; Install in $out/share/man instead of $out/man.
469 (substitute* "Makefile"
470 (("/man/man1" all) (string-append "/share" all)))
472 (add-before 'install 'create-directories
473 ;; Ensure directories exist before installing files.
474 (lambda* (#:key outputs #:allow-other-keys)
475 (let ((out (assoc-ref outputs "out")))
476 (for-each (lambda (d) (mkdir-p (string-append out d)))
477 '("/bin" "/share/man/man1" "/share/qe"))
479 (add-after 'install 'install-extra-documentation
480 ;; Install sample configuration file, Info, and HTML manual.
481 (lambda* (#:key outputs #:allow-other-keys)
482 (let* ((share (string-append (assoc-ref outputs "out") "/share"))
483 (doc (string-append share "/doc/" ,name "-" ,version))
484 (html (string-append share "/html"))
485 (info (string-append share "/info"))
486 (makeinfo (string-append (assoc-ref %build-inputs "texinfo")
488 ;; First fix Texinfo documentation, create appropriate
489 ;; directories, then generate Info and HTML files there.
490 (substitute* "qe-doc.texi"
491 (("^M-([{}])" _ bracket) (string-append "M-@" bracket)))
492 (for-each (lambda (d) (mkdir-p d)) (list html info))
493 (invoke makeinfo "qe-doc.texi" "-o" info)
494 (invoke makeinfo "qe-doc.texi" "--html" "--no-split" "-o" html)
495 ;; Install sample configuration file.
496 (install-file "config.eg" doc)
499 `(("texinfo" ,texinfo)))
504 (home-page "https://bellard.org/qemacs/")
505 (synopsis "Small but powerful text editor")
506 (description "QEmacs (for Quick Emacs) is a very small but
507 powerful editor. It has features that even big editors lack:
511 @item Full screen editor with an Emacs look and feel with all Emacs
512 common features: multi-buffer, multi-window, command mode, universal
513 argument, keyboard macros, config file with C-like syntax, minibuffer
514 with completion and history.
516 @item Can edit files of hundreds of Megabytes without being slow by
517 using a highly optimized internal representation and by mmaping the
520 @item Full Unicode support, including multi charset handling (8859-x,
521 UTF8, SJIS, EUC-JP, ...) and bidirectional editing respecting the
522 Unicode bidi algorithm. Arabic and Indic scripts handling (in
525 @item WYSIWYG HTML/XML/CSS2 mode graphical editing. Also supports
526 Lynx like rendering on VT100 terminals.
528 @item WYSIWYG DocBook mode based on XML/CSS2 renderer.
530 @item C mode: coloring with immediate update. Emacs like auto-indent.
532 @item Shell mode: colorized VT100 emulation so that your shell work
533 exactly as you expect. Compile mode with next/prev error.
535 @item Input methods for most languages, including Chinese (input
536 methods come from the Yudit editor).
538 @item Hexadecimal editing mode with insertion and block commands.
539 Unicode hexa editing is also supported.
541 @item Works on any VT100 terminals without termcap. UTF8 VT100
542 support included with double width glyphs.
544 @item X11 support. Support multiple proportional fonts at the same
545 time (as XEmacs). X Input methods supported. Xft extension supported
546 for anti aliased font display.
548 @item Small! Full version (including HTML/XML/CSS2/DocBook rendering
549 and all charsets): 200KB big. Basic version (without bidir/unicode
550 scripts/input/X11/C/Shell/HTML/Dired): 49KB.
552 (license license:lgpl2.1+)))
554 (define-public ghostwriter
561 (url "https://github.com/wereturtle/ghostwriter")
562 (commit (string-append "v" version))))
563 (file-name (git-file-name name version))
566 "0jc6szfh5sdnafhwsr1xv7cn1fznniq58bix41hb9wlbkvq7wzi6"))))
567 (build-system gnu-build-system)
569 `(("pkg-config" ,pkg-config)
570 ("qttools" ,qttools))) ; for lrelease
572 `(("hunspell" ,hunspell)
574 ("qtdeclarative" ,qtdeclarative)
575 ("qtmultimedia" ,qtmultimedia)
576 ("qtquickcontrols" ,qtquickcontrols)
578 ("qtwebchannel" ,qtwebchannel)))
579 (propagated-inputs ; To get native-search-path
580 `(("qtwebengine" ,qtwebengine)))
583 (modify-phases %standard-phases
585 (lambda* (#:key outputs #:allow-other-keys)
586 (let ((out (assoc-ref outputs "out")))
587 (invoke "qmake" (string-append "PREFIX=" out)))))
588 (add-after 'configure 'create-translations
590 ;; `lrelease` will not overwrite, so delete existing .qm files
591 (for-each delete-file (find-files "translations" ".*\\.qm"))
592 (apply invoke "lrelease" (find-files "translations" ".*\\.ts"))))
593 ;; Ensure that icons are found at runtime.
594 (add-after 'install 'wrap-executable
595 (lambda* (#:key inputs outputs #:allow-other-keys)
596 (let ((out (assoc-ref outputs "out")))
597 (wrap-program (string-append out "/bin/ghostwriter")
598 `("QT_PLUGIN_PATH" ":" prefix
599 ,(map (lambda (label)
600 (string-append (assoc-ref inputs label)
601 "/lib/qt5/plugins/"))
602 '("qtsvg" "qtmultimedia"))))))))))
603 (home-page "https://wereturtle.github.io/ghostwriter/")
604 (synopsis "Write without distractions")
606 "@code{ghostwriter} provides a relaxing, distraction-free writing
607 environment with Markdown markup.")
608 (license license:gpl3+))) ; icons/* under CC-BY-SA3
610 (define-public manuskript
618 (url "https://github.com/olivierkes/manuskript")
620 (file-name (git-file-name name version))
622 (base32 "1l6l9k6k69yv8xqpll0zv9cwdqqg4zvxy90l6sx5nv2yywh5crla"))))
623 (build-system python-build-system)
625 `(#:tests? #f ;no test
627 (modify-phases %standard-phases
631 (lambda* (#:key outputs #:allow-other-keys)
632 (let* ((out (assoc-ref outputs "out"))
633 (share (string-append out "/share/manuskript")))
638 (let ((destination (string-append share "/" d)))
639 (mkdir-p destination)
640 (copy-recursively d destination)))
641 '("bin" "i18n" "icons" "libs" "manuskript" "resources"))
642 ;; Install documentation.
643 (let ((doc (string-append out
644 "/doc/manuskript-" ,version
645 "/sample-projects")))
647 (copy-recursively "sample-projects" doc))
648 ;; Wrap executable in "$out/share/manuskript/bin" and
649 ;; link to it from "$out/bin".
650 (let ((bin (string-append out "/bin"))
651 (executable (string-append share "/bin/manuskript")))
652 (wrap-program executable
653 (list "PYTHONPATH" 'prefix (list (getenv "PYTHONPATH"))))
655 (with-directory-excursion bin
656 (symlink (string-append share "/bin/manuskript")
658 ;; Install icons and create .desktop file.
659 (let ((apps (string-append out "/share/applications"))
660 (icons-dir (string-append out "/share/pixmaps")))
661 (install-file "icons/Manuskript/manuskript.svg" icons-dir)
663 (make-desktop-entry-file (string-append apps "/manuskript.desktop")
665 #:mime-type "application/x-manuskript-book;"
666 #:exec (string-append out "/bin/manuskript %f")
667 #:comment '((#f "Tool for writers")
668 ("es" "Herramienta para escritores/as"))
669 #:keywords "manuskript;office;write;edit;novel;text;msk"
673 #:categories "Office;WordProcessor;"))
677 ("python-lxml" ,python-lxml)
678 ("python-markdown" ,python-markdown)
679 ("python-pyqt" ,python-pyqt)
681 (home-page "http://www.theologeek.ch/manuskript/")
682 (synopsis "Tool for writers")
683 (description "Manuskript provides a rich environment to help
684 writers create their first draft and then further refine and edit
685 their masterpiece. With Manuskript you can:
688 @item Grow your premise from one sentence, to a paragraph, to a full
690 @item Create characters,
691 @item Conceive plots,
692 @item Construct outlines (Outline mode and/or Index cards),
693 @item Write with focus (Distraction free mode),
696 @item Edit and re-organize chapters and scenes,
697 @item View Story line,
698 @item Compose with fiction or non-fiction templates and writing modes,
699 @item Import and export document formats such as HTML, ePub,
700 OpenDocument, DocX, and more.
703 Additionally Manuskript can help in many more ways with a spell
704 checker, markdown highlighter, frequency analyzer, and automatic save
705 in plain text file format.")
706 (license license:gpl3+)))
708 (define-public editorconfig-core-c
710 (name "editorconfig-core-c")
716 (url "https://github.com/editorconfig/editorconfig-core-c")
717 (commit (string-append "v" version))))
718 (file-name (git-file-name name version))
720 (base32 "1311fhh2jfsja2hhk3nwb6nijlq03jw8dk35cwbrac0p9jvy03jx"))))
721 (build-system cmake-build-system)
724 (modify-phases %standard-phases
725 (add-after 'unpack 'insert-tests
726 (lambda* (#:key inputs #:allow-other-keys)
727 (let ((tests (assoc-ref inputs "tests")))
728 (copy-recursively tests "tests"))
730 (add-after 'install 'delete-static-library
731 (lambda* (#:key outputs #:allow-other-keys)
732 (let* ((out (assoc-ref outputs "out"))
733 (lib (string-append out "/lib")))
734 (with-directory-excursion lib
735 (delete-file "libeditorconfig_static.a"))
742 (url "https://github.com/editorconfig/editorconfig-core-test")
743 ;; The tests submodule commit matching this package's version.
744 (commit "48610d43b7455af12195473377f93c4ceea654f5")))
745 (file-name (git-file-name "editorconfig-core-test" version))
747 (base32 "1s29p4brmcsc3xsww3gk85dg45f1kk3iykh1air3ij0hymf5dyqy"))))))
750 (home-page "https://editorconfig.org/")
751 (synopsis "EditorConfig core library written in C")
752 (description "EditorConfig makes it easy to maintain the correct coding
753 style when switching between different text editors and between different
754 projects. The EditorConfig project maintains a file format and plugins for
755 various text editors which allow this file format to be read and used by those
757 (license license:bsd-2)))
759 (define-public texmacs
766 (uri (string-append "https://www.texmacs.org/Download/ftp/tmftp/"
767 "source/TeXmacs-" version "-src.tar.gz"))
769 (base32 "118sk75k0k9pkyfyx000n2ypab8vm1lz5zxkkdmsi5nwyr3rp56s"))))
770 (build-system gnu-build-system)
772 `(("pkg-config" ,pkg-config)
773 ("xdg-utils" ,xdg-utils))) ;for xdg-icon-resource
775 `(("freetype" ,freetype)
778 ("python" ,python-wrapper)
782 `(#:tests? #f ; no check target
784 (modify-phases %standard-phases
785 (add-after 'unpack 'fix-icon-directory
786 (lambda* (#:key outputs #:allow-other-keys)
787 (let ((out (assoc-ref outputs "out")))
788 (substitute* "packages/linux/icons.sh"
790 (string-append out "/share")))
792 (add-after 'install 'install-desktop-file
793 (lambda* (#:key outputs #:allow-other-keys)
794 ;; Install desktop file.
795 (let* ((out (assoc-ref outputs "out"))
796 (apps (string-append out "/share/applications"))
797 (source "TeXmacs/misc/mime/texmacs.desktop"))
798 (install-file source apps)
800 (add-before 'configure 'gzip-flags
802 (substitute* "Makefile.in"
803 (("^GZIP = gzip -f") "GZIP = gzip -f -n")))))))
804 (synopsis "Editing platform with special features for scientists")
806 "GNU TeXmacs is a text editing platform which is specialized for
807 scientists. It is ideal for editing structured documents with different types
808 of content. It has robust support for mathematical formulas and plots. It
809 can also act as an interface to external mathematical programs such as R and
810 Octave. TeXmacs is completely extensible via Guile.")
811 (license license:gpl3+)
812 (home-page "https://www.texmacs.org/tmweb/home/welcome.en.html")))
814 (define-public scintilla
821 (uri (let ((v (apply string-append (string-split version #\.))))
822 (string-append "https://www.scintilla.org/scintilla" v ".tgz")))
824 (base32 "1p62dq2fgdkvdn2clz1xjdj09acv87rbifl67zhlz7skqip31y9d"))))
825 (build-system gnu-build-system)
827 `(#:make-flags (list "GTK3=1" "CC=gcc" "-Cgtk")
828 #:tests? #f ;require un-packaged Pyside
830 (modify-phases %standard-phases
831 (delete 'configure) ;no configure script
833 ;; Upstream provides no install script.
834 (lambda* (#:key outputs #:allow-other-keys)
835 (let* ((out (assoc-ref outputs "out"))
836 (lib (string-append out "/lib"))
837 (include (string-append out "/include")))
838 (for-each (lambda (f) (install-file f lib))
839 (find-files "bin/" "\\.so$"))
840 (for-each (lambda (f) (install-file f include))
841 (find-files "include/" "."))
844 `(("pkg-config" ,pkg-config)
845 ("python" ,python-wrapper)))
848 (home-page "https://www.scintilla.org/")
849 (synopsis "Code editor for GTK+")
850 (description "Scintilla is a source code editing component for
851 GTK+. It has the usual features found in text editing components, as
852 well as some that are especially useful for editing and debugging
853 source code; these include support for syntax styling, error
854 indicators, code completion and call tips. Styling choices are more
855 open than with many editors: Scintilla lets you use proportional
856 fonts, bold and italics, multiple foreground and background colours,
857 and multiple fonts.")
858 (license license:hpnd)))
867 (uri (string-append "https://download.geany.org/"
868 "geany-" version ".tar.bz2"))
870 (base32 "060sachn33xpx3a609f09y97qq5ky17gvv686zbvrn618ij7bi8q"))))
871 (build-system gnu-build-system)
873 `(("autoconf" ,autoconf)
874 ("automake" ,automake)
877 ("intltool" ,intltool)
879 ("pkg-config" ,pkg-config)
880 ("python-docutils" ,python-docutils))) ;for rst2html
883 ;; FIXME: Geany bundles a 3.X release of Scintilla. It is not
884 ;; currently possible to replace it with our Scintilla package.
885 ;; ("scintilla" ,scintilla)
888 `(#:imported-modules ((guix build glib-or-gtk-build-system)
889 ,@%gnu-build-system-modules)
890 #:modules (((guix build glib-or-gtk-build-system) #:prefix glib-or-gtk:)
891 (guix build gnu-build-system)
894 (modify-phases %standard-phases
895 (add-after 'install 'glib-or-gtk-wrap
896 (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-wrap)))))
897 (home-page "https://www.geany.org")
898 (synopsis "Fast and lightweight IDE")
899 (description "Geany is a small and fast Integrated Development
900 Environment (IDE) that only has a few dependencies on other packages and is as
901 independent as possible from special desktop environments like KDE or GNOME.
903 The basic features of Geany are:
905 @item syntax highlighting
906 @item code completion
907 @item auto completion of often constructed constructs like if, for and while
908 @item auto completion of XML and HTML tags
911 @item many supported filetypes like C, Java, PHP, HTML, Python, Perl, Pascal
913 @item embedded terminal emulation
914 @item extensibility through plugins
916 (license license:gpl2+)))
921 ;; Stable release is 1.8. However, this development version
922 ;; introduces support for UTF-8.
926 (uri (string-append "http://www.moria.de/~michael/fe/"
927 "fe-" version ".tar.gz"))
930 "1hwws7si1752z6hp61zxznvgsb6846lp8zl1hn5ddhsbafwalwb9"))))
931 (build-system gnu-build-system)
933 `(#:tests? #f ;no test
934 ;; Sendmail is only used to send a crash log. Disable the
935 ;; feature since it is (1) undocumented (2) not very useful.
936 #:configure-flags (list "--disable-sendmail")
938 (modify-phases %standard-phases
939 (add-after 'install 'install-doc
940 (lambda* (#:key outputs #:allow-other-keys)
941 (let* ((out (assoc-ref outputs "out"))
942 (doc (string-append out "/share/doc/" ,name "-" ,version)))
943 (for-each (lambda (f) (install-file f doc))
944 '("fe.doc" "fe.html" "fe.ps" "feref.ps" "README"))
947 `(("gettext" ,gettext-minimal)))
949 `(("ncurses" ,ncurses)))
950 (home-page "http://www.moria.de/~michael/fe/")
951 (synopsis "Small folding editor")
952 (description "Fe is a small folding editor. It folds
953 arbitrary text regions; it is not bound to syntactic units.
955 Fe has no configuration or extension language and requires no setup.
956 Its user interface is emacs-like and it has menus for the very most
957 important functions to help beginners. Further there is a reference
961 @item Regions and Emacs-like kill ring
962 @item Incremental search
963 @item Keyboard macros
964 @item Editing binary files
965 @item Multiple windows and views
966 @item Compose function for Latin 1 characters
968 (license license:gpl2+)))
977 (url "https://github.com/vigna/ne")
979 (file-name (git-file-name name version))
982 "01aglnsfljlvx0wvyvpjfn4y88jf450a06qnj9a8lgdqv1hdkq1a"))))
983 (build-system gnu-build-system)
986 ("texinfo" ,texinfo)))
988 `(("ncurses" ,ncurses)))
993 (string-append "PREFIX=" (assoc-ref %outputs "out"))
994 (string-append "LDFLAGS=-L" (assoc-ref %build-inputs "ncurses")
997 (modify-phases %standard-phases
1000 (substitute* "src/makefile"
1001 (("-lcurses") "-lncurses"))
1003 (home-page "http://ne.di.unimi.it/")
1004 (synopsis "Text editor with menu bar")
1005 (description "This package provides a modeless text editor with menu bar.
1006 It supports syntax highlighting, regular expressions, configurable menus,
1007 keybindings, autocomplete and unlimited undo. It can pipe a marked block
1008 of text through any command line filter. It can also open very large binary
1009 files. It was originally developed on the Amiga 3000T.")
1010 (license license:gpl3+)))
1012 (define-public hexer
1019 (uri (string-append "https://devel.ringlet.net/files/editors/hexer/"
1020 "hexer-" version ".tar.xz"))
1022 (base32 "157z17z8qivdin2km2wp86x1bv1nx15frrwcz11mk0l3ab74mf76"))))
1023 (build-system gnu-build-system)
1025 `(#:tests? #f ;no upstream tests
1028 (string-append "PREFIX=" (assoc-ref %outputs "out"))
1029 (string-append "LTERMCAP=-lncurses")
1030 (string-append "LDFLAGS=-L" (assoc-ref %build-inputs "ncurses")
1033 (modify-phases %standard-phases
1034 (delete 'configure)))) ;no configure script
1036 `(("ncurses" ,ncurses)))
1037 (home-page "https://devel.ringlet.net/editors/hexer/")
1038 (synopsis "Multi buffer editor for binary files with vi-like interface")
1039 (description "Hexer is a multi-buffer editor for binary files for Unix-like
1040 systems that displays its buffer(s) as a hex dump. The user interface is kept
1042 (license license:bsd-3)))
1044 (define-public virtaal
1050 (uri (string-append "mirror://sourceforge/translate/Virtaal/"
1051 version "/virtaal-" version ".tar.bz2"))
1054 "0cyimjp3191qlmw6n0ipqdr9xr0cq4f6dqvz4rl9q31h6l3kywf9"))))
1055 (build-system python-build-system)
1057 `(#:python ,python-2
1058 #:use-setuptools? #f
1059 #:tests? #f ;; Failing tests
1061 (modify-phases %standard-phases
1062 (add-before 'build 'configure
1063 (lambda* (#:key outputs #:allow-other-keys)
1064 ;; Set data file path to absolute store path.
1065 (substitute* "virtaal/common/pan_app.py"
1066 (("file_discovery\\.get_abs_data_filename.*")
1067 (string-append "os.path.join('"
1068 (assoc-ref outputs "out")
1069 "/share', *path_parts)"))))))))
1071 `(("python2-lxml" ,python2-lxml)
1072 ("python2-pygtk" ,python2-pygtk)
1073 ("python2-simplejson" ,python2-simplejson)
1074 ("python2-translate-toolkit" ,python2-translate-toolkit)
1075 ("python2-pycurl" ,python2-pycurl)))
1076 (synopsis "Graphical translation tool")
1077 (description "Virtaal is a powerful yet simple translation tool with an
1078 uncluttered user interface. It supports a multitude of translation formats
1079 provided by the Translate Toolkit, including XLIFF and PO.")
1080 (home-page "https://virtaal.translatehouse.org/")
1081 (license license:gpl2+)))