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–2021 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, 2021 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>
16 ;;; Copyright © 2021 aecepoglu <aecepoglu@fastmail.fm>
17 ;;; Copyright © 2021 Leo Famulari <leo@famulari.name>
18 ;;; Copyright © 2021 Pierre Langlois <pierre.langlois@gmx.com>
19 ;;; Copyright © 2021 Calum Irwin <calumirwin1@gmail.com>
21 ;;; This file is part of GNU Guix.
23 ;;; GNU Guix is free software; you can redistribute it and/or modify it
24 ;;; under the terms of the GNU General Public License as published by
25 ;;; the Free Software Foundation; either version 3 of the License, or (at
26 ;;; your option) any later version.
28 ;;; GNU Guix is distributed in the hope that it will be useful, but
29 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
30 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
31 ;;; GNU General Public License for more details.
33 ;;; You should have received a copy of the GNU General Public License
34 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
36 (define-module (gnu packages text-editors)
37 #:use-module (guix packages)
38 #:use-module (guix download)
39 #:use-module (guix git-download)
40 #:use-module (guix utils)
41 #:use-module (guix build-system cargo)
42 #:use-module (guix build-system cmake)
43 #:use-module (guix build-system gnu)
44 #:use-module (guix build-system glib-or-gtk)
45 #:use-module (guix build-system python)
46 #:use-module ((guix licenses) #:prefix license:)
47 #:use-module (gnu packages)
48 #:use-module (gnu packages aspell)
49 #:use-module (gnu packages assembly)
50 #:use-module (gnu packages autotools)
51 #:use-module (gnu packages base)
52 #:use-module (gnu packages boost)
53 #:use-module (gnu packages code)
54 #:use-module (gnu packages crates-io)
55 #:use-module (gnu packages documentation)
56 #:use-module (gnu packages fontutils)
57 #:use-module (gnu packages freedesktop)
58 #:use-module (gnu packages gcc)
59 #:use-module (gnu packages gettext)
60 #:use-module (gnu packages glib)
61 #:use-module (gnu packages gtk)
62 #:use-module (gnu packages guile)
63 #:use-module (gnu packages haskell-xyz)
64 #:use-module (gnu packages libbsd)
65 #:use-module (gnu packages libreoffice)
66 #:use-module (gnu packages llvm)
67 #:use-module (gnu packages lua)
68 #:use-module (gnu packages ncurses)
69 #:use-module (gnu packages pcre)
70 #:use-module (gnu packages perl)
71 #:use-module (gnu packages pkg-config)
72 #:use-module (gnu packages python)
73 #:use-module (gnu packages python-web)
74 #:use-module (gnu packages python-xyz)
75 #:use-module (gnu packages qt)
76 #:use-module (gnu packages regex)
77 #:use-module (gnu packages ruby)
78 #:use-module (gnu packages terminals)
79 #:use-module (gnu packages texinfo)
80 #:use-module (gnu packages version-control)
81 #:use-module (gnu packages xml)
82 #:use-module (gnu packages xorg))
87 (version "0.7") ; also update the vis-test input
92 (url "https://git.sr.ht/~martanne/vis")
93 (commit (string-append "v" version))))
95 (base32 "1g05ncsnk57kcqm9wsv6sz8b24kyzj8r5rfpa1wfwj8qkjzx3vji"))
96 (file-name (git-file-name name version))))
97 (build-system gnu-build-system)
99 `(#:test-target "test"
101 (modify-phases %standard-phases
102 (add-after 'unpack 'unpack-test-suite
103 (lambda* (#:key inputs #:allow-other-keys)
104 (let ((vis-test (assoc-ref inputs "vis-test")))
105 (copy-recursively vis-test "test")
107 (delete 'check) ; the tests need a wrapped vis
108 (add-after 'install 'wrap-binary
109 (lambda* (#:key inputs outputs #:allow-other-keys)
110 (let* ((out (assoc-ref outputs "out"))
111 (lpeg (assoc-ref inputs "lua-lpeg"))
112 (lua-version ,(version-major+minor (package-version lua)))
113 (LUA_PATH (string-append lpeg "/share/lua/"
114 lua-version "/?.lua"))
115 (LUA_CPATH (string-append lpeg "/lib/lua/"
116 lua-version "/?.so")))
117 (wrap-program (string-append out "/bin/vis")
118 `("LUA_PATH" ":" prefix (,LUA_PATH))
119 `("LUA_CPATH" ":" prefix (,LUA_CPATH)))
121 (add-after 'wrap-binary 'check
122 (assoc-ref %standard-phases 'check))
123 (add-before 'check 'set-up-tests
124 (lambda* (#:key outputs #:allow-other-keys)
125 (let ((out (assoc-ref outputs "out")))
126 ;; DEFAULT_COMPILER is hard-coded here.
127 (substitute* "test/core/ccan-config.c"
129 (format #f "\"~a\"" ,(cc-for-target))))
131 ;; Use the ‘vis’ executable that we wrapped above.
132 (install-file (string-append out "/bin/vis") ".")
134 ;; XXX Delete 2 failing tests. TODO: make them not fail. :-)
135 (for-each delete-file
136 (find-files "test/vis/selections" "^complement"))
143 (url "https://git.sr.ht/~martanne/vis-test")
144 (commit "bbd2f34ff788e87a51a74069069273ad83c44f1f")))
146 (base32 "1jsvg2lg3xqfgi79x08kx94mc34mh62ivca10vsci6fqsk68jbd0"))
147 (file-name (git-file-name "vis-test" version))))))
148 (inputs `(("lua" ,lua)
150 ("libtermkey" ,libtermkey)
151 ("lua-lpeg" ,lua-lpeg)
153 (synopsis "Vim-like text editor")
155 "Vis aims to be a modern, legacy free, simple yet efficient vim-like text
156 editor. It extends vim's modal editing with built-in support for multiple
157 cursors/selections and combines it with sam's structural regular expression
158 based command language.")
159 (home-page "https://github.com/martanne/vis")
160 (license (list license:isc ; Main distribution.
161 license:public-domain ; map.[ch]
162 license:expat)))) ; lexers and libutf.[ch]
164 (define-public kakoune
167 (version "2021.08.28")
171 (uri (string-append "https://github.com/mawww/kakoune/"
172 "releases/download/v" version "/"
173 "kakoune-" version ".tar.bz2"))
175 (base32 "1jvn4b9rma5jjvg3xz8nf224pbq3ry570j6qvc834wn5v3gxfvkg"))))
176 (build-system gnu-build-system)
179 (list (string-append "PREFIX=" (assoc-ref %outputs "out")))
181 (modify-phases %standard-phases
182 (add-after 'unpack 'patch-source
184 ;; kakoune uses confstr with _CS_PATH to find out where to find
185 ;; a posix shell, but this doesn't work in the build
186 ;; environment. This substitution just replaces that result
187 ;; with the "sh" path.
188 (substitute* "src/shell_manager.cc"
189 (("if \\(m_shell.empty\\(\\)\\)" line)
190 (string-append "m_shell = \"" (which "sh")
193 (delete 'configure) ; no configure script
194 ;; kakoune requires us to be in the src/ directory to build.
195 (add-before 'build 'chdir
196 (lambda _ (chdir "src") #t)))))
198 `(("gcc", gcc-10) ; See https://github.com/mawww/kakoune/issues/4318
199 ("asciidoc" ,asciidoc)
200 ("pkg-config" ,pkg-config)
202 (synopsis "Vim-inspired code editor")
204 "Kakoune is a code editor heavily inspired by Vim, as such most of its
205 commands are similar to Vi's ones, and it shares Vi's \"keystrokes as a text
206 editing language\" model. Kakoune has a strong focus on interactivity, most
207 commands provide immediate and incremental results, while still being
208 competitive (as in keystroke count) with Vim.")
209 (home-page "https://kakoune.org/")
210 (license license:unlicense)))
212 (define-public kak-lsp
220 (url "https://github.com/kak-lsp/kak-lsp")
221 (commit (string-append "v" version))))
222 (file-name (git-file-name name version))
223 (sha256 "1wfv2fy5ga6kc51zka3pak0hq97csm2l11bz74w3n1hrf5q9nnf8")))
224 (build-system cargo-build-system)
227 (("rust-crossbeam-channel" ,rust-crossbeam-channel-0.4)
228 ("rust-clap" ,rust-clap-2)
229 ("rust-daemonize" ,rust-daemonize-0.4)
230 ("rust-dirs" ,rust-dirs-2)
231 ("rust-enum_primitive" ,rust-enum-primitive-0.1)
232 ("rust-glob" ,rust-glob-0.3)
233 ("rust-itertools" ,rust-itertools-0.9)
234 ("rust-lsp-types" ,rust-lsp-types-0.80)
235 ("rust-jsonrpc-core" ,rust-jsonrpc-core-14)
236 ("rust-libc" ,rust-libc-0.2)
237 ("rust-rand" ,rust-rand-0.7)
238 ("rust-regex" ,rust-regex-1)
239 ("rust-ropey" ,rust-ropey-1)
240 ("rust-serde" ,rust-serde-1)
241 ("rust-serde_derive" ,rust-serde-derive-1)
242 ("rust-serde_json" ,rust-serde-json-1)
243 ("rust-slog" ,rust-slog-2)
244 ("rust-slog-scope" ,rust-slog-scope-4)
245 ("rust-sloggers" ,rust-sloggers-1)
246 ("rust-toml" ,rust-toml-0.5)
247 ("rust-url" ,rust-url-2)
248 ("rust-whoami" ,rust-whoami-0.8))))
249 (home-page "https://github.com/kak-lsp/kak-lsp")
250 (synopsis "Language Server Protocol (LSP) client for Kakoune")
252 "kak-lsp is a Language Server Protocol client for Kakoune implemented in
254 (license license:unlicense)))
256 (define-public parinfer-rust
258 (name "parinfer-rust")
264 (url "https://github.com/eraserhd/parinfer-rust")
265 (commit (string-append "v" version))))
267 (base32 "0hj5in5h7pj72m4ag80ing513fh65q8xlsf341qzm3vmxm3y3jgd"))
268 (file-name (git-file-name name version))))
269 (build-system cargo-build-system)
272 (("rust-getopts" ,rust-getopts-0.2)
273 ("rust-libc" ,rust-libc-0.2)
274 ("rust-emacs" ,rust-emacs-0.11)
275 ("rust-serde" ,rust-serde-1)
276 ("rust-serde-json" ,rust-serde-json-1)
277 ("rust-serde-derive" ,rust-serde-derive-1)
278 ("rust-unicode-segmentation" ,rust-unicode-segmentation-1)
279 ("rust-unicode-width" ,rust-unicode-width-0.1))))
282 (home-page "https://github.com/justinbarclay/parinfer-rust")
283 (synopsis "Infer parentheses for Clojure, Lisp and Scheme")
285 "Parinfer is a plugin for Kakoune, Vim, Neovim and Emacs that infers
286 parentheses and indentation. This library can be called from other editors that
287 can load dynamic libraries.")
288 (license license:expat)))
297 (uri (string-append "https://sourceforge.net/projects/joe-editor/"
298 "files/JOE sources/joe-" version "/"
299 "joe-" version ".tar.gz"))
302 "1pmr598xxxm9j9dl93kq4dv36zyw0q2dh6d7x07hf134y9hhlnj9"))))
303 (build-system gnu-build-system)
304 (inputs `(("ncurses" ,ncurses)))
305 (home-page "http://joe-editor.sourceforge.net/")
306 (synopsis "Console screen editor")
308 "JOE is a powerful console screen editor with a \"mode-less\" user
309 interface similar to many user-friendly editors. JOE has some of the key
310 bindings and many of the powerful features of GNU Emacs.")
311 (license license:gpl3+)))
313 (define-public jucipp
317 (home-page "https://gitlab.com/cppit/jucipp")
320 (uri (git-reference (url home-page)
321 (commit (string-append "v" version))
322 ;; Two submodules are required which are
323 ;; developed alongside JuCi++ and difficult
324 ;; to package separately.
326 (file-name (git-file-name name version))
328 (base32 "1gy2xb5rm7q4zx9rl23h96b1i46fz27v25nklj50fvqp8ax2gxqy"))))
329 (build-system cmake-build-system)
331 `(#:configure-flags '("-DBUILD_TESTING=ON"
333 ;; These arguments are here to facilitate an "in-source"
334 ;; build using "./build" instead of the default "../build".
335 ;; The test suite expects that to be the case.
338 #:phases (modify-phases %standard-phases
339 (add-before 'configure 'enter-build-directory
345 (add-after 'unpack 'patch-tiny-process-library
347 (with-directory-excursion "lib/tiny-process-library"
348 (substitute* '("process_unix.cpp"
350 (("/bin/sh") (which "sh"))))
352 (add-after 'unpack 'disable-git-test
354 (substitute* "tests/CMakeLists.txt"
355 ;; Disable the git test, as it requires the full checkout.
356 (("add_test\\(git_test.*\\)") ""))
358 (add-before 'check 'pre-check
359 (lambda* (#:key inputs #:allow-other-keys)
360 ;; Tests do not expect HOME to be empty.
361 (setenv "HOME" "/etc")
363 ;; Most tests require an X server.
364 (let ((xorg-server (assoc-ref inputs "xorg-server"))
366 (setenv "DISPLAY" display)
367 (system (string-append xorg-server "/bin/Xvfb "
370 (add-after 'install 'wrap
371 (lambda* (#:key inputs outputs #:allow-other-keys)
372 ;; The package needs GTK+ and GtkSourceView on XDG_DATA_DIRS
373 ;; for syntax highlighting to work. shared-mime-info is
374 ;; necessary for MIME handling.
375 ;; XXX: Ideally we'd reuse glib-or-gtk-wrap here, but it
376 ;; does not pick up $gtksourceview/share/gtksourceview-3.0.
377 (let ((out (assoc-ref outputs "out"))
378 (gtk+ (assoc-ref inputs "gtk+"))
379 (gtksourceview (assoc-ref inputs "gtksourceview"))
380 (shared-mime-info (assoc-ref inputs "shared-mime-info")))
381 (wrap-program (string-append out "/bin/juci")
382 `("XDG_DATA_DIRS" ":" prefix
385 (string-append pkg "/share"))
386 (list out gtk+ gtksourceview shared-mime-info))
390 `(("pkg-config" ,pkg-config)
391 ("xorg-server" ,xorg-server-for-tests)))
395 ("ctags" ,universal-ctags)
397 ("gtksourceviewmm" ,gtksourceviewmm)
398 ("libclang" ,clang-11) ;XXX: must be the same version as Mesas LLVM
399 ("libgit2" ,libgit2)))
400 (synopsis "Lightweight C++ IDE")
402 "juCi++ is a small @acronym{IDE, Integrated Development Environment}
403 designed especially towards libclang with speed, stability, and ease of use
406 It supports autocompletion, on-the-fly warnings and errors, syntax
407 highlighting, and integrates with Git as well as the CMake and Meson build
409 (license license:expat)))
411 (define-public leafpad
417 (uri (string-append "mirror://savannah/"
418 "leafpad/leafpad-" version ".tar.gz"))
421 "0b0az2wvqgvam7w0ns1j8xp2llslm1rx6h7zcsy06a7j0yp257cm"))))
422 (build-system glib-or-gtk-build-system)
424 `(("intltool" ,intltool)
425 ("pkg-config" ,pkg-config)))
428 (home-page "http://tarot.freeshell.org/leafpad/")
429 (synopsis "GTK+ based text editor")
430 (description "Leafpad is a GTK+ text editor that emphasizes simplicity. As
431 development focuses on keeping weight down to a minimum, only the most essential
432 features are implemented in the editor. Leafpad is simple to use, is easily
433 compiled, requires few libraries, and starts up quickly. ")
434 (license license:gpl2+)))
436 (define-public l3afpad
437 (let ((commit "5235c9e13bbf0d31a902c6776918c2d7cdbb61ff")
441 (version (git-version "0.8.18.1.11" revision commit))
444 (file-name (git-file-name name version))
446 (url "https://github.com/stevenhoneyman/l3afpad")
450 "1alyghm2wpakzdfag0g4g8gb1h9l4wdg7mnhq8bk0iq5ryqia16a"))))
451 (build-system glib-or-gtk-build-system)
453 `(("intltool" ,intltool)
454 ("autoconf" ,autoconf)
455 ("automake" ,automake)
456 ("pkg-config" ,pkg-config)))
459 (home-page "http://tarot.freeshell.org/leafpad/")
460 (synopsis "GTK+ 3 based text editor")
461 (description "L3afpad is a GTK+ 3 text editor that emphasizes simplicity. As
462 development focuses on keeping weight down to a minimum, only the most essential
463 features are implemented in the editor. L3afpad is simple to use, is easily
464 compiled, requires few libraries, and starts up quickly. L3afpad is a
465 fork of Leafpad that uses GTK+ 3 instead of GTK+ 2.")
466 (license license:gpl2+))))
474 (uri (string-append "https://sites.google.com/site/e3editor/Home/"
475 "e3-" version ".tgz"))
478 "0919kadkas020maqq37852isnzp053q2fnws2zh3mz81d1jiviak"))
479 (modules '((guix build utils)))
481 ;; Remove pre-built binaries.
483 (delete-file-recursively "bin")
485 (build-system gnu-build-system)
488 #:make-flags (list (string-append "PREFIX="
489 (assoc-ref %outputs "out")))
490 #:phases (modify-phases %standard-phases
491 (delete 'configure))))
494 (home-page "https://sites.google.com/site/e3editor/")
495 (synopsis "Tiny text editor written in assembly")
497 "e3 is a micro text editor with an executable code size between 3800 and
498 35000 bytes. Except for ``syntax highlighting'', the e3 binary supports all
499 of the basic functions one expects plus built in arithmetic calculations.
500 UTF-8 coding of unicode characters is supported as well. e3 can use
501 Wordstar-, EMACS-, Pico, Nedit or vi-like key bindings. e3 can be used on
502 16, 32, and 64-bit CPUs.")
503 (supported-systems '("x86_64-linux" "i686-linux"))
504 (license license:gpl2+)))
513 (url "https://github.com/hboetes/mg")
515 (file-name (git-file-name name version))
518 "04c2vqxg31mk15cfrhzrivykis8fmf0m1d8h1qdjdmlfxd4qwaqf"))
519 (modules '((guix build utils)))
521 (substitute* "GNUmakefile"
522 (("/usr/bin/") ""))))))
523 (build-system gnu-build-system)
525 `(("pkg-config" ,pkg-config)))
527 `(("diffutils" ,diffutils)
529 ("ncurses" ,ncurses)))
531 ;; No test suite available.
533 #:make-flags (list (string-append "prefix=" %output)
534 (string-append "CC=" ,(cc-for-target))
535 (string-append "PKG_CONFIG=" ,(pkg-config-for-target)))
536 #:phases (modify-phases %standard-phases
537 (delete 'configure) ; no configure script
538 (add-before 'build 'correct-location-of-diff
539 (lambda* (#:key inputs #:allow-other-keys)
540 (substitute* "buffer.c"
542 (string-append (assoc-ref inputs "diffutils")
544 (add-before 'install 'patch-tutorial-location
545 (lambda* (#:key outputs #:allow-other-keys)
547 (("/usr") (assoc-ref outputs "out")))))
548 (add-after 'install 'install-tutorial
549 (lambda* (#:key outputs #:allow-other-keys)
550 (let* ((out (assoc-ref outputs "out"))
551 (doc (string-append out "/share/doc/mg")))
552 (install-file "tutorial" doc)))))))
553 (home-page "https://homepage.boetes.org/software/mg/")
554 (synopsis "Microscopic GNU Emacs clone")
556 "Mg (@command{mg}) is a GNU Emacs style editor, with which it is
557 \"broadly\" compatible. This is a portable version of the mg maintained by the
559 (license license:public-domain)))
561 (define-public qemacs
568 (uri (string-append "https://bellard.org/qemacs/"
569 "qemacs-" version ".tar.gz"))
571 (base32 "156z4wpj49i6j388yjird5qvrph7hz0grb4r44l4jf3q8imadyrg"))))
572 (build-system gnu-build-system)
574 `(#:tests? #f ;no test
576 (modify-phases %standard-phases
577 (add-before 'build 'build-qhtml
578 ;; Build fails without first creating qHTML library.
579 (lambda _ (invoke "make" "-C" "libqhtml")))
580 (add-before 'install 'fix-man-pages-directory
581 ;; Install in $out/share/man instead of $out/man.
583 (substitute* "Makefile"
584 (("/man/man1" all) (string-append "/share" all)))
586 (add-before 'install 'create-directories
587 ;; Ensure directories exist before installing files.
588 (lambda* (#:key outputs #:allow-other-keys)
589 (let ((out (assoc-ref outputs "out")))
590 (for-each (lambda (d) (mkdir-p (string-append out d)))
591 '("/bin" "/share/man/man1" "/share/qe"))
593 (add-after 'install 'install-extra-documentation
594 ;; Install sample configuration file, Info, and HTML manual.
595 (lambda* (#:key native-inputs inputs outputs #:allow-other-keys)
596 (let* ((share (string-append (assoc-ref outputs "out") "/share"))
597 (doc (string-append share "/doc/" ,name "-" ,version))
598 (html (string-append share "/html"))
599 (info (string-append share "/info"))
600 (makeinfo (string-append
601 (assoc-ref (or native-inputs inputs) "texinfo")
603 ;; First fix Texinfo documentation, create appropriate
604 ;; directories, then generate Info and HTML files there.
605 (substitute* "qe-doc.texi"
606 (("^M-([{}])" _ bracket) (string-append "M-@" bracket)))
607 (for-each (lambda (d) (mkdir-p d)) (list html info))
608 (invoke makeinfo "qe-doc.texi" "-o" info)
609 (invoke makeinfo "qe-doc.texi" "--html" "--no-split" "-o" html)
610 ;; Install sample configuration file.
611 (install-file "config.eg" doc)
614 `(("texinfo" ,texinfo)))
619 (home-page "https://bellard.org/qemacs/")
620 (synopsis "Small but powerful text editor")
621 (description "QEmacs (for Quick Emacs) is a very small but
622 powerful editor. It has features that even big editors lack:
626 @item Full screen editor with an Emacs look and feel with all Emacs
627 common features: multi-buffer, multi-window, command mode, universal
628 argument, keyboard macros, config file with C-like syntax, minibuffer
629 with completion and history.
631 @item Can edit files of hundreds of Megabytes without being slow by
632 using a highly optimized internal representation and by mmaping the
635 @item Full Unicode support, including multi charset handling (8859-x,
636 UTF8, SJIS, EUC-JP, ...) and bidirectional editing respecting the
637 Unicode bidi algorithm. Arabic and Indic scripts handling (in
640 @item WYSIWYG HTML/XML/CSS2 mode graphical editing. Also supports
641 Lynx like rendering on VT100 terminals.
643 @item WYSIWYG DocBook mode based on XML/CSS2 renderer.
645 @item C mode: coloring with immediate update. Emacs like auto-indent.
647 @item Shell mode: colorized VT100 emulation so that your shell work
648 exactly as you expect. Compile mode with next/prev error.
650 @item Input methods for most languages, including Chinese (input
651 methods come from the Yudit editor).
653 @item Hexadecimal editing mode with insertion and block commands.
654 Unicode hexa editing is also supported.
656 @item Works on any VT100 terminals without termcap. UTF8 VT100
657 support included with double width glyphs.
659 @item X11 support. Support multiple proportional fonts at the same
660 time (as XEmacs). X Input methods supported. Xft extension supported
661 for anti aliased font display.
663 @item Small! Full version (including HTML/XML/CSS2/DocBook rendering
664 and all charsets): 200KB big. Basic version (without bidir/unicode
665 scripts/input/X11/C/Shell/HTML/Dired): 49KB.
667 (license license:lgpl2.1+)))
669 (define-public ghostwriter
676 (url "https://github.com/wereturtle/ghostwriter")
678 (file-name (git-file-name name version))
681 "19cf55b86yj2b5hdazbyw4iyp6xq155243aiyg4m0vhwh0h79nwh"))))
682 (build-system gnu-build-system)
684 `(("pkg-config" ,pkg-config)
685 ("qttools" ,qttools))) ; for lrelease
687 `(("hunspell" ,hunspell)
689 ("qtdeclarative" ,qtdeclarative)
690 ("qtmultimedia" ,qtmultimedia)
691 ("qtquickcontrols" ,qtquickcontrols)
693 ("qtwebchannel" ,qtwebchannel)))
694 (propagated-inputs ; To get native-search-path
695 `(("qtwebengine" ,qtwebengine)))
698 (modify-phases %standard-phases
700 (lambda* (#:key outputs #:allow-other-keys)
701 (let ((out (assoc-ref outputs "out")))
702 (invoke "qmake" (string-append "PREFIX=" out)))))
703 (add-after 'configure 'create-translations
705 ;; `lrelease` will not overwrite, so delete existing .qm files
706 (for-each delete-file (find-files "translations" ".*\\.qm"))
707 (apply invoke "lrelease" (find-files "translations" ".*\\.ts"))))
708 ;; Ensure that icons are found at runtime.
709 (add-after 'install 'wrap-executable
710 (lambda* (#:key inputs outputs #:allow-other-keys)
711 (let ((out (assoc-ref outputs "out")))
712 (wrap-program (string-append out "/bin/ghostwriter")
713 `("QT_PLUGIN_PATH" ":" prefix
714 ,(map (lambda (label)
715 (string-append (assoc-ref inputs label)
716 "/lib/qt5/plugins/"))
717 '("qtsvg" "qtmultimedia"))))))))))
718 (home-page "https://wereturtle.github.io/ghostwriter/")
719 (synopsis "Write without distractions")
721 "@code{ghostwriter} provides a relaxing, distraction-free writing
722 environment with Markdown markup.")
723 (license license:gpl3+))) ; icons/* under CC-BY-SA3
725 (define-public manuskript
733 (url "https://github.com/olivierkes/manuskript")
735 (file-name (git-file-name name version))
737 (base32 "0gfwwnpjslb0g8y3v9ha4sd8in6bpy6bhi4rn4hmfd2vmq2flpbd"))))
738 (build-system python-build-system)
740 `(#:tests? #f ;no test
742 (modify-phases %standard-phases
746 (lambda* (#:key outputs #:allow-other-keys)
747 (let* ((out (assoc-ref outputs "out"))
748 (share (string-append out "/share/manuskript")))
753 (let ((destination (string-append share "/" d)))
754 (mkdir-p destination)
755 (copy-recursively d destination)))
756 '("bin" "i18n" "icons" "libs" "manuskript" "resources"))
757 ;; Install documentation.
758 (let ((doc (string-append out
759 "/doc/manuskript-" ,version
760 "/sample-projects")))
762 (copy-recursively "sample-projects" doc))
763 ;; Wrap executable in "$out/share/manuskript/bin" and
764 ;; link to it from "$out/bin".
765 (let ((bin (string-append out "/bin"))
766 (executable (string-append share "/bin/manuskript")))
767 (wrap-program executable
768 (list "PYTHONPATH" 'prefix (list (getenv "PYTHONPATH"))))
770 (with-directory-excursion bin
771 (symlink (string-append share "/bin/manuskript")
773 ;; Install icons and create .desktop file.
774 (let ((apps (string-append out "/share/applications"))
775 (icons-dir (string-append out "/share/pixmaps")))
776 (install-file "icons/Manuskript/manuskript.svg" icons-dir)
778 (make-desktop-entry-file (string-append apps "/manuskript.desktop")
780 #:mime-type "application/x-manuskript-book;"
781 #:exec (string-append out "/bin/manuskript %f")
782 #:comment '((#f "Tool for writers")
783 ("es" "Herramienta para escritores/as"))
784 #:keywords "manuskript;office;write;edit;novel;text;msk"
788 #:categories "Office;WordProcessor;"))
792 ("python-lxml" ,python-lxml)
793 ("python-markdown" ,python-markdown)
794 ("python-pyqt" ,python-pyqt)
796 (home-page "http://www.theologeek.ch/manuskript/")
797 (synopsis "Tool for writers")
798 (description "Manuskript provides a rich environment to help
799 writers create their first draft and then further refine and edit
800 their masterpiece. With Manuskript you can:
803 @item Grow your premise from one sentence, to a paragraph, to a full
805 @item Create characters,
806 @item Conceive plots,
807 @item Construct outlines (Outline mode and/or Index cards),
808 @item Write with focus (Distraction free mode),
811 @item Edit and re-organize chapters and scenes,
812 @item View Story line,
813 @item Compose with fiction or non-fiction templates and writing modes,
814 @item Import and export document formats such as HTML, ePub,
815 OpenDocument, DocX, and more.
818 Additionally Manuskript can help in many more ways with a spell
819 checker, markdown highlighter, frequency analyzer, and automatic save
820 in plain text file format.")
821 (license license:gpl3+)))
823 (define-public editorconfig-core-c
825 (name "editorconfig-core-c")
831 (url "https://github.com/editorconfig/editorconfig-core-c")
832 (commit (string-append "v" version))))
833 (file-name (git-file-name name version))
835 (base32 "073sh18y0v8wm10iphaia54pkdmwylalccpn1k5i9dwyfjzgj7yg"))))
836 (build-system cmake-build-system)
839 (modify-phases %standard-phases
840 (add-after 'unpack 'insert-tests
841 (lambda* (#:key inputs #:allow-other-keys)
842 (let ((tests (assoc-ref inputs "tests")))
843 (copy-recursively tests "tests"))
845 (add-after 'install 'delete-static-library
846 (lambda* (#:key outputs #:allow-other-keys)
847 (let* ((out (assoc-ref outputs "out"))
848 (lib (string-append out "/lib")))
849 (with-directory-excursion lib
850 (delete-file "libeditorconfig_static.a"))
857 (url "https://github.com/editorconfig/editorconfig-core-test")
858 ;; The tests submodule commit matching this package's version.
859 (commit "48610d43b7455af12195473377f93c4ceea654f5")))
860 (file-name (git-file-name "editorconfig-core-test" version))
862 (base32 "1s29p4brmcsc3xsww3gk85dg45f1kk3iykh1air3ij0hymf5dyqy"))))))
865 (home-page "https://editorconfig.org/")
866 (synopsis "EditorConfig core library written in C")
867 (description "EditorConfig makes it easy to maintain the correct coding
868 style when switching between different text editors and between different
869 projects. The EditorConfig project maintains a file format and plugins for
870 various text editors which allow this file format to be read and used by those
872 (license license:bsd-2)))
874 (define-public texmacs
881 (uri (string-append "https://www.texmacs.org/Download/ftp/tmftp/"
882 "source/TeXmacs-" version "-src.tar.gz"))
884 (base32 "1gl6k1bwrk1y7hjyl4xvlqvmk5crl4jvsk8wrfp7ynbdin6n2i48"))))
885 (build-system gnu-build-system)
887 `(("pkg-config" ,pkg-config)
888 ("xdg-utils" ,xdg-utils))) ;for xdg-icon-resource
890 `(("freetype" ,freetype)
893 ("python" ,python-wrapper)
897 `(#:tests? #f ; no check target
899 (modify-phases %standard-phases
900 (add-after 'unpack 'fix-icon-directory
901 (lambda* (#:key outputs #:allow-other-keys)
902 (let ((out (assoc-ref outputs "out")))
903 (substitute* "packages/linux/icons.sh"
905 (string-append out "/share"))))))
906 (add-after 'install 'install-desktop-file
907 (lambda* (#:key outputs #:allow-other-keys)
908 ;; Install desktop file.
909 (let* ((out (assoc-ref outputs "out"))
910 (apps (string-append out "/share/applications"))
911 (source "TeXmacs/misc/mime/texmacs.desktop"))
912 (install-file source apps))))
913 (add-before 'configure 'gzip-flags
915 (substitute* "Makefile.in"
916 (("^GZIP = gzip -f") "GZIP = gzip -f -n")))))))
917 (synopsis "Editing platform with special features for scientists")
919 "GNU TeXmacs is a text editing platform which is specialized for
920 scientists. It is ideal for editing structured documents with different types
921 of content. It has robust support for mathematical formulas and plots. It
922 can also act as an interface to external mathematical programs such as R and
923 Octave. TeXmacs is completely extensible via Guile.")
924 (license license:gpl3+)
925 (home-page "https://www.texmacs.org/tmweb/home/welcome.en.html")))
927 (define-public scintilla
934 (uri (let ((v (apply string-append (string-split version #\.))))
935 (string-append "https://www.scintilla.org/scintilla" v ".tgz")))
937 (base32 "0rd3scfs3dwaj85ds8yrcp1r8z0lifi7qv2464k6n1c995amr0nw"))))
938 (build-system gnu-build-system)
940 `(#:make-flags (list "GTK3=1" "CC=gcc" "-Cgtk")
941 #:tests? #f ;require un-packaged Pyside
943 (modify-phases %standard-phases
944 (delete 'configure) ;no configure script
946 ;; Upstream provides no install script.
947 (lambda* (#:key outputs #:allow-other-keys)
948 (let* ((out (assoc-ref outputs "out"))
949 (lib (string-append out "/lib"))
950 (include (string-append out "/include")))
951 (for-each (lambda (f) (install-file f lib))
952 (find-files "bin/" "\\.so$"))
953 (for-each (lambda (f) (install-file f include))
954 (find-files "include/" "."))))))))
956 `(("gcc" ,gcc-9) ;Code has C++17 requirements
957 ("pkg-config" ,pkg-config)
958 ("python" ,python-wrapper)))
961 (home-page "https://www.scintilla.org/")
962 (synopsis "Code editor for GTK+")
963 (description "Scintilla is a source code editing component for
964 GTK+. It has the usual features found in text editing components, as
965 well as some that are especially useful for editing and debugging
966 source code; these include support for syntax styling, error
967 indicators, code completion and call tips. Styling choices are more
968 open than with many editors: Scintilla lets you use proportional
969 fonts, bold and italics, multiple foreground and background colours,
970 and multiple fonts.")
971 (license license:hpnd)))
980 (uri (string-append "https://download.geany.org/"
981 "geany-" version ".tar.bz2"))
983 (base32 "0inmmb9wra2w99pfv6p64d66s2zrhafc8drhwmga7gj89mp1gzxb"))))
984 (build-system gnu-build-system)
986 `(("autoconf" ,autoconf)
987 ("automake" ,automake)
990 ("intltool" ,intltool)
992 ("pkg-config" ,pkg-config)
993 ("python-docutils" ,python-docutils))) ;for rst2html
996 ;; FIXME: Geany bundles a 3.X release of Scintilla. It is not
997 ;; currently possible to replace it with our Scintilla package.
998 ;; ("scintilla" ,scintilla)
1001 `(#:imported-modules ((guix build glib-or-gtk-build-system)
1002 ,@%gnu-build-system-modules)
1003 #:modules (((guix build glib-or-gtk-build-system) #:prefix glib-or-gtk:)
1004 (guix build gnu-build-system)
1007 (modify-phases %standard-phases
1008 (add-after 'install 'glib-or-gtk-wrap
1009 (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-wrap)))))
1010 (home-page "https://www.geany.org")
1011 (synopsis "Fast and lightweight IDE")
1012 (description "Geany is a small and fast Integrated Development
1013 Environment (IDE) that only has a few dependencies on other packages and is as
1014 independent as possible from special desktop environments like KDE or GNOME.
1016 The basic features of Geany are:
1018 @item syntax highlighting
1019 @item code completion
1020 @item auto completion of often constructed constructs like if, for and while
1021 @item auto completion of XML and HTML tags
1024 @item many supported filetypes like C, Java, PHP, HTML, Python, Perl, Pascal
1026 @item embedded terminal emulation
1027 @item extensibility through plugins
1029 (license license:gpl2+)))
1034 ;; Stable release is 1.9. However, this development version
1035 ;; introduces support for UTF-8.
1039 (uri (string-append "http://www.moria.de/~michael/fe/"
1040 "fe-" version ".tar.gz"))
1043 "10mk5wc3dsdp46b3hkjyd740gcdv6m1gvlr3p8xjxf55b3vfs0la"))))
1044 (build-system gnu-build-system)
1046 `(#:tests? #f ;no test
1047 ;; Sendmail is only used to send a crash log. Disable the
1048 ;; feature since it is (1) undocumented (2) not very useful.
1049 #:configure-flags (list "--disable-sendmail")
1051 (modify-phases %standard-phases
1052 (add-after 'install 'install-doc
1053 (lambda* (#:key outputs #:allow-other-keys)
1054 (let* ((out (assoc-ref outputs "out"))
1055 (doc (string-append out "/share/doc/" ,name "-" ,version)))
1056 (for-each (lambda (f) (install-file f doc))
1057 '("fe.doc" "fe.html" "fe.ps" "feref.ps" "README"))
1060 `(("gettext" ,gettext-minimal)))
1062 `(("ncurses" ,ncurses)))
1063 (home-page "http://www.moria.de/~michael/fe/")
1064 (synopsis "Small folding editor")
1065 (description "Fe is a small folding editor. It folds
1066 arbitrary text regions; it is not bound to syntactic units.
1068 Fe has no configuration or extension language and requires no setup.
1069 Its user interface is emacs-like and it has menus for the very most
1070 important functions to help beginners. Further there is a reference
1074 @item Regions and Emacs-like kill ring
1075 @item Incremental search
1076 @item Keyboard macros
1077 @item Editing binary files
1078 @item Multiple windows and views
1079 @item Compose function for Latin 1 characters
1081 (license license:gpl2+)))
1090 (url "https://github.com/vigna/ne")
1092 (file-name (git-file-name name version))
1095 "0sg2f6lxq6cjkpd3dvlxxns82hvq826rjnams5in97pssmknr77g"))))
1096 (build-system gnu-build-system)
1099 ("texinfo" ,texinfo)))
1101 `(("ncurses" ,ncurses)))
1106 (string-append "PREFIX=" (assoc-ref %outputs "out"))
1107 (string-append "LDFLAGS=-L" (assoc-ref %build-inputs "ncurses")
1110 (modify-phases %standard-phases
1111 (add-before 'configure 'patch-early-shebang
1113 (substitute* "version.pl"
1114 (("/usr/bin/env .*perl") (which "perl")))))
1117 (substitute* "src/makefile"
1118 (("-lcurses") "-lncurses")))))))
1119 (home-page "https://ne.di.unimi.it/")
1120 (synopsis "Text editor with menu bar")
1121 (description "This package provides a modeless text editor with menu bar.
1122 It supports syntax highlighting, regular expressions, configurable menus,
1123 keybindings, autocomplete and unlimited undo. It can pipe a marked block
1124 of text through any command line filter. It can also open very large binary
1125 files. It was originally developed on the Amiga 3000T.")
1126 (license license:gpl3+)))
1128 (define-public hexer
1135 (uri (string-append "https://devel.ringlet.net/files/editors/hexer/"
1136 "hexer-" version ".tar.xz"))
1138 (base32 "157z17z8qivdin2km2wp86x1bv1nx15frrwcz11mk0l3ab74mf76"))))
1139 (build-system gnu-build-system)
1141 `(#:tests? #f ;no upstream tests
1144 (string-append "PREFIX=" (assoc-ref %outputs "out"))
1145 (string-append "LTERMCAP=-lncurses")
1146 (string-append "LDFLAGS=-L" (assoc-ref %build-inputs "ncurses")
1149 (modify-phases %standard-phases
1150 (delete 'configure)))) ;no configure script
1152 `(("ncurses" ,ncurses)))
1153 (home-page "https://devel.ringlet.net/editors/hexer/")
1154 (synopsis "Multi buffer editor for binary files with vi-like interface")
1155 (description "Hexer is a multi-buffer editor for binary files for Unix-like
1156 systems that displays its buffer(s) as a hex dump. The user interface is kept
1158 (license license:bsd-3)))
1160 (define-public virtaal
1166 (uri (string-append "mirror://sourceforge/translate/Virtaal/"
1167 version "/virtaal-" version ".tar.bz2"))
1170 "0cyimjp3191qlmw6n0ipqdr9xr0cq4f6dqvz4rl9q31h6l3kywf9"))))
1171 (build-system python-build-system)
1173 `(#:python ,python-2
1174 #:use-setuptools? #f
1175 #:tests? #f ;; Failing tests
1177 (modify-phases %standard-phases
1178 (add-before 'build 'configure
1179 (lambda* (#:key outputs #:allow-other-keys)
1180 ;; Set data file path to absolute store path.
1181 (substitute* "virtaal/common/pan_app.py"
1182 (("file_discovery\\.get_abs_data_filename.*")
1183 (string-append "os.path.join('"
1184 (assoc-ref outputs "out")
1185 "/share', *path_parts)"))))))))
1187 `(("python2-lxml" ,python2-lxml)
1188 ("python2-pygtk" ,python2-pygtk)
1189 ("python2-simplejson" ,python2-simplejson)
1190 ("python2-translate-toolkit" ,python2-translate-toolkit)
1191 ("python2-pycurl" ,python2-pycurl)))
1192 (synopsis "Graphical translation tool")
1193 (description "Virtaal is a powerful yet simple translation tool with an
1194 uncluttered user interface. It supports a multitude of translation formats
1195 provided by the Translate Toolkit, including XLIFF and PO.")
1196 (home-page "https://virtaal.translatehouse.org/")
1197 (license license:gpl2+)))