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))
78 (version "0.6") ; also update the vis-test input
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"
92 (modify-phases %standard-phases
93 (add-after 'unpack 'unpack-test-suite
94 (lambda* (#:key inputs #:allow-other-keys)
95 (let ((vis-test (assoc-ref inputs "vis-test")))
96 (copy-recursively vis-test "test")
98 (delete 'check) ; the tests need a wrapped vis
99 (add-after 'install 'wrap-binary
100 (lambda* (#:key inputs outputs #:allow-other-keys)
101 (let* ((out (assoc-ref outputs "out"))
102 (lpeg (assoc-ref inputs "lua-lpeg"))
103 (lua-version ,(version-major+minor (package-version lua)))
104 (LUA_PATH (string-append lpeg "/share/lua/"
105 lua-version "/?.lua"))
106 (LUA_CPATH (string-append lpeg "/lib/lua/"
107 lua-version "/?.so")))
108 (wrap-program (string-append out "/bin/vis")
109 `("LUA_PATH" ":" prefix (,LUA_PATH))
110 `("LUA_CPATH" ":" prefix (,LUA_CPATH)))
112 (add-after 'wrap-binary 'check
113 (assoc-ref %standard-phases 'check))
114 (add-before 'check 'set-up-tests
115 (lambda* (#:key outputs #:allow-other-keys)
116 (let ((out (assoc-ref outputs "out")))
117 ;; DEFAULT_COMPILER is hard-coded here.
118 (substitute* "test/core/ccan-config.c"
120 (format #f "\"~a\"" ,(cc-for-target))))
122 ;; Use the ‘vis’ executable that we wrapped above.
123 (install-file (string-append out "/bin/vis") ".")
125 ;; XXX Delete 2 failing tests. TODO: make them not fail. :-)
126 (for-each delete-file
127 (find-files "test/vis/selections" "^complement"))
134 (url "https://github.com/martanne/vis-test")
135 (commit "4c4f6645de77f697a45899e8645e0c2bbdc7208a")))
137 (base32 "10vh1pxsqw88a5xwh5irkm85xr66dbycmgpmabyw9h0vm14cvcz2"))
138 (file-name (git-file-name "vis-test" version))))))
139 (inputs `(("lua" ,lua)
141 ("libtermkey" ,libtermkey)
142 ("lua-lpeg" ,lua-lpeg)
144 (synopsis "Vim-like text editor")
146 "Vis aims to be a modern, legacy free, simple yet efficient vim-like text
147 editor. It extends vim's modal editing with built-in support for multiple
148 cursors/selections and combines it with sam's structural regular expression
149 based command language.")
150 (home-page "https://github.com/martanne/vis")
151 (license (list license:isc ; Main distribution.
152 license:public-domain ; map.[ch]
153 license:expat)))) ; lexers and libutf.[ch]
155 (define-public kakoune
158 (version "2020.09.01")
162 (uri (string-append "https://github.com/mawww/kakoune/"
163 "releases/download/v" version "/"
164 "kakoune-" version ".tar.bz2"))
166 (base32 "0x81rxy7bqnhd9374g5ypy4w4nxmm0vnqw6b52bf62jxdg2qj6l6"))))
167 (build-system gnu-build-system)
170 (list (string-append "PREFIX=" (assoc-ref %outputs "out")))
172 (modify-phases %standard-phases
173 (add-after 'unpack 'patch-source
175 ;; kakoune uses confstr with _CS_PATH to find out where to find
176 ;; a posix shell, but this doesn't work in the build
177 ;; environment. This substitution just replaces that result
178 ;; with the "sh" path.
179 (substitute* "src/shell_manager.cc"
180 (("if \\(m_shell.empty\\(\\)\\)" line)
181 (string-append "m_shell = \"" (which "sh")
184 (delete 'configure) ; no configure script
185 ;; kakoune requires us to be in the src/ directory to build.
186 (add-before 'build 'chdir
187 (lambda _ (chdir "src") #t)))))
189 `(("asciidoc" ,asciidoc)
190 ("pkg-config" ,pkg-config)
193 `(("ncurses" ,ncurses)))
194 (synopsis "Vim-inspired code editor")
196 "Kakoune is a code editor heavily inspired by Vim, as such most of its
197 commands are similar to Vi's ones, and it shares Vi's \"keystrokes as a text
198 editing language\" model. Kakoune has a strong focus on interactivity, most
199 commands provide immediate and incremental results, while still being
200 competitive (as in keystroke count) with Vim.")
201 (home-page "https://kakoune.org/")
202 (license license:unlicense)))
211 (uri (string-append "https://sourceforge.net/projects/joe-editor/"
212 "files/JOE sources/joe-" version "/"
213 "joe-" version ".tar.gz"))
216 "1pmr598xxxm9j9dl93kq4dv36zyw0q2dh6d7x07hf134y9hhlnj9"))))
217 (build-system gnu-build-system)
218 (inputs `(("ncurses" ,ncurses)))
219 (home-page "http://joe-editor.sourceforge.net/")
220 (synopsis "Console screen editor")
222 "JOE is a powerful console screen editor with a \"mode-less\" user
223 interface similar to many user-friendly editors. JOE has some of the key
224 bindings and many of the powerful features of GNU Emacs.")
225 (license license:gpl3+)))
227 (define-public jucipp
231 (home-page "https://gitlab.com/cppit/jucipp")
234 (uri (git-reference (url home-page)
235 (commit (string-append "v" version))
236 ;; Two submodules are required which are
237 ;; developed alongside JuCi++ and difficult
238 ;; to package separately.
240 (file-name (git-file-name name version))
242 (base32 "177myy6qvjlb6j3f3i3xmfml5r3p9in8xzpvm0n59dn56s81gpnr"))))
243 (build-system cmake-build-system)
245 `(#:configure-flags '("-DBUILD_TESTING=ON"
247 ;; These arguments are here to facilitate an "in-source"
248 ;; build using "./build" instead of the default "../build".
249 ;; The test suite expects that to be the case.
252 #:phases (modify-phases %standard-phases
253 (add-before 'configure 'enter-build-directory
259 (add-after 'unpack 'patch-tiny-process-library
261 (with-directory-excursion "lib/tiny-process-library"
262 (substitute* '("process_unix.cpp"
264 (("/bin/sh") (which "sh"))))
266 (add-after 'unpack 'disable-git-test
268 (substitute* "tests/CMakeLists.txt"
269 ;; Disable the git test, as it requires the full checkout.
270 (("add_test\\(git_test.*\\)") ""))
272 (add-before 'check 'pre-check
273 (lambda* (#:key inputs #:allow-other-keys)
274 ;; Tests do not expect HOME to be empty.
275 (setenv "HOME" "/etc")
277 ;; Most tests require an X server.
278 (let ((xorg-server (assoc-ref inputs "xorg-server"))
280 (setenv "DISPLAY" display)
281 (system (string-append xorg-server "/bin/Xvfb "
284 (add-after 'install 'wrap
285 (lambda* (#:key inputs outputs #:allow-other-keys)
286 ;; The package needs GTK+ and GtkSourceView on XDG_DATA_DIRS
287 ;; for syntax highlighting to work. shared-mime-info is
288 ;; necessary for MIME handling.
289 ;; XXX: Ideally we'd reuse glib-or-gtk-wrap here, but it
290 ;; does not pick up $gtksourceview/share/gtksourceview-3.0.
291 (let ((out (assoc-ref outputs "out"))
292 (gtk+ (assoc-ref inputs "gtk+"))
293 (gtksourceview (assoc-ref inputs "gtksourceview"))
294 (shared-mime-info (assoc-ref inputs "shared-mime-info")))
295 (wrap-program (string-append out "/bin/juci")
296 `("XDG_DATA_DIRS" ":" prefix
299 (string-append pkg "/share"))
300 (list out gtk+ gtksourceview shared-mime-info))
304 `(("pkg-config" ,pkg-config)
305 ("xorg-server" ,xorg-server-for-tests)))
309 ("ctags" ,universal-ctags)
311 ("gtksourceviewmm" ,gtksourceviewmm)
312 ("libclang" ,clang-10) ;XXX: must be the same version as Mesas LLVM
313 ("libgit2" ,libgit2)))
314 (synopsis "Lightweight C++ IDE")
316 "juCi++ is a small @dfn{IDE} (Integrated Development Environment)
317 designed especially towards libclang with speed, stability, and ease of use
320 It supports autocompletion, on-the-fly warnings and errors, syntax
321 highlighting, and integrates with Git as well as the CMake and Meson build
323 (license license:expat)))
325 (define-public leafpad
331 (uri (string-append "mirror://savannah/"
332 "leafpad/leafpad-" version ".tar.gz"))
335 "0b0az2wvqgvam7w0ns1j8xp2llslm1rx6h7zcsy06a7j0yp257cm"))))
336 (build-system glib-or-gtk-build-system)
338 `(("intltool" ,intltool)
339 ("pkg-config" ,pkg-config)))
342 (home-page "http://tarot.freeshell.org/leafpad/")
343 (synopsis "GTK+ based text editor")
344 (description "Leafpad is a GTK+ text editor that emphasizes simplicity. As
345 development focuses on keeping weight down to a minimum, only the most essential
346 features are implemented in the editor. Leafpad is simple to use, is easily
347 compiled, requires few libraries, and starts up quickly. ")
348 (license license:gpl2+)))
356 (uri (string-append "https://sites.google.com/site/e3editor/Home/"
357 "e3-" version ".tgz"))
360 "0919kadkas020maqq37852isnzp053q2fnws2zh3mz81d1jiviak"))
361 (modules '((guix build utils)))
363 ;; Remove pre-built binaries.
365 (delete-file-recursively "bin")
367 (build-system gnu-build-system)
370 #:make-flags (list (string-append "PREFIX="
371 (assoc-ref %outputs "out")))
372 #:phases (modify-phases %standard-phases
373 (delete 'configure))))
376 (home-page "https://sites.google.com/site/e3editor/")
377 (synopsis "Tiny text editor written in assembly")
379 "e3 is a micro text editor with an executable code size between 3800 and
380 35000 bytes. Except for ``syntax highlighting'', the e3 binary supports all
381 of the basic functions one expects plus built in arithmetic calculations.
382 UTF-8 coding of unicode characters is supported as well. e3 can use
383 Wordstar-, EMACS-, Pico, Nedit or vi-like key bindings. e3 can be used on
384 16, 32, and 64-bit CPUs.")
385 (supported-systems '("x86_64-linux" "i686-linux"))
386 (license license:gpl2+)))
395 (url "https://github.com/hboetes/mg")
397 (file-name (git-file-name name version))
400 "14vrm8lvwksf697sqks7xfd1xaqjlqjc9afjk33sksq5p27wr203"))
401 (modules '((guix build utils)))
403 (substitute* "GNUmakefile"
406 (build-system gnu-build-system)
408 `(("pkg-config" ,pkg-config)))
411 ("ncurses" ,ncurses)))
413 ;; No test suite available.
415 #:make-flags (list (string-append "prefix=" %output)
417 #:phases (modify-phases %standard-phases
418 (delete 'configure) ; no configure script
419 (add-before 'build 'correct-location-of-difftool
421 (substitute* "buffer.c"
425 (add-before 'install 'patch-tutorial-location
426 (lambda* (#:key outputs #:allow-other-keys)
428 (("/usr") (assoc-ref outputs "out")))
430 (add-after 'install 'install-tutorial
431 (lambda* (#:key outputs #:allow-other-keys)
432 (let* ((out (assoc-ref outputs "out"))
433 (doc (string-append out "/share/doc/mg")))
434 (install-file "tutorial" doc)
436 (home-page "https://homepage.boetes.org/software/mg/")
437 (synopsis "Microscopic GNU Emacs clone")
439 "Mg (@command{mg}) is a GNU Emacs style editor, with which it is
440 \"broadly\" compatible. This is a portable version of the mg maintained by the
442 (license license:public-domain)))
444 (define-public qemacs
451 (uri (string-append "https://bellard.org/qemacs/"
452 "qemacs-" version ".tar.gz"))
454 (base32 "156z4wpj49i6j388yjird5qvrph7hz0grb4r44l4jf3q8imadyrg"))))
455 (build-system gnu-build-system)
457 `(#:tests? #f ;no test
459 (modify-phases %standard-phases
460 (add-before 'build 'build-qhtml
461 ;; Build fails without first creating qHTML library.
462 (lambda _ (invoke "make" "-C" "libqhtml")))
463 (add-before 'install 'fix-man-pages-directory
464 ;; Install in $out/share/man instead of $out/man.
466 (substitute* "Makefile"
467 (("/man/man1" all) (string-append "/share" all)))
469 (add-before 'install 'create-directories
470 ;; Ensure directories exist before installing files.
471 (lambda* (#:key outputs #:allow-other-keys)
472 (let ((out (assoc-ref outputs "out")))
473 (for-each (lambda (d) (mkdir-p (string-append out d)))
474 '("/bin" "/share/man/man1" "/share/qe"))
476 (add-after 'install 'install-extra-documentation
477 ;; Install sample configuration file, Info, and HTML manual.
478 (lambda* (#:key outputs #:allow-other-keys)
479 (let* ((share (string-append (assoc-ref outputs "out") "/share"))
480 (doc (string-append share "/doc/" ,name "-" ,version))
481 (html (string-append share "/html"))
482 (info (string-append share "/info"))
483 (makeinfo (string-append (assoc-ref %build-inputs "texinfo")
485 ;; First fix Texinfo documentation, create appropriate
486 ;; directories, then generate Info and HTML files there.
487 (substitute* "qe-doc.texi"
488 (("^M-([{}])" _ bracket) (string-append "M-@" bracket)))
489 (for-each (lambda (d) (mkdir-p d)) (list html info))
490 (invoke makeinfo "qe-doc.texi" "-o" info)
491 (invoke makeinfo "qe-doc.texi" "--html" "--no-split" "-o" html)
492 ;; Install sample configuration file.
493 (install-file "config.eg" doc)
496 `(("texinfo" ,texinfo)))
501 (home-page "https://bellard.org/qemacs/")
502 (synopsis "Small but powerful text editor")
503 (description "QEmacs (for Quick Emacs) is a very small but
504 powerful editor. It has features that even big editors lack:
508 @item Full screen editor with an Emacs look and feel with all Emacs
509 common features: multi-buffer, multi-window, command mode, universal
510 argument, keyboard macros, config file with C-like syntax, minibuffer
511 with completion and history.
513 @item Can edit files of hundreds of Megabytes without being slow by
514 using a highly optimized internal representation and by mmaping the
517 @item Full Unicode support, including multi charset handling (8859-x,
518 UTF8, SJIS, EUC-JP, ...) and bidirectional editing respecting the
519 Unicode bidi algorithm. Arabic and Indic scripts handling (in
522 @item WYSIWYG HTML/XML/CSS2 mode graphical editing. Also supports
523 Lynx like rendering on VT100 terminals.
525 @item WYSIWYG DocBook mode based on XML/CSS2 renderer.
527 @item C mode: coloring with immediate update. Emacs like auto-indent.
529 @item Shell mode: colorized VT100 emulation so that your shell work
530 exactly as you expect. Compile mode with next/prev error.
532 @item Input methods for most languages, including Chinese (input
533 methods come from the Yudit editor).
535 @item Hexadecimal editing mode with insertion and block commands.
536 Unicode hexa editing is also supported.
538 @item Works on any VT100 terminals without termcap. UTF8 VT100
539 support included with double width glyphs.
541 @item X11 support. Support multiple proportional fonts at the same
542 time (as XEmacs). X Input methods supported. Xft extension supported
543 for anti aliased font display.
545 @item Small! Full version (including HTML/XML/CSS2/DocBook rendering
546 and all charsets): 200KB big. Basic version (without bidir/unicode
547 scripts/input/X11/C/Shell/HTML/Dired): 49KB.
549 (license license:lgpl2.1+)))
551 (define-public ghostwriter
558 (url "https://github.com/wereturtle/ghostwriter")
559 (commit (string-append "v" version))))
560 (file-name (git-file-name name version))
563 "0jc6szfh5sdnafhwsr1xv7cn1fznniq58bix41hb9wlbkvq7wzi6"))))
564 (build-system gnu-build-system)
566 `(("pkg-config" ,pkg-config)
567 ("qttools" ,qttools))) ; for lrelease
569 `(("hunspell" ,hunspell)
571 ("qtdeclarative" ,qtdeclarative)
572 ("qtmultimedia" ,qtmultimedia)
573 ("qtquickcontrols" ,qtquickcontrols)
575 ("qtwebchannel" ,qtwebchannel)))
576 (propagated-inputs ; To get native-search-path
577 `(("qtwebengine" ,qtwebengine)))
580 (modify-phases %standard-phases
582 (lambda* (#:key outputs #:allow-other-keys)
583 (let ((out (assoc-ref outputs "out")))
584 (invoke "qmake" (string-append "PREFIX=" out)))))
585 (add-after 'configure 'create-translations
587 ;; `lrelease` will not overwrite, so delete existing .qm files
588 (for-each delete-file (find-files "translations" ".*\\.qm"))
589 (apply invoke "lrelease" (find-files "translations" ".*\\.ts"))))
590 ;; Ensure that icons are found at runtime.
591 (add-after 'install 'wrap-executable
592 (lambda* (#:key inputs outputs #:allow-other-keys)
593 (let ((out (assoc-ref outputs "out")))
594 (wrap-program (string-append out "/bin/ghostwriter")
595 `("QT_PLUGIN_PATH" ":" prefix
596 ,(map (lambda (label)
597 (string-append (assoc-ref inputs label)
598 "/lib/qt5/plugins/"))
599 '("qtsvg" "qtmultimedia"))))))))))
600 (home-page "https://wereturtle.github.io/ghostwriter/")
601 (synopsis "Write without distractions")
603 "@code{ghostwriter} provides a relaxing, distraction-free writing
604 environment with Markdown markup.")
605 (license license:gpl3+))) ; icons/* under CC-BY-SA3
607 (define-public manuskript
615 (url "https://github.com/olivierkes/manuskript")
617 (file-name (git-file-name name version))
619 (base32 "1l6l9k6k69yv8xqpll0zv9cwdqqg4zvxy90l6sx5nv2yywh5crla"))))
620 (build-system python-build-system)
622 `(#:tests? #f ;no test
624 (modify-phases %standard-phases
628 (lambda* (#:key outputs #:allow-other-keys)
629 (let* ((out (assoc-ref outputs "out"))
630 (share (string-append out "/share/manuskript")))
635 (let ((destination (string-append share "/" d)))
636 (mkdir-p destination)
637 (copy-recursively d destination)))
638 '("bin" "i18n" "icons" "libs" "manuskript" "resources"))
639 ;; Install documentation.
640 (let ((doc (string-append out
641 "/doc/manuskript-" ,version
642 "/sample-projects")))
644 (copy-recursively "sample-projects" doc))
645 ;; Wrap executable in "$out/share/manuskript/bin" and
646 ;; link to it from "$out/bin".
647 (let ((bin (string-append out "/bin"))
648 (executable (string-append share "/bin/manuskript")))
649 (wrap-program executable
650 (list "PYTHONPATH" 'prefix (list (getenv "PYTHONPATH"))))
652 (with-directory-excursion bin
653 (symlink (string-append share "/bin/manuskript")
655 ;; Install icons and create .desktop file.
656 (let ((apps (string-append out "/share/applications"))
657 (icons-dir (string-append out "/share/pixmaps")))
658 (install-file "icons/Manuskript/manuskript.svg" icons-dir)
660 (make-desktop-entry-file (string-append apps "/manuskript.desktop")
662 #:mime-type "application/x-manuskript-book;"
663 #:exec (string-append out "/bin/manuskript %f")
664 #:comment '((#f "Tool for writers")
665 ("es" "Herramienta para escritores/as"))
666 #:keywords "manuskript;office;write;edit;novel;text;msk"
670 #:categories "Office;WordProcessor;"))
673 `(("ghc-pandoc" ,ghc-pandoc)
674 ("python-lxml" ,python-lxml)
675 ("python-markdown" ,python-markdown)
676 ("python-pyqt" ,python-pyqt)
678 (home-page "http://www.theologeek.ch/manuskript/")
679 (synopsis "Tool for writers")
680 (description "Manuskript provides a rich environment to help
681 writers create their first draft and then further refine and edit
682 their masterpiece. With Manuskript you can:
685 @item Grow your premise from one sentence, to a paragraph, to a full
687 @item Create characters,
688 @item Conceive plots,
689 @item Construct outlines (Outline mode and/or Index cards),
690 @item Write with focus (Distraction free mode),
693 @item Edit and re-organize chapters and scenes,
694 @item View Story line,
695 @item Compose with fiction or non-fiction templates and writing modes,
696 @item Import and export document formats such as HTML, ePub,
697 OpenDocument, DocX, and more.
700 Additionally Manuskript can help in many more ways with a spell
701 checker, markdown highlighter, frequency analyzer, and automatic save
702 in plain text file format.")
703 (license license:gpl3+)))
705 (define-public editorconfig-core-c
707 (name "editorconfig-core-c")
713 (url "https://github.com/editorconfig/editorconfig-core-c")
714 (commit (string-append "v" version))))
715 (file-name (git-file-name name version))
717 (base32 "1311fhh2jfsja2hhk3nwb6nijlq03jw8dk35cwbrac0p9jvy03jx"))))
718 (build-system cmake-build-system)
721 (modify-phases %standard-phases
722 (add-after 'unpack 'insert-tests
723 (lambda* (#:key inputs #:allow-other-keys)
724 (let ((tests (assoc-ref inputs "tests")))
725 (copy-recursively tests "tests"))
727 (add-after 'install 'delete-static-library
728 (lambda* (#:key outputs #:allow-other-keys)
729 (let* ((out (assoc-ref outputs "out"))
730 (lib (string-append out "/lib")))
731 (with-directory-excursion lib
732 (delete-file "libeditorconfig_static.a"))
739 (url "https://github.com/editorconfig/editorconfig-core-test")
740 ;; The tests submodule commit matching this package's version.
741 (commit "48610d43b7455af12195473377f93c4ceea654f5")))
742 (file-name (git-file-name "editorconfig-core-test" version))
744 (base32 "1s29p4brmcsc3xsww3gk85dg45f1kk3iykh1air3ij0hymf5dyqy"))))))
747 (home-page "https://editorconfig.org/")
748 (synopsis "EditorConfig core library written in C")
749 (description "EditorConfig makes it easy to maintain the correct coding
750 style when switching between different text editors and between different
751 projects. The EditorConfig project maintains a file format and plugins for
752 various text editors which allow this file format to be read and used by those
754 (license license:bsd-2)))
756 (define-public texmacs
763 (uri (string-append "https://www.texmacs.org/Download/ftp/tmftp/"
764 "source/TeXmacs-" version "-src.tar.gz"))
766 (base32 "1d590yyanh2ar88pd0ns4mf616bq1lq4cwg93m863anhir5irb82"))))
767 (build-system gnu-build-system)
769 `(("pkg-config" ,pkg-config)
770 ("xdg-utils" ,xdg-utils))) ;for xdg-icon-resource
772 `(("freetype" ,freetype)
775 ("python" ,python-wrapper)
778 `(#:tests? #f ; no check target
780 (modify-phases %standard-phases
781 (add-after 'unpack 'fix-icon-directory
782 (lambda* (#:key outputs #:allow-other-keys)
783 (let ((out (assoc-ref outputs "out")))
784 (substitute* "packages/linux/icons.sh"
786 (string-append out "/share")))
788 (add-before 'configure 'gzip-flags
790 (substitute* "Makefile.in"
791 (("^GZIP = gzip -f") "GZIP = gzip -f -n")))))))
792 (synopsis "Editing platform with special features for scientists")
794 "GNU TeXmacs is a text editing platform which is specialized for
795 scientists. It is ideal for editing structured documents with different types
796 of content. It has robust support for mathematical formulas and plots. It
797 can also act as an interface to external mathematical programs such as R and
798 Octave. TeXmacs is completely extensible via Guile.")
799 (license license:gpl3+)
800 (home-page "https://www.texmacs.org/tmweb/home/welcome.en.html")))
802 (define-public scintilla
809 (uri (let ((v (apply string-append (string-split version #\.))))
810 (string-append "https://www.scintilla.org/scintilla" v ".tgz")))
812 (base32 "1zjsb6iiqi4cw9r9md3xv8qyy86ssz11p680xn7vmllrxshxvs8y"))))
813 (build-system gnu-build-system)
815 `(#:make-flags (list "GTK3=1" "CC=gcc" "-Cgtk")
816 #:tests? #f ;require un-packaged Pyside
818 (modify-phases %standard-phases
819 (delete 'configure) ;no configure script
821 ;; Upstream provides no install script.
822 (lambda* (#:key outputs #:allow-other-keys)
823 (let* ((out (assoc-ref outputs "out"))
824 (lib (string-append out "/lib"))
825 (include (string-append out "/include")))
826 (for-each (lambda (f) (install-file f lib))
827 (find-files "bin/" "\\.so$"))
828 (for-each (lambda (f) (install-file f include))
829 (find-files "include/" "."))
832 `(("pkg-config" ,pkg-config)
833 ("python" ,python-wrapper)))
836 (home-page "https://www.scintilla.org/")
837 (synopsis "Code editor for GTK+")
838 (description "Scintilla is a source code editing component for
839 GTK+. It has the usual features found in text editing components, as
840 well as some that are especially useful for editing and debugging
841 source code; these include support for syntax styling, error
842 indicators, code completion and call tips. Styling choices are more
843 open than with many editors: Scintilla lets you use proportional
844 fonts, bold and italics, multiple foreground and background colours,
845 and multiple fonts.")
846 (license license:hpnd)))
855 (uri (string-append "https://download.geany.org/"
856 "geany-" version ".tar.bz2"))
858 (base32 "0gnm17cr4rf3pmkf0axz4a0fxwnvp55ji0q0lzy88yqbshyxv14i"))))
859 (build-system gnu-build-system)
861 `(("autoconf" ,autoconf)
862 ("automake" ,automake)
865 ("intltool" ,intltool)
867 ("pkg-config" ,pkg-config)
868 ("python-docutils" ,python-docutils))) ;for rst2html
871 ;; FIXME: Geany bundles a 3.X release of Scintilla. It is not
872 ;; currently possible to replace it with our Scintilla package.
873 ;; ("scintilla" ,scintilla)
876 `(#:imported-modules ((guix build glib-or-gtk-build-system)
877 ,@%gnu-build-system-modules)
878 #:modules (((guix build glib-or-gtk-build-system) #:prefix glib-or-gtk:)
879 (guix build gnu-build-system)
882 (modify-phases %standard-phases
883 (add-after 'install 'glib-or-gtk-wrap
884 (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-wrap)))))
885 (home-page "https://www.geany.org")
886 (synopsis "Fast and lightweight IDE")
887 (description "Geany is a small and fast Integrated Development
888 Environment (IDE) that only has a few dependencies on other packages and is as
889 independent as possible from special desktop environments like KDE or GNOME.
891 The basic features of Geany are:
893 @item syntax highlighting
894 @item code completion
895 @item auto completion of often constructed constructs like if, for and while
896 @item auto completion of XML and HTML tags
899 @item many supported filetypes like C, Java, PHP, HTML, Python, Perl, Pascal
901 @item embedded terminal emulation
902 @item extensibility through plugins
904 (license license:gpl2+)))
909 ;; Stable release is 1.8. However, this development version
910 ;; introduces support for UTF-8.
914 (uri (string-append "http://www.moria.de/~michael/fe/"
915 "fe-" version ".tar.gz"))
918 "1hwws7si1752z6hp61zxznvgsb6846lp8zl1hn5ddhsbafwalwb9"))))
919 (build-system gnu-build-system)
921 `(#:tests? #f ;no test
922 ;; Sendmail is only used to send a crash log. Disable the
923 ;; feature since it is (1) undocumented (2) not very useful.
924 #:configure-flags (list "--disable-sendmail")
926 (modify-phases %standard-phases
927 (add-after 'install 'install-doc
928 (lambda* (#:key outputs #:allow-other-keys)
929 (let* ((out (assoc-ref outputs "out"))
930 (doc (string-append out "/share/doc/" ,name "-" ,version)))
931 (for-each (lambda (f) (install-file f doc))
932 '("fe.doc" "fe.html" "fe.ps" "feref.ps" "README"))
935 `(("gettext" ,gettext-minimal)))
937 `(("ncurses" ,ncurses)))
938 (home-page "http://www.moria.de/~michael/fe/")
939 (synopsis "Small folding editor")
940 (description "Fe is a small folding editor. It folds
941 arbitrary text regions; it is not bound to syntactic units.
943 Fe has no configuration or extension language and requires no setup.
944 Its user interface is emacs-like and it has menus for the very most
945 important functions to help beginners. Further there is a reference
949 @item Regions and Emacs-like kill ring
950 @item Incremental search
951 @item Keyboard macros
952 @item Editing binary files
953 @item Multiple windows and views
954 @item Compose function for Latin 1 characters
956 (license license:gpl2+)))
965 (url "https://github.com/vigna/ne")
967 (file-name (git-file-name name version))
970 "01aglnsfljlvx0wvyvpjfn4y88jf450a06qnj9a8lgdqv1hdkq1a"))))
971 (build-system gnu-build-system)
974 ("texinfo" ,texinfo)))
976 `(("ncurses" ,ncurses)))
981 (string-append "PREFIX=" (assoc-ref %outputs "out"))
982 (string-append "LDFLAGS=-L" (assoc-ref %build-inputs "ncurses")
985 (modify-phases %standard-phases
988 (substitute* "src/makefile"
989 (("-lcurses") "-lncurses"))
991 (home-page "http://ne.di.unimi.it/")
992 (synopsis "Text editor with menu bar")
993 (description "This package provides a modeless text editor with menu bar.
994 It supports syntax highlighting, regular expressions, configurable menus,
995 keybindings, autocomplete and unlimited undo. It can pipe a marked block
996 of text through any command line filter. It can also open very large binary
997 files. It was originally developed on the Amiga 3000T.")
998 (license license:gpl3+)))
1000 (define-public hexer
1007 (uri (string-append "https://devel.ringlet.net/files/editors/hexer/"
1008 "hexer-" version ".tar.xz"))
1010 (base32 "157z17z8qivdin2km2wp86x1bv1nx15frrwcz11mk0l3ab74mf76"))))
1011 (build-system gnu-build-system)
1013 `(#:tests? #f ;no upstream tests
1016 (string-append "PREFIX=" (assoc-ref %outputs "out"))
1017 (string-append "LTERMCAP=-lncurses")
1018 (string-append "LDFLAGS=-L" (assoc-ref %build-inputs "ncurses")
1021 (modify-phases %standard-phases
1022 (delete 'configure)))) ;no configure script
1024 `(("ncurses" ,ncurses)))
1025 (home-page "https://devel.ringlet.net/editors/hexer/")
1026 (synopsis "Multi buffer editor for binary files with vi-like interface")
1027 (description "Hexer is a multi-buffer editor for binary files for Unix-like
1028 systems that displays its buffer(s) as a hex dump. The user interface is kept
1030 (license license:bsd-3)))