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 base)
51 #:use-module (gnu packages boost)
52 #:use-module (gnu packages code)
53 #:use-module (gnu packages crates-io)
54 #:use-module (gnu packages documentation)
55 #:use-module (gnu packages fontutils)
56 #:use-module (gnu packages freedesktop)
57 #:use-module (gnu packages gcc)
58 #:use-module (gnu packages gettext)
59 #:use-module (gnu packages glib)
60 #:use-module (gnu packages gtk)
61 #:use-module (gnu packages guile)
62 #:use-module (gnu packages haskell-xyz)
63 #:use-module (gnu packages libbsd)
64 #:use-module (gnu packages libreoffice)
65 #:use-module (gnu packages llvm)
66 #:use-module (gnu packages lua)
67 #:use-module (gnu packages ncurses)
68 #:use-module (gnu packages pcre)
69 #:use-module (gnu packages perl)
70 #:use-module (gnu packages pkg-config)
71 #:use-module (gnu packages python)
72 #:use-module (gnu packages python-web)
73 #:use-module (gnu packages python-xyz)
74 #:use-module (gnu packages qt)
75 #:use-module (gnu packages regex)
76 #:use-module (gnu packages ruby)
77 #:use-module (gnu packages terminals)
78 #:use-module (gnu packages texinfo)
79 #:use-module (gnu packages version-control)
80 #:use-module (gnu packages xml)
81 #:use-module (gnu packages xorg))
86 (version "0.7") ; also update the vis-test input
91 (url "https://git.sr.ht/~martanne/vis")
92 (commit (string-append "v" version))))
94 (base32 "1g05ncsnk57kcqm9wsv6sz8b24kyzj8r5rfpa1wfwj8qkjzx3vji"))
95 (file-name (git-file-name name version))))
96 (build-system gnu-build-system)
98 `(#:test-target "test"
100 (modify-phases %standard-phases
101 (add-after 'unpack 'unpack-test-suite
102 (lambda* (#:key inputs #:allow-other-keys)
103 (let ((vis-test (assoc-ref inputs "vis-test")))
104 (copy-recursively vis-test "test")
106 (delete 'check) ; the tests need a wrapped vis
107 (add-after 'install 'wrap-binary
108 (lambda* (#:key inputs outputs #:allow-other-keys)
109 (let* ((out (assoc-ref outputs "out"))
110 (lpeg (assoc-ref inputs "lua-lpeg"))
111 (lua-version ,(version-major+minor (package-version lua)))
112 (LUA_PATH (string-append lpeg "/share/lua/"
113 lua-version "/?.lua"))
114 (LUA_CPATH (string-append lpeg "/lib/lua/"
115 lua-version "/?.so")))
116 (wrap-program (string-append out "/bin/vis")
117 `("LUA_PATH" ":" prefix (,LUA_PATH))
118 `("LUA_CPATH" ":" prefix (,LUA_CPATH)))
120 (add-after 'wrap-binary 'check
121 (assoc-ref %standard-phases 'check))
122 (add-before 'check 'set-up-tests
123 (lambda* (#:key outputs #:allow-other-keys)
124 (let ((out (assoc-ref outputs "out")))
125 ;; DEFAULT_COMPILER is hard-coded here.
126 (substitute* "test/core/ccan-config.c"
128 (format #f "\"~a\"" ,(cc-for-target))))
130 ;; Use the ‘vis’ executable that we wrapped above.
131 (install-file (string-append out "/bin/vis") ".")
133 ;; XXX Delete 2 failing tests. TODO: make them not fail. :-)
134 (for-each delete-file
135 (find-files "test/vis/selections" "^complement"))
142 (url "https://git.sr.ht/~martanne/vis-test")
143 (commit "bbd2f34ff788e87a51a74069069273ad83c44f1f")))
145 (base32 "1jsvg2lg3xqfgi79x08kx94mc34mh62ivca10vsci6fqsk68jbd0"))
146 (file-name (git-file-name "vis-test" version))))))
147 (inputs `(("lua" ,lua)
149 ("libtermkey" ,libtermkey)
150 ("lua-lpeg" ,lua-lpeg)
152 (synopsis "Vim-like text editor")
154 "Vis aims to be a modern, legacy free, simple yet efficient vim-like text
155 editor. It extends vim's modal editing with built-in support for multiple
156 cursors/selections and combines it with sam's structural regular expression
157 based command language.")
158 (home-page "https://github.com/martanne/vis")
159 (license (list license:isc ; Main distribution.
160 license:public-domain ; map.[ch]
161 license:expat)))) ; lexers and libutf.[ch]
163 (define-public kakoune
166 (version "2020.09.01")
170 (uri (string-append "https://github.com/mawww/kakoune/"
171 "releases/download/v" version "/"
172 "kakoune-" version ".tar.bz2"))
174 (base32 "0x81rxy7bqnhd9374g5ypy4w4nxmm0vnqw6b52bf62jxdg2qj6l6"))))
175 (build-system gnu-build-system)
178 (list (string-append "PREFIX=" (assoc-ref %outputs "out")))
180 (modify-phases %standard-phases
181 (add-after 'unpack 'patch-source
183 ;; kakoune uses confstr with _CS_PATH to find out where to find
184 ;; a posix shell, but this doesn't work in the build
185 ;; environment. This substitution just replaces that result
186 ;; with the "sh" path.
187 (substitute* "src/shell_manager.cc"
188 (("if \\(m_shell.empty\\(\\)\\)" line)
189 (string-append "m_shell = \"" (which "sh")
192 (delete 'configure) ; no configure script
193 ;; kakoune requires us to be in the src/ directory to build.
194 (add-before 'build 'chdir
195 (lambda _ (chdir "src") #t)))))
197 `(("asciidoc" ,asciidoc)
198 ("pkg-config" ,pkg-config)
201 `(("ncurses" ,ncurses)))
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 parantheses for Clojure, Lisp and Scheme")
285 "Parinfer is a plugin for Kakoune, Vim, Neovim and Emacs that infers
286 paretheses 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 "14vrm8lvwksf697sqks7xfd1xaqjlqjc9afjk33sksq5p27wr203"))
519 (modules '((guix build utils)))
521 (substitute* "GNUmakefile"
524 (build-system gnu-build-system)
526 `(("pkg-config" ,pkg-config)))
528 `(("diffutils" ,diffutils)
530 ("ncurses" ,ncurses)))
532 ;; No test suite available.
534 #:make-flags (list (string-append "prefix=" %output)
535 (string-append "CC=" ,(cc-for-target))
536 (string-append "PKG_CONFIG=" ,(pkg-config-for-target)))
537 #:phases (modify-phases %standard-phases
538 (delete 'configure) ; no configure script
539 (add-before 'build 'correct-location-of-diff
540 (lambda* (#:key inputs #:allow-other-keys)
541 (substitute* "buffer.c"
543 (string-append (assoc-ref inputs "diffutils")
545 (add-before 'install 'patch-tutorial-location
546 (lambda* (#:key outputs #:allow-other-keys)
548 (("/usr") (assoc-ref outputs "out")))))
549 (add-after 'install 'install-tutorial
550 (lambda* (#:key outputs #:allow-other-keys)
551 (let* ((out (assoc-ref outputs "out"))
552 (doc (string-append out "/share/doc/mg")))
553 (install-file "tutorial" doc)))))))
554 (home-page "https://homepage.boetes.org/software/mg/")
555 (synopsis "Microscopic GNU Emacs clone")
557 "Mg (@command{mg}) is a GNU Emacs style editor, with which it is
558 \"broadly\" compatible. This is a portable version of the mg maintained by the
560 (license license:public-domain)))
562 (define-public qemacs
569 (uri (string-append "https://bellard.org/qemacs/"
570 "qemacs-" version ".tar.gz"))
572 (base32 "156z4wpj49i6j388yjird5qvrph7hz0grb4r44l4jf3q8imadyrg"))))
573 (build-system gnu-build-system)
575 `(#:tests? #f ;no test
577 (modify-phases %standard-phases
578 (add-before 'build 'build-qhtml
579 ;; Build fails without first creating qHTML library.
580 (lambda _ (invoke "make" "-C" "libqhtml")))
581 (add-before 'install 'fix-man-pages-directory
582 ;; Install in $out/share/man instead of $out/man.
584 (substitute* "Makefile"
585 (("/man/man1" all) (string-append "/share" all)))
587 (add-before 'install 'create-directories
588 ;; Ensure directories exist before installing files.
589 (lambda* (#:key outputs #:allow-other-keys)
590 (let ((out (assoc-ref outputs "out")))
591 (for-each (lambda (d) (mkdir-p (string-append out d)))
592 '("/bin" "/share/man/man1" "/share/qe"))
594 (add-after 'install 'install-extra-documentation
595 ;; Install sample configuration file, Info, and HTML manual.
596 (lambda* (#:key native-inputs inputs outputs #:allow-other-keys)
597 (let* ((share (string-append (assoc-ref outputs "out") "/share"))
598 (doc (string-append share "/doc/" ,name "-" ,version))
599 (html (string-append share "/html"))
600 (info (string-append share "/info"))
601 (makeinfo (string-append
602 (assoc-ref (or native-inputs inputs) "texinfo")
604 ;; First fix Texinfo documentation, create appropriate
605 ;; directories, then generate Info and HTML files there.
606 (substitute* "qe-doc.texi"
607 (("^M-([{}])" _ bracket) (string-append "M-@" bracket)))
608 (for-each (lambda (d) (mkdir-p d)) (list html info))
609 (invoke makeinfo "qe-doc.texi" "-o" info)
610 (invoke makeinfo "qe-doc.texi" "--html" "--no-split" "-o" html)
611 ;; Install sample configuration file.
612 (install-file "config.eg" doc)
615 `(("texinfo" ,texinfo)))
620 (home-page "https://bellard.org/qemacs/")
621 (synopsis "Small but powerful text editor")
622 (description "QEmacs (for Quick Emacs) is a very small but
623 powerful editor. It has features that even big editors lack:
627 @item Full screen editor with an Emacs look and feel with all Emacs
628 common features: multi-buffer, multi-window, command mode, universal
629 argument, keyboard macros, config file with C-like syntax, minibuffer
630 with completion and history.
632 @item Can edit files of hundreds of Megabytes without being slow by
633 using a highly optimized internal representation and by mmaping the
636 @item Full Unicode support, including multi charset handling (8859-x,
637 UTF8, SJIS, EUC-JP, ...) and bidirectional editing respecting the
638 Unicode bidi algorithm. Arabic and Indic scripts handling (in
641 @item WYSIWYG HTML/XML/CSS2 mode graphical editing. Also supports
642 Lynx like rendering on VT100 terminals.
644 @item WYSIWYG DocBook mode based on XML/CSS2 renderer.
646 @item C mode: coloring with immediate update. Emacs like auto-indent.
648 @item Shell mode: colorized VT100 emulation so that your shell work
649 exactly as you expect. Compile mode with next/prev error.
651 @item Input methods for most languages, including Chinese (input
652 methods come from the Yudit editor).
654 @item Hexadecimal editing mode with insertion and block commands.
655 Unicode hexa editing is also supported.
657 @item Works on any VT100 terminals without termcap. UTF8 VT100
658 support included with double width glyphs.
660 @item X11 support. Support multiple proportional fonts at the same
661 time (as XEmacs). X Input methods supported. Xft extension supported
662 for anti aliased font display.
664 @item Small! Full version (including HTML/XML/CSS2/DocBook rendering
665 and all charsets): 200KB big. Basic version (without bidir/unicode
666 scripts/input/X11/C/Shell/HTML/Dired): 49KB.
668 (license license:lgpl2.1+)))
670 (define-public ghostwriter
677 (url "https://github.com/wereturtle/ghostwriter")
679 (file-name (git-file-name name version))
682 "19cf55b86yj2b5hdazbyw4iyp6xq155243aiyg4m0vhwh0h79nwh"))))
683 (build-system gnu-build-system)
685 `(("pkg-config" ,pkg-config)
686 ("qttools" ,qttools))) ; for lrelease
688 `(("hunspell" ,hunspell)
690 ("qtdeclarative" ,qtdeclarative)
691 ("qtmultimedia" ,qtmultimedia)
692 ("qtquickcontrols" ,qtquickcontrols)
694 ("qtwebchannel" ,qtwebchannel)))
695 (propagated-inputs ; To get native-search-path
696 `(("qtwebengine" ,qtwebengine)))
699 (modify-phases %standard-phases
701 (lambda* (#:key outputs #:allow-other-keys)
702 (let ((out (assoc-ref outputs "out")))
703 (invoke "qmake" (string-append "PREFIX=" out)))))
704 (add-after 'configure 'create-translations
706 ;; `lrelease` will not overwrite, so delete existing .qm files
707 (for-each delete-file (find-files "translations" ".*\\.qm"))
708 (apply invoke "lrelease" (find-files "translations" ".*\\.ts"))))
709 ;; Ensure that icons are found at runtime.
710 (add-after 'install 'wrap-executable
711 (lambda* (#:key inputs outputs #:allow-other-keys)
712 (let ((out (assoc-ref outputs "out")))
713 (wrap-program (string-append out "/bin/ghostwriter")
714 `("QT_PLUGIN_PATH" ":" prefix
715 ,(map (lambda (label)
716 (string-append (assoc-ref inputs label)
717 "/lib/qt5/plugins/"))
718 '("qtsvg" "qtmultimedia"))))))))))
719 (home-page "https://wereturtle.github.io/ghostwriter/")
720 (synopsis "Write without distractions")
722 "@code{ghostwriter} provides a relaxing, distraction-free writing
723 environment with Markdown markup.")
724 (license license:gpl3+))) ; icons/* under CC-BY-SA3
726 (define-public manuskript
734 (url "https://github.com/olivierkes/manuskript")
736 (file-name (git-file-name name version))
738 (base32 "0gfwwnpjslb0g8y3v9ha4sd8in6bpy6bhi4rn4hmfd2vmq2flpbd"))))
739 (build-system python-build-system)
741 `(#:tests? #f ;no test
743 (modify-phases %standard-phases
747 (lambda* (#:key outputs #:allow-other-keys)
748 (let* ((out (assoc-ref outputs "out"))
749 (share (string-append out "/share/manuskript")))
754 (let ((destination (string-append share "/" d)))
755 (mkdir-p destination)
756 (copy-recursively d destination)))
757 '("bin" "i18n" "icons" "libs" "manuskript" "resources"))
758 ;; Install documentation.
759 (let ((doc (string-append out
760 "/doc/manuskript-" ,version
761 "/sample-projects")))
763 (copy-recursively "sample-projects" doc))
764 ;; Wrap executable in "$out/share/manuskript/bin" and
765 ;; link to it from "$out/bin".
766 (let ((bin (string-append out "/bin"))
767 (executable (string-append share "/bin/manuskript")))
768 (wrap-program executable
769 (list "PYTHONPATH" 'prefix (list (getenv "PYTHONPATH"))))
771 (with-directory-excursion bin
772 (symlink (string-append share "/bin/manuskript")
774 ;; Install icons and create .desktop file.
775 (let ((apps (string-append out "/share/applications"))
776 (icons-dir (string-append out "/share/pixmaps")))
777 (install-file "icons/Manuskript/manuskript.svg" icons-dir)
779 (make-desktop-entry-file (string-append apps "/manuskript.desktop")
781 #:mime-type "application/x-manuskript-book;"
782 #:exec (string-append out "/bin/manuskript %f")
783 #:comment '((#f "Tool for writers")
784 ("es" "Herramienta para escritores/as"))
785 #:keywords "manuskript;office;write;edit;novel;text;msk"
789 #:categories "Office;WordProcessor;"))
793 ("python-lxml" ,python-lxml)
794 ("python-markdown" ,python-markdown)
795 ("python-pyqt" ,python-pyqt)
797 (home-page "http://www.theologeek.ch/manuskript/")
798 (synopsis "Tool for writers")
799 (description "Manuskript provides a rich environment to help
800 writers create their first draft and then further refine and edit
801 their masterpiece. With Manuskript you can:
804 @item Grow your premise from one sentence, to a paragraph, to a full
806 @item Create characters,
807 @item Conceive plots,
808 @item Construct outlines (Outline mode and/or Index cards),
809 @item Write with focus (Distraction free mode),
812 @item Edit and re-organize chapters and scenes,
813 @item View Story line,
814 @item Compose with fiction or non-fiction templates and writing modes,
815 @item Import and export document formats such as HTML, ePub,
816 OpenDocument, DocX, and more.
819 Additionally Manuskript can help in many more ways with a spell
820 checker, markdown highlighter, frequency analyzer, and automatic save
821 in plain text file format.")
822 (license license:gpl3+)))
824 (define-public editorconfig-core-c
826 (name "editorconfig-core-c")
832 (url "https://github.com/editorconfig/editorconfig-core-c")
833 (commit (string-append "v" version))))
834 (file-name (git-file-name name version))
836 (base32 "073sh18y0v8wm10iphaia54pkdmwylalccpn1k5i9dwyfjzgj7yg"))))
837 (build-system cmake-build-system)
840 (modify-phases %standard-phases
841 (add-after 'unpack 'insert-tests
842 (lambda* (#:key inputs #:allow-other-keys)
843 (let ((tests (assoc-ref inputs "tests")))
844 (copy-recursively tests "tests"))
846 (add-after 'install 'delete-static-library
847 (lambda* (#:key outputs #:allow-other-keys)
848 (let* ((out (assoc-ref outputs "out"))
849 (lib (string-append out "/lib")))
850 (with-directory-excursion lib
851 (delete-file "libeditorconfig_static.a"))
858 (url "https://github.com/editorconfig/editorconfig-core-test")
859 ;; The tests submodule commit matching this package's version.
860 (commit "48610d43b7455af12195473377f93c4ceea654f5")))
861 (file-name (git-file-name "editorconfig-core-test" version))
863 (base32 "1s29p4brmcsc3xsww3gk85dg45f1kk3iykh1air3ij0hymf5dyqy"))))))
866 (home-page "https://editorconfig.org/")
867 (synopsis "EditorConfig core library written in C")
868 (description "EditorConfig makes it easy to maintain the correct coding
869 style when switching between different text editors and between different
870 projects. The EditorConfig project maintains a file format and plugins for
871 various text editors which allow this file format to be read and used by those
873 (license license:bsd-2)))
875 (define-public texmacs
882 (uri (string-append "https://www.texmacs.org/Download/ftp/tmftp/"
883 "source/TeXmacs-" version "-src.tar.gz"))
885 (base32 "1gl6k1bwrk1y7hjyl4xvlqvmk5crl4jvsk8wrfp7ynbdin6n2i48"))))
886 (build-system gnu-build-system)
888 `(("pkg-config" ,pkg-config)
889 ("xdg-utils" ,xdg-utils))) ;for xdg-icon-resource
891 `(("freetype" ,freetype)
894 ("python" ,python-wrapper)
898 `(#:tests? #f ; no check target
900 (modify-phases %standard-phases
901 (add-after 'unpack 'fix-icon-directory
902 (lambda* (#:key outputs #:allow-other-keys)
903 (let ((out (assoc-ref outputs "out")))
904 (substitute* "packages/linux/icons.sh"
906 (string-append out "/share"))))))
907 (add-after 'install 'install-desktop-file
908 (lambda* (#:key outputs #:allow-other-keys)
909 ;; Install desktop file.
910 (let* ((out (assoc-ref outputs "out"))
911 (apps (string-append out "/share/applications"))
912 (source "TeXmacs/misc/mime/texmacs.desktop"))
913 (install-file source apps))))
914 (add-before 'configure 'gzip-flags
916 (substitute* "Makefile.in"
917 (("^GZIP = gzip -f") "GZIP = gzip -f -n")))))))
918 (synopsis "Editing platform with special features for scientists")
920 "GNU TeXmacs is a text editing platform which is specialized for
921 scientists. It is ideal for editing structured documents with different types
922 of content. It has robust support for mathematical formulas and plots. It
923 can also act as an interface to external mathematical programs such as R and
924 Octave. TeXmacs is completely extensible via Guile.")
925 (license license:gpl3+)
926 (home-page "https://www.texmacs.org/tmweb/home/welcome.en.html")))
928 (define-public scintilla
935 (uri (let ((v (apply string-append (string-split version #\.))))
936 (string-append "https://www.scintilla.org/scintilla" v ".tgz")))
938 (base32 "0figd543inpi00yr6han73qd2fzx99r099vzcbg9mhpzsgxfwz4f"))))
939 (build-system gnu-build-system)
941 `(#:make-flags (list "GTK3=1" "CC=gcc" "-Cgtk")
942 #:tests? #f ;require un-packaged Pyside
944 (modify-phases %standard-phases
945 (delete 'configure) ;no configure script
947 ;; Upstream provides no install script.
948 (lambda* (#:key outputs #:allow-other-keys)
949 (let* ((out (assoc-ref outputs "out"))
950 (lib (string-append out "/lib"))
951 (include (string-append out "/include")))
952 (for-each (lambda (f) (install-file f lib))
953 (find-files "bin/" "\\.so$"))
954 (for-each (lambda (f) (install-file f include))
955 (find-files "include/" "."))))))))
957 `(("gcc" ,gcc-9) ;Code has C++17 requirements
958 ("pkg-config" ,pkg-config)
959 ("python" ,python-wrapper)))
962 (home-page "https://www.scintilla.org/")
963 (synopsis "Code editor for GTK+")
964 (description "Scintilla is a source code editing component for
965 GTK+. It has the usual features found in text editing components, as
966 well as some that are especially useful for editing and debugging
967 source code; these include support for syntax styling, error
968 indicators, code completion and call tips. Styling choices are more
969 open than with many editors: Scintilla lets you use proportional
970 fonts, bold and italics, multiple foreground and background colours,
971 and multiple fonts.")
972 (license license:hpnd)))
981 (uri (string-append "https://download.geany.org/"
982 "geany-" version ".tar.bz2"))
984 (base32 "060sachn33xpx3a609f09y97qq5ky17gvv686zbvrn618ij7bi8q"))))
985 (build-system gnu-build-system)
987 `(("autoconf" ,autoconf)
988 ("automake" ,automake)
991 ("intltool" ,intltool)
993 ("pkg-config" ,pkg-config)
994 ("python-docutils" ,python-docutils))) ;for rst2html
997 ;; FIXME: Geany bundles a 3.X release of Scintilla. It is not
998 ;; currently possible to replace it with our Scintilla package.
999 ;; ("scintilla" ,scintilla)
1002 `(#:imported-modules ((guix build glib-or-gtk-build-system)
1003 ,@%gnu-build-system-modules)
1004 #:modules (((guix build glib-or-gtk-build-system) #:prefix glib-or-gtk:)
1005 (guix build gnu-build-system)
1008 (modify-phases %standard-phases
1009 (add-after 'install 'glib-or-gtk-wrap
1010 (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-wrap)))))
1011 (home-page "https://www.geany.org")
1012 (synopsis "Fast and lightweight IDE")
1013 (description "Geany is a small and fast Integrated Development
1014 Environment (IDE) that only has a few dependencies on other packages and is as
1015 independent as possible from special desktop environments like KDE or GNOME.
1017 The basic features of Geany are:
1019 @item syntax highlighting
1020 @item code completion
1021 @item auto completion of often constructed constructs like if, for and while
1022 @item auto completion of XML and HTML tags
1025 @item many supported filetypes like C, Java, PHP, HTML, Python, Perl, Pascal
1027 @item embedded terminal emulation
1028 @item extensibility through plugins
1030 (license license:gpl2+)))
1035 ;; Stable release is 1.9. However, this development version
1036 ;; introduces support for UTF-8.
1040 (uri (string-append "http://www.moria.de/~michael/fe/"
1041 "fe-" version ".tar.gz"))
1044 "10mk5wc3dsdp46b3hkjyd740gcdv6m1gvlr3p8xjxf55b3vfs0la"))))
1045 (build-system gnu-build-system)
1047 `(#:tests? #f ;no test
1048 ;; Sendmail is only used to send a crash log. Disable the
1049 ;; feature since it is (1) undocumented (2) not very useful.
1050 #:configure-flags (list "--disable-sendmail")
1052 (modify-phases %standard-phases
1053 (add-after 'install 'install-doc
1054 (lambda* (#:key outputs #:allow-other-keys)
1055 (let* ((out (assoc-ref outputs "out"))
1056 (doc (string-append out "/share/doc/" ,name "-" ,version)))
1057 (for-each (lambda (f) (install-file f doc))
1058 '("fe.doc" "fe.html" "fe.ps" "feref.ps" "README"))
1061 `(("gettext" ,gettext-minimal)))
1063 `(("ncurses" ,ncurses)))
1064 (home-page "http://www.moria.de/~michael/fe/")
1065 (synopsis "Small folding editor")
1066 (description "Fe is a small folding editor. It folds
1067 arbitrary text regions; it is not bound to syntactic units.
1069 Fe has no configuration or extension language and requires no setup.
1070 Its user interface is emacs-like and it has menus for the very most
1071 important functions to help beginners. Further there is a reference
1075 @item Regions and Emacs-like kill ring
1076 @item Incremental search
1077 @item Keyboard macros
1078 @item Editing binary files
1079 @item Multiple windows and views
1080 @item Compose function for Latin 1 characters
1082 (license license:gpl2+)))
1091 (url "https://github.com/vigna/ne")
1093 (file-name (git-file-name name version))
1096 "01aglnsfljlvx0wvyvpjfn4y88jf450a06qnj9a8lgdqv1hdkq1a"))))
1097 (build-system gnu-build-system)
1100 ("texinfo" ,texinfo)))
1102 `(("ncurses" ,ncurses)))
1107 (string-append "PREFIX=" (assoc-ref %outputs "out"))
1108 (string-append "LDFLAGS=-L" (assoc-ref %build-inputs "ncurses")
1111 (modify-phases %standard-phases
1114 (substitute* "src/makefile"
1115 (("-lcurses") "-lncurses"))
1117 (home-page "https://ne.di.unimi.it/")
1118 (synopsis "Text editor with menu bar")
1119 (description "This package provides a modeless text editor with menu bar.
1120 It supports syntax highlighting, regular expressions, configurable menus,
1121 keybindings, autocomplete and unlimited undo. It can pipe a marked block
1122 of text through any command line filter. It can also open very large binary
1123 files. It was originally developed on the Amiga 3000T.")
1124 (license license:gpl3+)))
1126 (define-public hexer
1133 (uri (string-append "https://devel.ringlet.net/files/editors/hexer/"
1134 "hexer-" version ".tar.xz"))
1136 (base32 "157z17z8qivdin2km2wp86x1bv1nx15frrwcz11mk0l3ab74mf76"))))
1137 (build-system gnu-build-system)
1139 `(#:tests? #f ;no upstream tests
1142 (string-append "PREFIX=" (assoc-ref %outputs "out"))
1143 (string-append "LTERMCAP=-lncurses")
1144 (string-append "LDFLAGS=-L" (assoc-ref %build-inputs "ncurses")
1147 (modify-phases %standard-phases
1148 (delete 'configure)))) ;no configure script
1150 `(("ncurses" ,ncurses)))
1151 (home-page "https://devel.ringlet.net/editors/hexer/")
1152 (synopsis "Multi buffer editor for binary files with vi-like interface")
1153 (description "Hexer is a multi-buffer editor for binary files for Unix-like
1154 systems that displays its buffer(s) as a hex dump. The user interface is kept
1156 (license license:bsd-3)))
1158 (define-public virtaal
1164 (uri (string-append "mirror://sourceforge/translate/Virtaal/"
1165 version "/virtaal-" version ".tar.bz2"))
1168 "0cyimjp3191qlmw6n0ipqdr9xr0cq4f6dqvz4rl9q31h6l3kywf9"))))
1169 (build-system python-build-system)
1171 `(#:python ,python-2
1172 #:use-setuptools? #f
1173 #:tests? #f ;; Failing tests
1175 (modify-phases %standard-phases
1176 (add-before 'build 'configure
1177 (lambda* (#:key outputs #:allow-other-keys)
1178 ;; Set data file path to absolute store path.
1179 (substitute* "virtaal/common/pan_app.py"
1180 (("file_discovery\\.get_abs_data_filename.*")
1181 (string-append "os.path.join('"
1182 (assoc-ref outputs "out")
1183 "/share', *path_parts)"))))))))
1185 `(("python2-lxml" ,python2-lxml)
1186 ("python2-pygtk" ,python2-pygtk)
1187 ("python2-simplejson" ,python2-simplejson)
1188 ("python2-translate-toolkit" ,python2-translate-toolkit)
1189 ("python2-pycurl" ,python2-pycurl)))
1190 (synopsis "Graphical translation tool")
1191 (description "Virtaal is a powerful yet simple translation tool with an
1192 uncluttered user interface. It supports a multitude of translation formats
1193 provided by the Translate Toolkit, including XLIFF and PO.")
1194 (home-page "https://virtaal.translatehouse.org/")
1195 (license license:gpl2+)))