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>
20 ;;; This file is part of GNU Guix.
22 ;;; GNU Guix is free software; you can redistribute it and/or modify it
23 ;;; under the terms of the GNU General Public License as published by
24 ;;; the Free Software Foundation; either version 3 of the License, or (at
25 ;;; your option) any later version.
27 ;;; GNU Guix is distributed in the hope that it will be useful, but
28 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
29 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
30 ;;; GNU General Public License for more details.
32 ;;; You should have received a copy of the GNU General Public License
33 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
35 (define-module (gnu packages text-editors)
36 #:use-module (guix packages)
37 #:use-module (guix download)
38 #:use-module (guix git-download)
39 #:use-module (guix utils)
40 #:use-module (guix build-system cargo)
41 #:use-module (guix build-system cmake)
42 #:use-module (guix build-system gnu)
43 #:use-module (guix build-system glib-or-gtk)
44 #:use-module (guix build-system python)
45 #:use-module ((guix licenses) #:prefix license:)
46 #:use-module (gnu packages)
47 #:use-module (gnu packages aspell)
48 #:use-module (gnu packages assembly)
49 #:use-module (gnu packages autotools)
50 #:use-module (gnu packages boost)
51 #:use-module (gnu packages code)
52 #:use-module (gnu packages crates-io)
53 #:use-module (gnu packages documentation)
54 #:use-module (gnu packages fontutils)
55 #:use-module (gnu packages freedesktop)
56 #:use-module (gnu packages gcc)
57 #:use-module (gnu packages gettext)
58 #:use-module (gnu packages glib)
59 #:use-module (gnu packages gtk)
60 #:use-module (gnu packages guile)
61 #:use-module (gnu packages haskell-xyz)
62 #:use-module (gnu packages libbsd)
63 #:use-module (gnu packages libreoffice)
64 #:use-module (gnu packages llvm)
65 #:use-module (gnu packages lua)
66 #:use-module (gnu packages ncurses)
67 #:use-module (gnu packages pcre)
68 #:use-module (gnu packages perl)
69 #:use-module (gnu packages pkg-config)
70 #:use-module (gnu packages python)
71 #:use-module (gnu packages python-web)
72 #:use-module (gnu packages python-xyz)
73 #:use-module (gnu packages qt)
74 #:use-module (gnu packages regex)
75 #:use-module (gnu packages ruby)
76 #:use-module (gnu packages terminals)
77 #:use-module (gnu packages texinfo)
78 #:use-module (gnu packages version-control)
79 #:use-module (gnu packages xml)
80 #:use-module (gnu packages xorg))
85 (version "0.7") ; also update the vis-test input
90 (url "https://git.sr.ht/~martanne/vis")
91 (commit (string-append "v" version))))
93 (base32 "1g05ncsnk57kcqm9wsv6sz8b24kyzj8r5rfpa1wfwj8qkjzx3vji"))
94 (file-name (git-file-name name version))))
95 (build-system gnu-build-system)
97 `(#:test-target "test"
99 (modify-phases %standard-phases
100 (add-after 'unpack 'unpack-test-suite
101 (lambda* (#:key inputs #:allow-other-keys)
102 (let ((vis-test (assoc-ref inputs "vis-test")))
103 (copy-recursively vis-test "test")
105 (delete 'check) ; the tests need a wrapped vis
106 (add-after 'install 'wrap-binary
107 (lambda* (#:key inputs outputs #:allow-other-keys)
108 (let* ((out (assoc-ref outputs "out"))
109 (lpeg (assoc-ref inputs "lua-lpeg"))
110 (lua-version ,(version-major+minor (package-version lua)))
111 (LUA_PATH (string-append lpeg "/share/lua/"
112 lua-version "/?.lua"))
113 (LUA_CPATH (string-append lpeg "/lib/lua/"
114 lua-version "/?.so")))
115 (wrap-program (string-append out "/bin/vis")
116 `("LUA_PATH" ":" prefix (,LUA_PATH))
117 `("LUA_CPATH" ":" prefix (,LUA_CPATH)))
119 (add-after 'wrap-binary 'check
120 (assoc-ref %standard-phases 'check))
121 (add-before 'check 'set-up-tests
122 (lambda* (#:key outputs #:allow-other-keys)
123 (let ((out (assoc-ref outputs "out")))
124 ;; DEFAULT_COMPILER is hard-coded here.
125 (substitute* "test/core/ccan-config.c"
127 (format #f "\"~a\"" ,(cc-for-target))))
129 ;; Use the ‘vis’ executable that we wrapped above.
130 (install-file (string-append out "/bin/vis") ".")
132 ;; XXX Delete 2 failing tests. TODO: make them not fail. :-)
133 (for-each delete-file
134 (find-files "test/vis/selections" "^complement"))
141 (url "https://git.sr.ht/~martanne/vis-test")
142 (commit "bbd2f34ff788e87a51a74069069273ad83c44f1f")))
144 (base32 "1jsvg2lg3xqfgi79x08kx94mc34mh62ivca10vsci6fqsk68jbd0"))
145 (file-name (git-file-name "vis-test" version))))))
146 (inputs `(("lua" ,lua)
148 ("libtermkey" ,libtermkey)
149 ("lua-lpeg" ,lua-lpeg)
151 (synopsis "Vim-like text editor")
153 "Vis aims to be a modern, legacy free, simple yet efficient vim-like text
154 editor. It extends vim's modal editing with built-in support for multiple
155 cursors/selections and combines it with sam's structural regular expression
156 based command language.")
157 (home-page "https://github.com/martanne/vis")
158 (license (list license:isc ; Main distribution.
159 license:public-domain ; map.[ch]
160 license:expat)))) ; lexers and libutf.[ch]
162 (define-public kakoune
165 (version "2020.09.01")
169 (uri (string-append "https://github.com/mawww/kakoune/"
170 "releases/download/v" version "/"
171 "kakoune-" version ".tar.bz2"))
173 (base32 "0x81rxy7bqnhd9374g5ypy4w4nxmm0vnqw6b52bf62jxdg2qj6l6"))))
174 (build-system gnu-build-system)
177 (list (string-append "PREFIX=" (assoc-ref %outputs "out")))
179 (modify-phases %standard-phases
180 (add-after 'unpack 'patch-source
182 ;; kakoune uses confstr with _CS_PATH to find out where to find
183 ;; a posix shell, but this doesn't work in the build
184 ;; environment. This substitution just replaces that result
185 ;; with the "sh" path.
186 (substitute* "src/shell_manager.cc"
187 (("if \\(m_shell.empty\\(\\)\\)" line)
188 (string-append "m_shell = \"" (which "sh")
191 (delete 'configure) ; no configure script
192 ;; kakoune requires us to be in the src/ directory to build.
193 (add-before 'build 'chdir
194 (lambda _ (chdir "src") #t)))))
196 `(("asciidoc" ,asciidoc)
197 ("pkg-config" ,pkg-config)
200 `(("ncurses" ,ncurses)))
201 (synopsis "Vim-inspired code editor")
203 "Kakoune is a code editor heavily inspired by Vim, as such most of its
204 commands are similar to Vi's ones, and it shares Vi's \"keystrokes as a text
205 editing language\" model. Kakoune has a strong focus on interactivity, most
206 commands provide immediate and incremental results, while still being
207 competitive (as in keystroke count) with Vim.")
208 (home-page "https://kakoune.org/")
209 (license license:unlicense)))
211 (define-public kak-lsp
219 (url "https://github.com/kak-lsp/kak-lsp")
220 (commit (string-append "v" version))))
221 (file-name (git-file-name name version))
222 (sha256 "1wfv2fy5ga6kc51zka3pak0hq97csm2l11bz74w3n1hrf5q9nnf8")))
223 (build-system cargo-build-system)
226 (("rust-crossbeam-channel" ,rust-crossbeam-channel-0.4)
227 ("rust-clap" ,rust-clap-2)
228 ("rust-daemonize" ,rust-daemonize-0.4)
229 ("rust-dirs" ,rust-dirs-2)
230 ("rust-enum_primitive" ,rust-enum-primitive-0.1)
231 ("rust-glob" ,rust-glob-0.3)
232 ("rust-itertools" ,rust-itertools-0.9)
233 ("rust-lsp-types" ,rust-lsp-types-0.80)
234 ("rust-jsonrpc-core" ,rust-jsonrpc-core-14)
235 ("rust-libc" ,rust-libc-0.2)
236 ("rust-rand" ,rust-rand-0.7)
237 ("rust-regex" ,rust-regex-1)
238 ("rust-ropey" ,rust-ropey-1)
239 ("rust-serde" ,rust-serde-1)
240 ("rust-serde_derive" ,rust-serde-derive-1)
241 ("rust-serde_json" ,rust-serde-json-1)
242 ("rust-slog" ,rust-slog-2)
243 ("rust-slog-scope" ,rust-slog-scope-4)
244 ("rust-sloggers" ,rust-sloggers-1)
245 ("rust-toml" ,rust-toml-0.5)
246 ("rust-url" ,rust-url-2)
247 ("rust-whoami" ,rust-whoami-0.8))))
248 (home-page "https://github.com/kak-lsp/kak-lsp")
249 (synopsis "Language Server Protocol (LSP) client for Kakoune")
251 "kak-lsp is a Language Server Protocol client for Kakoune implemented in
253 (license license:unlicense)))
255 (define-public parinfer-rust
257 (name "parinfer-rust")
263 (url "https://github.com/eraserhd/parinfer-rust")
264 (commit (string-append "v" version))))
266 (base32 "0hj5in5h7pj72m4ag80ing513fh65q8xlsf341qzm3vmxm3y3jgd"))
267 (file-name (git-file-name name version))))
268 (build-system cargo-build-system)
271 (("rust-getopts" ,rust-getopts-0.2)
272 ("rust-libc" ,rust-libc-0.2)
273 ("rust-emacs" ,rust-emacs-0.11)
274 ("rust-serde" ,rust-serde-1)
275 ("rust-serde-json" ,rust-serde-json-1)
276 ("rust-serde-derive" ,rust-serde-derive-1)
277 ("rust-unicode-segmentation" ,rust-unicode-segmentation-1)
278 ("rust-unicode-width" ,rust-unicode-width-0.1))))
281 (home-page "https://github.com/justinbarclay/parinfer-rust")
282 (synopsis "Infer parantheses for Clojure, Lisp and Scheme")
284 "Parinfer is a plugin for Kakoune, Vim, Neovim and Emacs that infers
285 paretheses and indentation. This library can be called from other editors that
286 can load dynamic libraries.")
287 (license license:expat)))
296 (uri (string-append "https://sourceforge.net/projects/joe-editor/"
297 "files/JOE sources/joe-" version "/"
298 "joe-" version ".tar.gz"))
301 "1pmr598xxxm9j9dl93kq4dv36zyw0q2dh6d7x07hf134y9hhlnj9"))))
302 (build-system gnu-build-system)
303 (inputs `(("ncurses" ,ncurses)))
304 (home-page "http://joe-editor.sourceforge.net/")
305 (synopsis "Console screen editor")
307 "JOE is a powerful console screen editor with a \"mode-less\" user
308 interface similar to many user-friendly editors. JOE has some of the key
309 bindings and many of the powerful features of GNU Emacs.")
310 (license license:gpl3+)))
312 (define-public jucipp
316 (home-page "https://gitlab.com/cppit/jucipp")
319 (uri (git-reference (url home-page)
320 (commit (string-append "v" version))
321 ;; Two submodules are required which are
322 ;; developed alongside JuCi++ and difficult
323 ;; to package separately.
325 (file-name (git-file-name name version))
327 (base32 "1gy2xb5rm7q4zx9rl23h96b1i46fz27v25nklj50fvqp8ax2gxqy"))))
328 (build-system cmake-build-system)
330 `(#:configure-flags '("-DBUILD_TESTING=ON"
332 ;; These arguments are here to facilitate an "in-source"
333 ;; build using "./build" instead of the default "../build".
334 ;; The test suite expects that to be the case.
337 #:phases (modify-phases %standard-phases
338 (add-before 'configure 'enter-build-directory
344 (add-after 'unpack 'patch-tiny-process-library
346 (with-directory-excursion "lib/tiny-process-library"
347 (substitute* '("process_unix.cpp"
349 (("/bin/sh") (which "sh"))))
351 (add-after 'unpack 'disable-git-test
353 (substitute* "tests/CMakeLists.txt"
354 ;; Disable the git test, as it requires the full checkout.
355 (("add_test\\(git_test.*\\)") ""))
357 (add-before 'check 'pre-check
358 (lambda* (#:key inputs #:allow-other-keys)
359 ;; Tests do not expect HOME to be empty.
360 (setenv "HOME" "/etc")
362 ;; Most tests require an X server.
363 (let ((xorg-server (assoc-ref inputs "xorg-server"))
365 (setenv "DISPLAY" display)
366 (system (string-append xorg-server "/bin/Xvfb "
369 (add-after 'install 'wrap
370 (lambda* (#:key inputs outputs #:allow-other-keys)
371 ;; The package needs GTK+ and GtkSourceView on XDG_DATA_DIRS
372 ;; for syntax highlighting to work. shared-mime-info is
373 ;; necessary for MIME handling.
374 ;; XXX: Ideally we'd reuse glib-or-gtk-wrap here, but it
375 ;; does not pick up $gtksourceview/share/gtksourceview-3.0.
376 (let ((out (assoc-ref outputs "out"))
377 (gtk+ (assoc-ref inputs "gtk+"))
378 (gtksourceview (assoc-ref inputs "gtksourceview"))
379 (shared-mime-info (assoc-ref inputs "shared-mime-info")))
380 (wrap-program (string-append out "/bin/juci")
381 `("XDG_DATA_DIRS" ":" prefix
384 (string-append pkg "/share"))
385 (list out gtk+ gtksourceview shared-mime-info))
389 `(("pkg-config" ,pkg-config)
390 ("xorg-server" ,xorg-server-for-tests)))
394 ("ctags" ,universal-ctags)
396 ("gtksourceviewmm" ,gtksourceviewmm)
397 ("libclang" ,clang-11) ;XXX: must be the same version as Mesas LLVM
398 ("libgit2" ,libgit2)))
399 (synopsis "Lightweight C++ IDE")
401 "juCi++ is a small @acronym{IDE, Integrated Development Environment}
402 designed especially towards libclang with speed, stability, and ease of use
405 It supports autocompletion, on-the-fly warnings and errors, syntax
406 highlighting, and integrates with Git as well as the CMake and Meson build
408 (license license:expat)))
410 (define-public leafpad
416 (uri (string-append "mirror://savannah/"
417 "leafpad/leafpad-" version ".tar.gz"))
420 "0b0az2wvqgvam7w0ns1j8xp2llslm1rx6h7zcsy06a7j0yp257cm"))))
421 (build-system glib-or-gtk-build-system)
423 `(("intltool" ,intltool)
424 ("pkg-config" ,pkg-config)))
427 (home-page "http://tarot.freeshell.org/leafpad/")
428 (synopsis "GTK+ based text editor")
429 (description "Leafpad is a GTK+ text editor that emphasizes simplicity. As
430 development focuses on keeping weight down to a minimum, only the most essential
431 features are implemented in the editor. Leafpad is simple to use, is easily
432 compiled, requires few libraries, and starts up quickly. ")
433 (license license:gpl2+)))
435 (define-public l3afpad
436 (let ((commit "5235c9e13bbf0d31a902c6776918c2d7cdbb61ff")
440 (version (git-version "0.8.18.1.11" revision commit))
443 (file-name (git-file-name name version))
445 (url "https://github.com/stevenhoneyman/l3afpad")
449 "1alyghm2wpakzdfag0g4g8gb1h9l4wdg7mnhq8bk0iq5ryqia16a"))))
450 (build-system glib-or-gtk-build-system)
452 `(("intltool" ,intltool)
453 ("autoconf" ,autoconf)
454 ("automake" ,automake)
455 ("pkg-config" ,pkg-config)))
458 (home-page "http://tarot.freeshell.org/leafpad/")
459 (synopsis "GTK+ 3 based text editor")
460 (description "L3afpad is a GTK+ 3 text editor that emphasizes simplicity. As
461 development focuses on keeping weight down to a minimum, only the most essential
462 features are implemented in the editor. L3afpad is simple to use, is easily
463 compiled, requires few libraries, and starts up quickly. L3afpad is a
464 fork of Leafpad that uses GTK+ 3 instead of GTK+ 2.")
465 (license license:gpl2+))))
473 (uri (string-append "https://sites.google.com/site/e3editor/Home/"
474 "e3-" version ".tgz"))
477 "0919kadkas020maqq37852isnzp053q2fnws2zh3mz81d1jiviak"))
478 (modules '((guix build utils)))
480 ;; Remove pre-built binaries.
482 (delete-file-recursively "bin")
484 (build-system gnu-build-system)
487 #:make-flags (list (string-append "PREFIX="
488 (assoc-ref %outputs "out")))
489 #:phases (modify-phases %standard-phases
490 (delete 'configure))))
493 (home-page "https://sites.google.com/site/e3editor/")
494 (synopsis "Tiny text editor written in assembly")
496 "e3 is a micro text editor with an executable code size between 3800 and
497 35000 bytes. Except for ``syntax highlighting'', the e3 binary supports all
498 of the basic functions one expects plus built in arithmetic calculations.
499 UTF-8 coding of unicode characters is supported as well. e3 can use
500 Wordstar-, EMACS-, Pico, Nedit or vi-like key bindings. e3 can be used on
501 16, 32, and 64-bit CPUs.")
502 (supported-systems '("x86_64-linux" "i686-linux"))
503 (license license:gpl2+)))
512 (url "https://github.com/hboetes/mg")
514 (file-name (git-file-name name version))
517 "14vrm8lvwksf697sqks7xfd1xaqjlqjc9afjk33sksq5p27wr203"))
518 (modules '((guix build utils)))
520 (substitute* "GNUmakefile"
523 (build-system gnu-build-system)
525 `(("pkg-config" ,pkg-config)))
528 ("ncurses" ,ncurses)))
530 ;; No test suite available.
532 #:make-flags (list (string-append "prefix=" %output)
533 (string-append "CC=" ,(cc-for-target)))
534 #:phases (modify-phases %standard-phases
535 (delete 'configure) ; no configure script
536 (add-before 'build 'correct-location-of-difftool
538 (substitute* "buffer.c"
541 (add-before 'build 'pkg-config-for-cross-compiling-target
543 (substitute* "GNUmakefile"
545 (or (which "pkg-config")
546 (string-append ,(%current-target-system)
548 (add-before 'install 'patch-tutorial-location
549 (lambda* (#:key outputs #:allow-other-keys)
551 (("/usr") (assoc-ref outputs "out")))))
552 (add-after 'install 'install-tutorial
553 (lambda* (#:key outputs #:allow-other-keys)
554 (let* ((out (assoc-ref outputs "out"))
555 (doc (string-append out "/share/doc/mg")))
556 (install-file "tutorial" doc)))))))
557 (home-page "https://homepage.boetes.org/software/mg/")
558 (synopsis "Microscopic GNU Emacs clone")
560 "Mg (@command{mg}) is a GNU Emacs style editor, with which it is
561 \"broadly\" compatible. This is a portable version of the mg maintained by the
563 (license license:public-domain)))
565 (define-public qemacs
572 (uri (string-append "https://bellard.org/qemacs/"
573 "qemacs-" version ".tar.gz"))
575 (base32 "156z4wpj49i6j388yjird5qvrph7hz0grb4r44l4jf3q8imadyrg"))))
576 (build-system gnu-build-system)
578 `(#:tests? #f ;no test
580 (modify-phases %standard-phases
581 (add-before 'build 'build-qhtml
582 ;; Build fails without first creating qHTML library.
583 (lambda _ (invoke "make" "-C" "libqhtml")))
584 (add-before 'install 'fix-man-pages-directory
585 ;; Install in $out/share/man instead of $out/man.
587 (substitute* "Makefile"
588 (("/man/man1" all) (string-append "/share" all)))
590 (add-before 'install 'create-directories
591 ;; Ensure directories exist before installing files.
592 (lambda* (#:key outputs #:allow-other-keys)
593 (let ((out (assoc-ref outputs "out")))
594 (for-each (lambda (d) (mkdir-p (string-append out d)))
595 '("/bin" "/share/man/man1" "/share/qe"))
597 (add-after 'install 'install-extra-documentation
598 ;; Install sample configuration file, Info, and HTML manual.
599 (lambda* (#:key native-inputs inputs outputs #:allow-other-keys)
600 (let* ((share (string-append (assoc-ref outputs "out") "/share"))
601 (doc (string-append share "/doc/" ,name "-" ,version))
602 (html (string-append share "/html"))
603 (info (string-append share "/info"))
604 (makeinfo (string-append
605 (assoc-ref (or native-inputs inputs) "texinfo")
607 ;; First fix Texinfo documentation, create appropriate
608 ;; directories, then generate Info and HTML files there.
609 (substitute* "qe-doc.texi"
610 (("^M-([{}])" _ bracket) (string-append "M-@" bracket)))
611 (for-each (lambda (d) (mkdir-p d)) (list html info))
612 (invoke makeinfo "qe-doc.texi" "-o" info)
613 (invoke makeinfo "qe-doc.texi" "--html" "--no-split" "-o" html)
614 ;; Install sample configuration file.
615 (install-file "config.eg" doc)
618 `(("texinfo" ,texinfo)))
623 (home-page "https://bellard.org/qemacs/")
624 (synopsis "Small but powerful text editor")
625 (description "QEmacs (for Quick Emacs) is a very small but
626 powerful editor. It has features that even big editors lack:
630 @item Full screen editor with an Emacs look and feel with all Emacs
631 common features: multi-buffer, multi-window, command mode, universal
632 argument, keyboard macros, config file with C-like syntax, minibuffer
633 with completion and history.
635 @item Can edit files of hundreds of Megabytes without being slow by
636 using a highly optimized internal representation and by mmaping the
639 @item Full Unicode support, including multi charset handling (8859-x,
640 UTF8, SJIS, EUC-JP, ...) and bidirectional editing respecting the
641 Unicode bidi algorithm. Arabic and Indic scripts handling (in
644 @item WYSIWYG HTML/XML/CSS2 mode graphical editing. Also supports
645 Lynx like rendering on VT100 terminals.
647 @item WYSIWYG DocBook mode based on XML/CSS2 renderer.
649 @item C mode: coloring with immediate update. Emacs like auto-indent.
651 @item Shell mode: colorized VT100 emulation so that your shell work
652 exactly as you expect. Compile mode with next/prev error.
654 @item Input methods for most languages, including Chinese (input
655 methods come from the Yudit editor).
657 @item Hexadecimal editing mode with insertion and block commands.
658 Unicode hexa editing is also supported.
660 @item Works on any VT100 terminals without termcap. UTF8 VT100
661 support included with double width glyphs.
663 @item X11 support. Support multiple proportional fonts at the same
664 time (as XEmacs). X Input methods supported. Xft extension supported
665 for anti aliased font display.
667 @item Small! Full version (including HTML/XML/CSS2/DocBook rendering
668 and all charsets): 200KB big. Basic version (without bidir/unicode
669 scripts/input/X11/C/Shell/HTML/Dired): 49KB.
671 (license license:lgpl2.1+)))
673 (define-public ghostwriter
680 (url "https://github.com/wereturtle/ghostwriter")
682 (file-name (git-file-name name version))
685 "19cf55b86yj2b5hdazbyw4iyp6xq155243aiyg4m0vhwh0h79nwh"))))
686 (build-system gnu-build-system)
688 `(("pkg-config" ,pkg-config)
689 ("qttools" ,qttools))) ; for lrelease
691 `(("hunspell" ,hunspell)
693 ("qtdeclarative" ,qtdeclarative)
694 ("qtmultimedia" ,qtmultimedia)
695 ("qtquickcontrols" ,qtquickcontrols)
697 ("qtwebchannel" ,qtwebchannel)))
698 (propagated-inputs ; To get native-search-path
699 `(("qtwebengine" ,qtwebengine)))
702 (modify-phases %standard-phases
704 (lambda* (#:key outputs #:allow-other-keys)
705 (let ((out (assoc-ref outputs "out")))
706 (invoke "qmake" (string-append "PREFIX=" out)))))
707 (add-after 'configure 'create-translations
709 ;; `lrelease` will not overwrite, so delete existing .qm files
710 (for-each delete-file (find-files "translations" ".*\\.qm"))
711 (apply invoke "lrelease" (find-files "translations" ".*\\.ts"))))
712 ;; Ensure that icons are found at runtime.
713 (add-after 'install 'wrap-executable
714 (lambda* (#:key inputs outputs #:allow-other-keys)
715 (let ((out (assoc-ref outputs "out")))
716 (wrap-program (string-append out "/bin/ghostwriter")
717 `("QT_PLUGIN_PATH" ":" prefix
718 ,(map (lambda (label)
719 (string-append (assoc-ref inputs label)
720 "/lib/qt5/plugins/"))
721 '("qtsvg" "qtmultimedia"))))))))))
722 (home-page "https://wereturtle.github.io/ghostwriter/")
723 (synopsis "Write without distractions")
725 "@code{ghostwriter} provides a relaxing, distraction-free writing
726 environment with Markdown markup.")
727 (license license:gpl3+))) ; icons/* under CC-BY-SA3
729 (define-public manuskript
737 (url "https://github.com/olivierkes/manuskript")
739 (file-name (git-file-name name version))
741 (base32 "0gfwwnpjslb0g8y3v9ha4sd8in6bpy6bhi4rn4hmfd2vmq2flpbd"))))
742 (build-system python-build-system)
744 `(#:tests? #f ;no test
746 (modify-phases %standard-phases
750 (lambda* (#:key outputs #:allow-other-keys)
751 (let* ((out (assoc-ref outputs "out"))
752 (share (string-append out "/share/manuskript")))
757 (let ((destination (string-append share "/" d)))
758 (mkdir-p destination)
759 (copy-recursively d destination)))
760 '("bin" "i18n" "icons" "libs" "manuskript" "resources"))
761 ;; Install documentation.
762 (let ((doc (string-append out
763 "/doc/manuskript-" ,version
764 "/sample-projects")))
766 (copy-recursively "sample-projects" doc))
767 ;; Wrap executable in "$out/share/manuskript/bin" and
768 ;; link to it from "$out/bin".
769 (let ((bin (string-append out "/bin"))
770 (executable (string-append share "/bin/manuskript")))
771 (wrap-program executable
772 (list "GUIX_PYTHONPATH" 'prefix
773 (list (getenv "GUIX_PYTHONPATH"))))
775 (with-directory-excursion bin
776 (symlink (string-append share "/bin/manuskript")
778 ;; Install icons and create .desktop file.
779 (let ((apps (string-append out "/share/applications"))
780 (icons-dir (string-append out "/share/pixmaps")))
781 (install-file "icons/Manuskript/manuskript.svg" icons-dir)
783 (make-desktop-entry-file (string-append apps "/manuskript.desktop")
785 #:mime-type "application/x-manuskript-book;"
786 #:exec (string-append out "/bin/manuskript %f")
787 #:comment '((#f "Tool for writers")
788 ("es" "Herramienta para escritores/as"))
789 #:keywords "manuskript;office;write;edit;novel;text;msk"
793 #:categories "Office;WordProcessor;"))
797 ("python-lxml" ,python-lxml)
798 ("python-markdown" ,python-markdown)
799 ("python-pyqt" ,python-pyqt)
801 (home-page "http://www.theologeek.ch/manuskript/")
802 (synopsis "Tool for writers")
803 (description "Manuskript provides a rich environment to help
804 writers create their first draft and then further refine and edit
805 their masterpiece. With Manuskript you can:
808 @item Grow your premise from one sentence, to a paragraph, to a full
810 @item Create characters,
811 @item Conceive plots,
812 @item Construct outlines (Outline mode and/or Index cards),
813 @item Write with focus (Distraction free mode),
816 @item Edit and re-organize chapters and scenes,
817 @item View Story line,
818 @item Compose with fiction or non-fiction templates and writing modes,
819 @item Import and export document formats such as HTML, ePub,
820 OpenDocument, DocX, and more.
823 Additionally Manuskript can help in many more ways with a spell
824 checker, markdown highlighter, frequency analyzer, and automatic save
825 in plain text file format.")
826 (license license:gpl3+)))
828 (define-public editorconfig-core-c
830 (name "editorconfig-core-c")
836 (url "https://github.com/editorconfig/editorconfig-core-c")
837 (commit (string-append "v" version))))
838 (file-name (git-file-name name version))
840 (base32 "073sh18y0v8wm10iphaia54pkdmwylalccpn1k5i9dwyfjzgj7yg"))))
841 (build-system cmake-build-system)
844 (modify-phases %standard-phases
845 (add-after 'unpack 'insert-tests
846 (lambda* (#:key inputs #:allow-other-keys)
847 (let ((tests (assoc-ref inputs "tests")))
848 (copy-recursively tests "tests"))
850 (add-after 'install 'delete-static-library
851 (lambda* (#:key outputs #:allow-other-keys)
852 (let* ((out (assoc-ref outputs "out"))
853 (lib (string-append out "/lib")))
854 (with-directory-excursion lib
855 (delete-file "libeditorconfig_static.a"))
862 (url "https://github.com/editorconfig/editorconfig-core-test")
863 ;; The tests submodule commit matching this package's version.
864 (commit "48610d43b7455af12195473377f93c4ceea654f5")))
865 (file-name (git-file-name "editorconfig-core-test" version))
867 (base32 "1s29p4brmcsc3xsww3gk85dg45f1kk3iykh1air3ij0hymf5dyqy"))))))
870 (home-page "https://editorconfig.org/")
871 (synopsis "EditorConfig core library written in C")
872 (description "EditorConfig makes it easy to maintain the correct coding
873 style when switching between different text editors and between different
874 projects. The EditorConfig project maintains a file format and plugins for
875 various text editors which allow this file format to be read and used by those
877 (license license:bsd-2)))
879 (define-public texmacs
886 (uri (string-append "https://www.texmacs.org/Download/ftp/tmftp/"
887 "source/TeXmacs-" version "-src.tar.gz"))
889 (base32 "1gl6k1bwrk1y7hjyl4xvlqvmk5crl4jvsk8wrfp7ynbdin6n2i48"))))
890 (build-system gnu-build-system)
892 `(("pkg-config" ,pkg-config)
893 ("xdg-utils" ,xdg-utils))) ;for xdg-icon-resource
895 `(("freetype" ,freetype)
898 ("python" ,python-wrapper)
902 `(#:tests? #f ; no check target
904 (modify-phases %standard-phases
905 (add-after 'unpack 'fix-icon-directory
906 (lambda* (#:key outputs #:allow-other-keys)
907 (let ((out (assoc-ref outputs "out")))
908 (substitute* "packages/linux/icons.sh"
910 (string-append out "/share"))))))
911 (add-after 'install 'install-desktop-file
912 (lambda* (#:key outputs #:allow-other-keys)
913 ;; Install desktop file.
914 (let* ((out (assoc-ref outputs "out"))
915 (apps (string-append out "/share/applications"))
916 (source "TeXmacs/misc/mime/texmacs.desktop"))
917 (install-file source apps))))
918 (add-before 'configure 'gzip-flags
920 (substitute* "Makefile.in"
921 (("^GZIP = gzip -f") "GZIP = gzip -f -n")))))))
922 (synopsis "Editing platform with special features for scientists")
924 "GNU TeXmacs is a text editing platform which is specialized for
925 scientists. It is ideal for editing structured documents with different types
926 of content. It has robust support for mathematical formulas and plots. It
927 can also act as an interface to external mathematical programs such as R and
928 Octave. TeXmacs is completely extensible via Guile.")
929 (license license:gpl3+)
930 (home-page "https://www.texmacs.org/tmweb/home/welcome.en.html")))
932 (define-public scintilla
939 (uri (let ((v (apply string-append (string-split version #\.))))
940 (string-append "https://www.scintilla.org/scintilla" v ".tgz")))
942 (base32 "0figd543inpi00yr6han73qd2fzx99r099vzcbg9mhpzsgxfwz4f"))))
943 (build-system gnu-build-system)
945 `(#:make-flags (list "GTK3=1" "CC=gcc" "-Cgtk")
946 #:tests? #f ;require un-packaged Pyside
948 (modify-phases %standard-phases
949 (delete 'configure) ;no configure script
951 ;; Upstream provides no install script.
952 (lambda* (#:key outputs #:allow-other-keys)
953 (let* ((out (assoc-ref outputs "out"))
954 (lib (string-append out "/lib"))
955 (include (string-append out "/include")))
956 (for-each (lambda (f) (install-file f lib))
957 (find-files "bin/" "\\.so$"))
958 (for-each (lambda (f) (install-file f include))
959 (find-files "include/" "."))))))))
961 `(("gcc" ,gcc-9) ;Code has C++17 requirements
962 ("pkg-config" ,pkg-config)
963 ("python" ,python-wrapper)))
966 (home-page "https://www.scintilla.org/")
967 (synopsis "Code editor for GTK+")
968 (description "Scintilla is a source code editing component for
969 GTK+. It has the usual features found in text editing components, as
970 well as some that are especially useful for editing and debugging
971 source code; these include support for syntax styling, error
972 indicators, code completion and call tips. Styling choices are more
973 open than with many editors: Scintilla lets you use proportional
974 fonts, bold and italics, multiple foreground and background colours,
975 and multiple fonts.")
976 (license license:hpnd)))
985 (uri (string-append "https://download.geany.org/"
986 "geany-" version ".tar.bz2"))
988 (base32 "060sachn33xpx3a609f09y97qq5ky17gvv686zbvrn618ij7bi8q"))))
989 (build-system gnu-build-system)
991 `(("autoconf" ,autoconf)
992 ("automake" ,automake)
995 ("intltool" ,intltool)
997 ("pkg-config" ,pkg-config)
998 ("python-docutils" ,python-docutils))) ;for rst2html
1001 ;; FIXME: Geany bundles a 3.X release of Scintilla. It is not
1002 ;; currently possible to replace it with our Scintilla package.
1003 ;; ("scintilla" ,scintilla)
1006 `(#:imported-modules ((guix build glib-or-gtk-build-system)
1007 ,@%gnu-build-system-modules)
1008 #:modules (((guix build glib-or-gtk-build-system) #:prefix glib-or-gtk:)
1009 (guix build gnu-build-system)
1012 (modify-phases %standard-phases
1013 (add-after 'install 'glib-or-gtk-wrap
1014 (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-wrap)))))
1015 (home-page "https://www.geany.org")
1016 (synopsis "Fast and lightweight IDE")
1017 (description "Geany is a small and fast Integrated Development
1018 Environment (IDE) that only has a few dependencies on other packages and is as
1019 independent as possible from special desktop environments like KDE or GNOME.
1021 The basic features of Geany are:
1023 @item syntax highlighting
1024 @item code completion
1025 @item auto completion of often constructed constructs like if, for and while
1026 @item auto completion of XML and HTML tags
1029 @item many supported filetypes like C, Java, PHP, HTML, Python, Perl, Pascal
1031 @item embedded terminal emulation
1032 @item extensibility through plugins
1034 (license license:gpl2+)))
1039 ;; Stable release is 1.9. However, this development version
1040 ;; introduces support for UTF-8.
1044 (uri (string-append "http://www.moria.de/~michael/fe/"
1045 "fe-" version ".tar.gz"))
1048 "10mk5wc3dsdp46b3hkjyd740gcdv6m1gvlr3p8xjxf55b3vfs0la"))))
1049 (build-system gnu-build-system)
1051 `(#:tests? #f ;no test
1052 ;; Sendmail is only used to send a crash log. Disable the
1053 ;; feature since it is (1) undocumented (2) not very useful.
1054 #:configure-flags (list "--disable-sendmail")
1056 (modify-phases %standard-phases
1057 (add-after 'install 'install-doc
1058 (lambda* (#:key outputs #:allow-other-keys)
1059 (let* ((out (assoc-ref outputs "out"))
1060 (doc (string-append out "/share/doc/" ,name "-" ,version)))
1061 (for-each (lambda (f) (install-file f doc))
1062 '("fe.doc" "fe.html" "fe.ps" "feref.ps" "README"))
1065 `(("gettext" ,gettext-minimal)))
1067 `(("ncurses" ,ncurses)))
1068 (home-page "http://www.moria.de/~michael/fe/")
1069 (synopsis "Small folding editor")
1070 (description "Fe is a small folding editor. It folds
1071 arbitrary text regions; it is not bound to syntactic units.
1073 Fe has no configuration or extension language and requires no setup.
1074 Its user interface is emacs-like and it has menus for the very most
1075 important functions to help beginners. Further there is a reference
1079 @item Regions and Emacs-like kill ring
1080 @item Incremental search
1081 @item Keyboard macros
1082 @item Editing binary files
1083 @item Multiple windows and views
1084 @item Compose function for Latin 1 characters
1086 (license license:gpl2+)))
1095 (url "https://github.com/vigna/ne")
1097 (file-name (git-file-name name version))
1100 "01aglnsfljlvx0wvyvpjfn4y88jf450a06qnj9a8lgdqv1hdkq1a"))))
1101 (build-system gnu-build-system)
1104 ("texinfo" ,texinfo)))
1106 `(("ncurses" ,ncurses)))
1111 (string-append "PREFIX=" (assoc-ref %outputs "out"))
1112 (string-append "LDFLAGS=-L" (assoc-ref %build-inputs "ncurses")
1115 (modify-phases %standard-phases
1118 (substitute* "src/makefile"
1119 (("-lcurses") "-lncurses"))
1121 (home-page "https://ne.di.unimi.it/")
1122 (synopsis "Text editor with menu bar")
1123 (description "This package provides a modeless text editor with menu bar.
1124 It supports syntax highlighting, regular expressions, configurable menus,
1125 keybindings, autocomplete and unlimited undo. It can pipe a marked block
1126 of text through any command line filter. It can also open very large binary
1127 files. It was originally developed on the Amiga 3000T.")
1128 (license license:gpl3+)))
1130 (define-public hexer
1137 (uri (string-append "https://devel.ringlet.net/files/editors/hexer/"
1138 "hexer-" version ".tar.xz"))
1140 (base32 "157z17z8qivdin2km2wp86x1bv1nx15frrwcz11mk0l3ab74mf76"))))
1141 (build-system gnu-build-system)
1143 `(#:tests? #f ;no upstream tests
1146 (string-append "PREFIX=" (assoc-ref %outputs "out"))
1147 (string-append "LTERMCAP=-lncurses")
1148 (string-append "LDFLAGS=-L" (assoc-ref %build-inputs "ncurses")
1151 (modify-phases %standard-phases
1152 (delete 'configure)))) ;no configure script
1154 `(("ncurses" ,ncurses)))
1155 (home-page "https://devel.ringlet.net/editors/hexer/")
1156 (synopsis "Multi buffer editor for binary files with vi-like interface")
1157 (description "Hexer is a multi-buffer editor for binary files for Unix-like
1158 systems that displays its buffer(s) as a hex dump. The user interface is kept
1160 (license license:bsd-3)))
1162 (define-public virtaal
1168 (uri (string-append "mirror://sourceforge/translate/Virtaal/"
1169 version "/virtaal-" version ".tar.bz2"))
1172 "0cyimjp3191qlmw6n0ipqdr9xr0cq4f6dqvz4rl9q31h6l3kywf9"))))
1173 (build-system python-build-system)
1175 `(#:python ,python-2
1176 #:use-setuptools? #f
1177 #:tests? #f ;; Failing tests
1179 (modify-phases %standard-phases
1180 (add-before 'build 'configure
1181 (lambda* (#:key outputs #:allow-other-keys)
1182 ;; Set data file path to absolute store path.
1183 (substitute* "virtaal/common/pan_app.py"
1184 (("file_discovery\\.get_abs_data_filename.*")
1185 (string-append "os.path.join('"
1186 (assoc-ref outputs "out")
1187 "/share', *path_parts)"))))))))
1189 `(("python2-lxml" ,python2-lxml)
1190 ("python2-pygtk" ,python2-pygtk)
1191 ("python2-simplejson" ,python2-simplejson)
1192 ("python2-translate-toolkit" ,python2-translate-toolkit)
1193 ("python2-pycurl" ,python2-pycurl)))
1194 (synopsis "Graphical translation tool")
1195 (description "Virtaal is a powerful yet simple translation tool with an
1196 uncluttered user interface. It supports a multitude of translation formats
1197 provided by the Translate Toolkit, including XLIFF and PO.")
1198 (home-page "https://virtaal.translatehouse.org/")
1199 (license license:gpl2+)))