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, 2021 Marius Bakke <marius@gnu.org>
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 gexp)
40 #:use-module (guix git-download)
41 #:use-module (guix utils)
42 #:use-module (guix build-system cargo)
43 #:use-module (guix build-system cmake)
44 #:use-module (guix build-system gnu)
45 #:use-module (guix build-system glib-or-gtk)
46 #:use-module (guix build-system python)
47 #:use-module ((guix licenses) #:prefix license:)
48 #:use-module (gnu packages)
49 #:use-module (gnu packages aspell)
50 #:use-module (gnu packages assembly)
51 #:use-module (gnu packages autotools)
52 #:use-module (gnu packages base)
53 #:use-module (gnu packages boost)
54 #:use-module (gnu packages code)
55 #:use-module (gnu packages crates-io)
56 #:use-module (gnu packages documentation)
57 #:use-module (gnu packages fontutils)
58 #:use-module (gnu packages freedesktop)
59 #:use-module (gnu packages gcc)
60 #:use-module (gnu packages gettext)
61 #:use-module (gnu packages glib)
62 #:use-module (gnu packages gtk)
63 #:use-module (gnu packages guile)
64 #:use-module (gnu packages haskell-xyz)
65 #:use-module (gnu packages libbsd)
66 #:use-module (gnu packages libreoffice)
67 #:use-module (gnu packages llvm)
68 #:use-module (gnu packages lua)
69 #:use-module (gnu packages ncurses)
70 #:use-module (gnu packages pcre)
71 #:use-module (gnu packages perl)
72 #:use-module (gnu packages pkg-config)
73 #:use-module (gnu packages python)
74 #:use-module (gnu packages python-web)
75 #:use-module (gnu packages python-xyz)
76 #:use-module (gnu packages qt)
77 #:use-module (gnu packages regex)
78 #:use-module (gnu packages ruby)
79 #:use-module (gnu packages terminals)
80 #:use-module (gnu packages texinfo)
81 #:use-module (gnu packages version-control)
82 #:use-module (gnu packages xml)
83 #:use-module (gnu packages xorg))
88 (version "0.7") ; also update the vis-test input
93 (url "https://git.sr.ht/~martanne/vis")
94 (commit (string-append "v" version))))
96 (base32 "1g05ncsnk57kcqm9wsv6sz8b24kyzj8r5rfpa1wfwj8qkjzx3vji"))
97 (file-name (git-file-name name version))))
98 (build-system gnu-build-system)
100 `(#:test-target "test"
102 (modify-phases %standard-phases
103 (add-after 'unpack 'unpack-test-suite
104 (lambda* (#:key inputs #:allow-other-keys)
105 (let ((vis-test (assoc-ref inputs "vis-test")))
106 (copy-recursively vis-test "test")
108 (delete 'check) ; the tests need a wrapped vis
109 (add-after 'install 'wrap-binary
110 (lambda* (#:key inputs outputs #:allow-other-keys)
111 (let* ((out (assoc-ref outputs "out"))
112 (lpeg (assoc-ref inputs "lua-lpeg"))
113 (lua-version ,(version-major+minor (package-version lua)))
114 (LUA_PATH (string-append lpeg "/share/lua/"
115 lua-version "/?.lua"))
116 (LUA_CPATH (string-append lpeg "/lib/lua/"
117 lua-version "/?.so")))
118 (wrap-program (string-append out "/bin/vis")
119 `("LUA_PATH" ":" prefix (,LUA_PATH))
120 `("LUA_CPATH" ":" prefix (,LUA_CPATH)))
122 (add-after 'wrap-binary 'check
123 (assoc-ref %standard-phases 'check))
124 (add-before 'check 'set-up-tests
125 (lambda* (#:key outputs #:allow-other-keys)
126 (let ((out (assoc-ref outputs "out")))
127 ;; DEFAULT_COMPILER is hard-coded here.
128 (substitute* "test/core/ccan-config.c"
130 (format #f "\"~a\"" ,(cc-for-target))))
132 ;; Use the ‘vis’ executable that we wrapped above.
133 (install-file (string-append out "/bin/vis") ".")
135 ;; XXX Delete 2 failing tests. TODO: make them not fail. :-)
136 (for-each delete-file
137 (find-files "test/vis/selections" "^complement"))
144 (url "https://git.sr.ht/~martanne/vis-test")
145 (commit "bbd2f34ff788e87a51a74069069273ad83c44f1f")))
147 (base32 "1jsvg2lg3xqfgi79x08kx94mc34mh62ivca10vsci6fqsk68jbd0"))
148 (file-name (git-file-name "vis-test" version))))))
149 (inputs `(("lua" ,lua)
151 ("libtermkey" ,libtermkey)
152 ("lua-lpeg" ,lua-lpeg)
154 (synopsis "Vim-like text editor")
156 "Vis aims to be a modern, legacy free, simple yet efficient vim-like text
157 editor. It extends vim's modal editing with built-in support for multiple
158 cursors/selections and combines it with sam's structural regular expression
159 based command language.")
160 (home-page "https://github.com/martanne/vis")
161 (license (list license:isc ; Main distribution.
162 license:public-domain ; map.[ch]
163 license:expat)))) ; lexers and libutf.[ch]
165 (define-public kakoune
168 (version "2021.08.28")
172 (uri (string-append "https://github.com/mawww/kakoune/"
173 "releases/download/v" version "/"
174 "kakoune-" version ".tar.bz2"))
176 (base32 "1jvn4b9rma5jjvg3xz8nf224pbq3ry570j6qvc834wn5v3gxfvkg"))))
177 (build-system gnu-build-system)
180 (list (string-append "PREFIX=" (assoc-ref %outputs "out")))
182 (modify-phases %standard-phases
183 (add-after 'unpack 'patch-source
185 ;; kakoune uses confstr with _CS_PATH to find out where to find
186 ;; a posix shell, but this doesn't work in the build
187 ;; environment. This substitution just replaces that result
188 ;; with the "sh" path.
189 (substitute* "src/shell_manager.cc"
190 (("if \\(m_shell.empty\\(\\)\\)" line)
191 (string-append "m_shell = \"" (which "sh")
194 (delete 'configure) ; no configure script
195 ;; kakoune requires us to be in the src/ directory to build.
196 (add-before 'build 'chdir
197 (lambda _ (chdir "src") #t)))))
199 `(("gcc", gcc-10) ; See https://github.com/mawww/kakoune/issues/4318
200 ("asciidoc" ,asciidoc)
201 ("pkg-config" ,pkg-config)
203 (synopsis "Vim-inspired code editor")
205 "Kakoune is a code editor heavily inspired by Vim, as such most of its
206 commands are similar to Vi's ones, and it shares Vi's \"keystrokes as a text
207 editing language\" model. Kakoune has a strong focus on interactivity, most
208 commands provide immediate and incremental results, while still being
209 competitive (as in keystroke count) with Vim.")
210 (home-page "https://kakoune.org/")
211 (license license:unlicense)))
213 (define-public kak-lsp
221 (url "https://github.com/kak-lsp/kak-lsp")
222 (commit (string-append "v" version))))
223 (file-name (git-file-name name version))
224 (sha256 "1wfv2fy5ga6kc51zka3pak0hq97csm2l11bz74w3n1hrf5q9nnf8")))
225 (build-system cargo-build-system)
228 (("rust-crossbeam-channel" ,rust-crossbeam-channel-0.4)
229 ("rust-clap" ,rust-clap-2)
230 ("rust-daemonize" ,rust-daemonize-0.4)
231 ("rust-dirs" ,rust-dirs-2)
232 ("rust-enum_primitive" ,rust-enum-primitive-0.1)
233 ("rust-glob" ,rust-glob-0.3)
234 ("rust-itertools" ,rust-itertools-0.9)
235 ("rust-lsp-types" ,rust-lsp-types-0.80)
236 ("rust-jsonrpc-core" ,rust-jsonrpc-core-14)
237 ("rust-libc" ,rust-libc-0.2)
238 ("rust-rand" ,rust-rand-0.7)
239 ("rust-regex" ,rust-regex-1)
240 ("rust-ropey" ,rust-ropey-1)
241 ("rust-serde" ,rust-serde-1)
242 ("rust-serde_derive" ,rust-serde-derive-1)
243 ("rust-serde_json" ,rust-serde-json-1)
244 ("rust-slog" ,rust-slog-2)
245 ("rust-slog-scope" ,rust-slog-scope-4)
246 ("rust-sloggers" ,rust-sloggers-1)
247 ("rust-toml" ,rust-toml-0.5)
248 ("rust-url" ,rust-url-2)
249 ("rust-whoami" ,rust-whoami-0.8))))
250 (home-page "https://github.com/kak-lsp/kak-lsp")
251 (synopsis "Language Server Protocol (LSP) client for Kakoune")
253 "kak-lsp is a Language Server Protocol client for Kakoune implemented in
255 (license license:unlicense)))
257 (define-public parinfer-rust
259 (name "parinfer-rust")
265 (url "https://github.com/eraserhd/parinfer-rust")
266 (commit (string-append "v" version))))
268 (base32 "0hj5in5h7pj72m4ag80ing513fh65q8xlsf341qzm3vmxm3y3jgd"))
269 (file-name (git-file-name name version))))
270 (build-system cargo-build-system)
273 (("rust-getopts" ,rust-getopts-0.2)
274 ("rust-libc" ,rust-libc-0.2)
275 ("rust-emacs" ,rust-emacs-0.11)
276 ("rust-serde" ,rust-serde-1)
277 ("rust-serde-json" ,rust-serde-json-1)
278 ("rust-serde-derive" ,rust-serde-derive-1)
279 ("rust-unicode-segmentation" ,rust-unicode-segmentation-1)
280 ("rust-unicode-width" ,rust-unicode-width-0.1))))
283 (home-page "https://github.com/justinbarclay/parinfer-rust")
284 (synopsis "Infer parentheses for Clojure, Lisp and Scheme")
286 "Parinfer is a plugin for Kakoune, Vim, Neovim and Emacs that infers
287 parentheses and indentation. This library can be called from other editors that
288 can load dynamic libraries.")
289 (license license:expat)))
298 (uri (string-append "https://sourceforge.net/projects/joe-editor/"
299 "files/JOE sources/joe-" version "/"
300 "joe-" version ".tar.gz"))
303 "1pmr598xxxm9j9dl93kq4dv36zyw0q2dh6d7x07hf134y9hhlnj9"))))
304 (build-system gnu-build-system)
305 (inputs `(("ncurses" ,ncurses)))
306 (home-page "http://joe-editor.sourceforge.net/")
307 (synopsis "Console screen editor")
309 "JOE is a powerful console screen editor with a \"mode-less\" user
310 interface similar to many user-friendly editors. JOE has some of the key
311 bindings and many of the powerful features of GNU Emacs.")
312 (license license:gpl3+)))
314 (define-public jucipp
318 (home-page "https://gitlab.com/cppit/jucipp")
321 (uri (git-reference (url home-page)
322 (commit (string-append "v" version))
323 ;; Two submodules are required which are
324 ;; developed alongside JuCi++ and difficult
325 ;; to package separately.
327 (file-name (git-file-name name version))
329 (base32 "1gy2xb5rm7q4zx9rl23h96b1i46fz27v25nklj50fvqp8ax2gxqy"))))
330 (build-system cmake-build-system)
332 `(#:configure-flags '("-DBUILD_TESTING=ON"
334 ;; These arguments are here to facilitate an "in-source"
335 ;; build using "./build" instead of the default "../build".
336 ;; The test suite expects that to be the case.
339 #:phases (modify-phases %standard-phases
340 (add-before 'configure 'enter-build-directory
346 (add-after 'unpack 'patch-tiny-process-library
348 (with-directory-excursion "lib/tiny-process-library"
349 (substitute* '("process_unix.cpp"
351 (("/bin/sh") (which "sh"))))
353 (add-after 'unpack 'disable-git-test
355 (substitute* "tests/CMakeLists.txt"
356 ;; Disable the git test, as it requires the full checkout.
357 (("add_test\\(git_test.*\\)") ""))
359 (add-before 'check 'pre-check
360 (lambda* (#:key inputs #:allow-other-keys)
361 ;; Tests do not expect HOME to be empty.
362 (setenv "HOME" "/etc")
364 ;; Most tests require an X server.
365 (let ((xorg-server (assoc-ref inputs "xorg-server"))
367 (setenv "DISPLAY" display)
368 (system (string-append xorg-server "/bin/Xvfb "
371 (add-after 'install 'wrap
372 (lambda* (#:key inputs outputs #:allow-other-keys)
373 ;; The package needs GTK+ and GtkSourceView on XDG_DATA_DIRS
374 ;; for syntax highlighting to work. shared-mime-info is
375 ;; necessary for MIME handling.
376 ;; XXX: Ideally we'd reuse glib-or-gtk-wrap here, but it
377 ;; does not pick up $gtksourceview/share/gtksourceview-3.0.
378 (let ((out (assoc-ref outputs "out"))
379 (gtk+ (assoc-ref inputs "gtk+"))
380 (gtksourceview (assoc-ref inputs "gtksourceview"))
381 (shared-mime-info (assoc-ref inputs "shared-mime-info")))
382 (wrap-program (string-append out "/bin/juci")
383 `("XDG_DATA_DIRS" ":" prefix
386 (string-append pkg "/share"))
387 (list out gtk+ gtksourceview shared-mime-info))
391 `(("pkg-config" ,pkg-config)
392 ("xorg-server" ,xorg-server-for-tests)))
396 ("ctags" ,universal-ctags)
398 ("gtksourceviewmm" ,gtksourceviewmm)
399 ("libclang" ,clang-11) ;XXX: must be the same version as Mesas LLVM
400 ("libgit2" ,libgit2)))
401 (synopsis "Lightweight C++ IDE")
403 "juCi++ is a small @acronym{IDE, Integrated Development Environment}
404 designed especially towards libclang with speed, stability, and ease of use
407 It supports autocompletion, on-the-fly warnings and errors, syntax
408 highlighting, and integrates with Git as well as the CMake and Meson build
410 (license license:expat)))
412 (define-public leafpad
418 (uri (string-append "mirror://savannah/"
419 "leafpad/leafpad-" version ".tar.gz"))
422 "0b0az2wvqgvam7w0ns1j8xp2llslm1rx6h7zcsy06a7j0yp257cm"))))
423 (build-system glib-or-gtk-build-system)
425 `(("intltool" ,intltool)
426 ("pkg-config" ,pkg-config)))
429 (home-page "http://tarot.freeshell.org/leafpad/")
430 (synopsis "GTK+ based text editor")
431 (description "Leafpad is a GTK+ text editor that emphasizes simplicity. As
432 development focuses on keeping weight down to a minimum, only the most essential
433 features are implemented in the editor. Leafpad is simple to use, is easily
434 compiled, requires few libraries, and starts up quickly. ")
435 (license license:gpl2+)))
437 (define-public l3afpad
438 (let ((commit "5235c9e13bbf0d31a902c6776918c2d7cdbb61ff")
442 (version (git-version "0.8.18.1.11" revision commit))
445 (file-name (git-file-name name version))
447 (url "https://github.com/stevenhoneyman/l3afpad")
451 "1alyghm2wpakzdfag0g4g8gb1h9l4wdg7mnhq8bk0iq5ryqia16a"))))
452 (build-system glib-or-gtk-build-system)
454 `(("intltool" ,intltool)
455 ("autoconf" ,autoconf)
456 ("automake" ,automake)
457 ("pkg-config" ,pkg-config)))
460 (home-page "http://tarot.freeshell.org/leafpad/")
461 (synopsis "GTK+ 3 based text editor")
462 (description "L3afpad is a GTK+ 3 text editor that emphasizes simplicity. As
463 development focuses on keeping weight down to a minimum, only the most essential
464 features are implemented in the editor. L3afpad is simple to use, is easily
465 compiled, requires few libraries, and starts up quickly. L3afpad is a
466 fork of Leafpad that uses GTK+ 3 instead of GTK+ 2.")
467 (license license:gpl2+))))
475 (uri (string-append "https://sites.google.com/site/e3editor/Home/"
476 "e3-" version ".tgz"))
479 "0919kadkas020maqq37852isnzp053q2fnws2zh3mz81d1jiviak"))
480 (modules '((guix build utils)))
482 ;; Remove pre-built binaries.
484 (delete-file-recursively "bin")
486 (build-system gnu-build-system)
489 #:make-flags (list (string-append "PREFIX="
490 (assoc-ref %outputs "out")))
491 #:phases (modify-phases %standard-phases
492 (delete 'configure))))
495 (home-page "https://sites.google.com/site/e3editor/")
496 (synopsis "Tiny text editor written in assembly")
498 "e3 is a micro text editor with an executable code size between 3800 and
499 35000 bytes. Except for ``syntax highlighting'', the e3 binary supports all
500 of the basic functions one expects plus built in arithmetic calculations.
501 UTF-8 coding of unicode characters is supported as well. e3 can use
502 Wordstar-, EMACS-, Pico, Nedit or vi-like key bindings. e3 can be used on
503 16, 32, and 64-bit CPUs.")
504 (supported-systems '("x86_64-linux" "i686-linux"))
505 (license license:gpl2+)))
514 (url "https://github.com/hboetes/mg")
516 (file-name (git-file-name name version))
519 "04c2vqxg31mk15cfrhzrivykis8fmf0m1d8h1qdjdmlfxd4qwaqf"))
520 (modules '((guix build utils)))
522 (substitute* "GNUmakefile"
523 (("/usr/bin/") ""))))))
524 (build-system gnu-build-system)
525 (native-inputs (list pkg-config))
526 (inputs (list diffutils libbsd ncurses))
528 ;; No test suite available.
531 #~(list (string-append "prefix=" #$output)
532 (string-append "CC=" #$(cc-for-target))
533 (string-append "PKG_CONFIG=" #$(pkg-config-for-target)))
535 #~(modify-phases %standard-phases
536 (delete 'configure) ;no configure script
537 (add-before 'build 'correct-location-of-diff
538 (lambda* (#:key inputs #:allow-other-keys)
539 (substitute* "buffer.c"
541 (search-input-file inputs "/bin/diff")))))
542 (add-before 'install 'patch-tutorial-location
545 (("/usr") #$output))))
546 (add-after 'install 'install-tutorial
548 (let ((doc (string-append #$output "/share/doc/mg")))
549 (install-file "tutorial" doc)))))))
550 (home-page "https://homepage.boetes.org/software/mg/")
551 (synopsis "Microscopic GNU Emacs clone")
553 "Mg (@command{mg}) is a GNU Emacs style editor, with which it is
554 \"broadly\" compatible. This is a portable version of the mg maintained by the
556 (license license:public-domain)))
558 (define-public qemacs
565 (uri (string-append "https://bellard.org/qemacs/"
566 "qemacs-" version ".tar.gz"))
568 (base32 "156z4wpj49i6j388yjird5qvrph7hz0grb4r44l4jf3q8imadyrg"))))
569 (build-system gnu-build-system)
571 `(#:tests? #f ;no test
573 (modify-phases %standard-phases
574 (add-before 'build 'build-qhtml
575 ;; Build fails without first creating qHTML library.
576 (lambda _ (invoke "make" "-C" "libqhtml")))
577 (add-before 'install 'fix-man-pages-directory
578 ;; Install in $out/share/man instead of $out/man.
580 (substitute* "Makefile"
581 (("/man/man1" all) (string-append "/share" all)))
583 (add-before 'install 'create-directories
584 ;; Ensure directories exist before installing files.
585 (lambda* (#:key outputs #:allow-other-keys)
586 (let ((out (assoc-ref outputs "out")))
587 (for-each (lambda (d) (mkdir-p (string-append out d)))
588 '("/bin" "/share/man/man1" "/share/qe"))
590 (add-after 'install 'install-extra-documentation
591 ;; Install sample configuration file, Info, and HTML manual.
592 (lambda* (#:key native-inputs inputs outputs #:allow-other-keys)
593 (let* ((share (string-append (assoc-ref outputs "out") "/share"))
594 (doc (string-append share "/doc/" ,name "-" ,version))
595 (html (string-append share "/html"))
596 (info (string-append share "/info"))
597 (makeinfo (string-append
598 (assoc-ref (or native-inputs inputs) "texinfo")
600 ;; First fix Texinfo documentation, create appropriate
601 ;; directories, then generate Info and HTML files there.
602 (substitute* "qe-doc.texi"
603 (("^M-([{}])" _ bracket) (string-append "M-@" bracket)))
604 (for-each (lambda (d) (mkdir-p d)) (list html info))
605 (invoke makeinfo "qe-doc.texi" "-o" info)
606 (invoke makeinfo "qe-doc.texi" "--html" "--no-split" "-o" html)
607 ;; Install sample configuration file.
608 (install-file "config.eg" doc)
611 `(("texinfo" ,texinfo)))
616 (home-page "https://bellard.org/qemacs/")
617 (synopsis "Small but powerful text editor")
618 (description "QEmacs (for Quick Emacs) is a very small but
619 powerful editor. It has features that even big editors lack:
623 @item Full screen editor with an Emacs look and feel with all Emacs
624 common features: multi-buffer, multi-window, command mode, universal
625 argument, keyboard macros, config file with C-like syntax, minibuffer
626 with completion and history.
628 @item Can edit files of hundreds of Megabytes without being slow by
629 using a highly optimized internal representation and by mmaping the
632 @item Full Unicode support, including multi charset handling (8859-x,
633 UTF8, SJIS, EUC-JP, ...) and bidirectional editing respecting the
634 Unicode bidi algorithm. Arabic and Indic scripts handling (in
637 @item WYSIWYG HTML/XML/CSS2 mode graphical editing. Also supports
638 Lynx like rendering on VT100 terminals.
640 @item WYSIWYG DocBook mode based on XML/CSS2 renderer.
642 @item C mode: coloring with immediate update. Emacs like auto-indent.
644 @item Shell mode: colorized VT100 emulation so that your shell work
645 exactly as you expect. Compile mode with next/prev error.
647 @item Input methods for most languages, including Chinese (input
648 methods come from the Yudit editor).
650 @item Hexadecimal editing mode with insertion and block commands.
651 Unicode hexa editing is also supported.
653 @item Works on any VT100 terminals without termcap. UTF8 VT100
654 support included with double width glyphs.
656 @item X11 support. Support multiple proportional fonts at the same
657 time (as XEmacs). X Input methods supported. Xft extension supported
658 for anti aliased font display.
660 @item Small! Full version (including HTML/XML/CSS2/DocBook rendering
661 and all charsets): 200KB big. Basic version (without bidir/unicode
662 scripts/input/X11/C/Shell/HTML/Dired): 49KB.
664 (license license:lgpl2.1+)))
666 (define-public ghostwriter
673 (url "https://github.com/wereturtle/ghostwriter")
675 (file-name (git-file-name name version))
678 "19cf55b86yj2b5hdazbyw4iyp6xq155243aiyg4m0vhwh0h79nwh"))))
679 (build-system gnu-build-system)
681 `(("pkg-config" ,pkg-config)
682 ("qttools" ,qttools))) ; for lrelease
684 `(("hunspell" ,hunspell)
686 ("qtdeclarative" ,qtdeclarative)
687 ("qtmultimedia" ,qtmultimedia)
688 ("qtquickcontrols" ,qtquickcontrols)
690 ("qtwebchannel" ,qtwebchannel)))
691 (propagated-inputs ; To get native-search-path
692 `(("qtwebengine" ,qtwebengine)))
695 (modify-phases %standard-phases
697 (lambda* (#:key outputs #:allow-other-keys)
698 (let ((out (assoc-ref outputs "out")))
699 (invoke "qmake" (string-append "PREFIX=" out)))))
700 (add-after 'configure 'create-translations
702 ;; `lrelease` will not overwrite, so delete existing .qm files
703 (for-each delete-file (find-files "translations" ".*\\.qm"))
704 (apply invoke "lrelease" (find-files "translations" ".*\\.ts"))))
705 ;; Ensure that icons are found at runtime.
706 (add-after 'install 'wrap-executable
707 (lambda* (#:key inputs outputs #:allow-other-keys)
708 (let ((out (assoc-ref outputs "out")))
709 (wrap-program (string-append out "/bin/ghostwriter")
710 `("QT_PLUGIN_PATH" ":" prefix
711 ,(map (lambda (label)
712 (string-append (assoc-ref inputs label)
713 "/lib/qt5/plugins/"))
714 '("qtsvg" "qtmultimedia"))))))))))
715 (home-page "https://wereturtle.github.io/ghostwriter/")
716 (synopsis "Write without distractions")
718 "@code{ghostwriter} provides a relaxing, distraction-free writing
719 environment with Markdown markup.")
720 (license license:gpl3+))) ; icons/* under CC-BY-SA3
722 (define-public manuskript
730 (url "https://github.com/olivierkes/manuskript")
732 (file-name (git-file-name name version))
734 (base32 "0gfwwnpjslb0g8y3v9ha4sd8in6bpy6bhi4rn4hmfd2vmq2flpbd"))))
735 (build-system python-build-system)
737 `(#:tests? #f ;no test
739 (modify-phases %standard-phases
743 (lambda* (#:key outputs #:allow-other-keys)
744 (let* ((out (assoc-ref outputs "out"))
745 (share (string-append out "/share/manuskript")))
750 (let ((destination (string-append share "/" d)))
751 (mkdir-p destination)
752 (copy-recursively d destination)))
753 '("bin" "i18n" "icons" "libs" "manuskript" "resources"))
754 ;; Install documentation.
755 (let ((doc (string-append out
756 "/doc/manuskript-" ,version
757 "/sample-projects")))
759 (copy-recursively "sample-projects" doc))
760 ;; Wrap executable in "$out/share/manuskript/bin" and
761 ;; link to it from "$out/bin".
762 (let ((bin (string-append out "/bin"))
763 (executable (string-append share "/bin/manuskript")))
764 (wrap-program executable
765 (list "GUIX_PYTHONPATH" 'prefix
766 (list (getenv "GUIX_PYTHONPATH"))))
768 (with-directory-excursion bin
769 (symlink (string-append share "/bin/manuskript")
771 ;; Install icons and create .desktop file.
772 (let ((apps (string-append out "/share/applications"))
773 (icons-dir (string-append out "/share/pixmaps")))
774 (install-file "icons/Manuskript/manuskript.svg" icons-dir)
776 (make-desktop-entry-file (string-append apps "/manuskript.desktop")
778 #:mime-type "application/x-manuskript-book;"
779 #:exec (string-append out "/bin/manuskript %f")
780 #:comment '((#f "Tool for writers")
781 ("es" "Herramienta para escritores/as"))
782 #:keywords "manuskript;office;write;edit;novel;text;msk"
786 #:categories "Office;WordProcessor;"))
790 ("python-lxml" ,python-lxml)
791 ("python-markdown" ,python-markdown)
792 ("python-pyqt" ,python-pyqt)
794 (home-page "http://www.theologeek.ch/manuskript/")
795 (synopsis "Tool for writers")
796 (description "Manuskript provides a rich environment to help
797 writers create their first draft and then further refine and edit
798 their masterpiece. With Manuskript you can:
801 @item Grow your premise from one sentence, to a paragraph, to a full
803 @item Create characters,
804 @item Conceive plots,
805 @item Construct outlines (Outline mode and/or Index cards),
806 @item Write with focus (Distraction free mode),
809 @item Edit and re-organize chapters and scenes,
810 @item View Story line,
811 @item Compose with fiction or non-fiction templates and writing modes,
812 @item Import and export document formats such as HTML, ePub,
813 OpenDocument, DocX, and more.
816 Additionally Manuskript can help in many more ways with a spell
817 checker, markdown highlighter, frequency analyzer, and automatic save
818 in plain text file format.")
819 (license license:gpl3+)))
821 (define-public editorconfig-core-c
823 (name "editorconfig-core-c")
829 (url "https://github.com/editorconfig/editorconfig-core-c")
830 (commit (string-append "v" version))))
831 (file-name (git-file-name name version))
833 (base32 "073sh18y0v8wm10iphaia54pkdmwylalccpn1k5i9dwyfjzgj7yg"))))
834 (build-system cmake-build-system)
837 (modify-phases %standard-phases
838 (add-after 'unpack 'insert-tests
839 (lambda* (#:key inputs #:allow-other-keys)
840 (let ((tests (assoc-ref inputs "tests")))
841 (copy-recursively tests "tests"))
843 (add-after 'install 'delete-static-library
844 (lambda* (#:key outputs #:allow-other-keys)
845 (let* ((out (assoc-ref outputs "out"))
846 (lib (string-append out "/lib")))
847 (with-directory-excursion lib
848 (delete-file "libeditorconfig_static.a"))
855 (url "https://github.com/editorconfig/editorconfig-core-test")
856 ;; The tests submodule commit matching this package's version.
857 (commit "48610d43b7455af12195473377f93c4ceea654f5")))
858 (file-name (git-file-name "editorconfig-core-test" version))
860 (base32 "1s29p4brmcsc3xsww3gk85dg45f1kk3iykh1air3ij0hymf5dyqy"))))))
863 (home-page "https://editorconfig.org/")
864 (synopsis "EditorConfig core library written in C")
865 (description "EditorConfig makes it easy to maintain the correct coding
866 style when switching between different text editors and between different
867 projects. The EditorConfig project maintains a file format and plugins for
868 various text editors which allow this file format to be read and used by those
870 (license license:bsd-2)))
872 (define-public texmacs
879 (uri (string-append "https://www.texmacs.org/Download/ftp/tmftp/"
880 "source/TeXmacs-" version "-src.tar.gz"))
882 (base32 "1gl6k1bwrk1y7hjyl4xvlqvmk5crl4jvsk8wrfp7ynbdin6n2i48"))))
883 (build-system gnu-build-system)
885 `(("pkg-config" ,pkg-config)
886 ("xdg-utils" ,xdg-utils))) ;for xdg-icon-resource
888 `(("freetype" ,freetype)
891 ("python" ,python-wrapper)
895 `(#:tests? #f ; no check target
897 (modify-phases %standard-phases
898 (add-after 'unpack 'fix-icon-directory
899 (lambda* (#:key outputs #:allow-other-keys)
900 (let ((out (assoc-ref outputs "out")))
901 (substitute* "packages/linux/icons.sh"
903 (string-append out "/share"))))))
904 (add-after 'install 'install-desktop-file
905 (lambda* (#:key outputs #:allow-other-keys)
906 ;; Install desktop file.
907 (let* ((out (assoc-ref outputs "out"))
908 (apps (string-append out "/share/applications"))
909 (source "TeXmacs/misc/mime/texmacs.desktop"))
910 (install-file source apps))))
911 (add-before 'configure 'gzip-flags
913 (substitute* "Makefile.in"
914 (("^GZIP = gzip -f") "GZIP = gzip -f -n")))))))
915 (synopsis "Editing platform with special features for scientists")
917 "GNU TeXmacs is a text editing platform which is specialized for
918 scientists. It is ideal for editing structured documents with different types
919 of content. It has robust support for mathematical formulas and plots. It
920 can also act as an interface to external mathematical programs such as R and
921 Octave. TeXmacs is completely extensible via Guile.")
922 (license license:gpl3+)
923 (home-page "https://www.texmacs.org/tmweb/home/welcome.en.html")))
925 (define-public scintilla
932 (uri (let ((v (apply string-append (string-split version #\.))))
933 (string-append "https://www.scintilla.org/scintilla" v ".tgz")))
935 (base32 "0rd3scfs3dwaj85ds8yrcp1r8z0lifi7qv2464k6n1c995amr0nw"))))
936 (build-system gnu-build-system)
938 `(#:make-flags (list "GTK3=1" "CC=gcc" "-Cgtk")
939 #:tests? #f ;require un-packaged Pyside
941 (modify-phases %standard-phases
942 (delete 'configure) ;no configure script
944 ;; Upstream provides no install script.
945 (lambda* (#:key outputs #:allow-other-keys)
946 (let* ((out (assoc-ref outputs "out"))
947 (lib (string-append out "/lib"))
948 (include (string-append out "/include")))
949 (for-each (lambda (f) (install-file f lib))
950 (find-files "bin/" "\\.so$"))
951 (for-each (lambda (f) (install-file f include))
952 (find-files "include/" "."))))))))
954 `(("gcc" ,gcc-9) ;Code has C++17 requirements
955 ("pkg-config" ,pkg-config)
956 ("python" ,python-wrapper)))
959 (home-page "https://www.scintilla.org/")
960 (synopsis "Code editor for GTK+")
961 (description "Scintilla is a source code editing component for
962 GTK+. It has the usual features found in text editing components, as
963 well as some that are especially useful for editing and debugging
964 source code; these include support for syntax styling, error
965 indicators, code completion and call tips. Styling choices are more
966 open than with many editors: Scintilla lets you use proportional
967 fonts, bold and italics, multiple foreground and background colours,
968 and multiple fonts.")
969 (license license:hpnd)))
978 (uri (string-append "https://download.geany.org/"
979 "geany-" version ".tar.bz2"))
981 (base32 "0inmmb9wra2w99pfv6p64d66s2zrhafc8drhwmga7gj89mp1gzxb"))))
982 (build-system gnu-build-system)
984 `(("autoconf" ,autoconf)
985 ("automake" ,automake)
988 ("intltool" ,intltool)
990 ("pkg-config" ,pkg-config)
991 ("python-docutils" ,python-docutils))) ;for rst2html
994 ;; FIXME: Geany bundles a 3.X release of Scintilla. It is not
995 ;; currently possible to replace it with our Scintilla package.
996 ;; ("scintilla" ,scintilla)
999 `(#:imported-modules ((guix build glib-or-gtk-build-system)
1000 ,@%gnu-build-system-modules)
1001 #:modules (((guix build glib-or-gtk-build-system) #:prefix glib-or-gtk:)
1002 (guix build gnu-build-system)
1005 (modify-phases %standard-phases
1006 (add-after 'install 'glib-or-gtk-wrap
1007 (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-wrap)))))
1008 (home-page "https://www.geany.org")
1009 (synopsis "Fast and lightweight IDE")
1010 (description "Geany is a small and fast Integrated Development
1011 Environment (IDE) that only has a few dependencies on other packages and is as
1012 independent as possible from special desktop environments like KDE or GNOME.
1014 The basic features of Geany are:
1016 @item syntax highlighting
1017 @item code completion
1018 @item auto completion of often constructed constructs like if, for and while
1019 @item auto completion of XML and HTML tags
1022 @item many supported filetypes like C, Java, PHP, HTML, Python, Perl, Pascal
1024 @item embedded terminal emulation
1025 @item extensibility through plugins
1027 (license license:gpl2+)))
1032 ;; Stable release is 1.9. However, this development version
1033 ;; introduces support for UTF-8.
1037 (uri (string-append "http://www.moria.de/~michael/fe/"
1038 "fe-" version ".tar.gz"))
1041 "10mk5wc3dsdp46b3hkjyd740gcdv6m1gvlr3p8xjxf55b3vfs0la"))))
1042 (build-system gnu-build-system)
1044 `(#:tests? #f ;no test
1045 ;; Sendmail is only used to send a crash log. Disable the
1046 ;; feature since it is (1) undocumented (2) not very useful.
1047 #:configure-flags (list "--disable-sendmail")
1049 (modify-phases %standard-phases
1050 (add-after 'install 'install-doc
1051 (lambda* (#:key outputs #:allow-other-keys)
1052 (let* ((out (assoc-ref outputs "out"))
1053 (doc (string-append out "/share/doc/" ,name "-" ,version)))
1054 (for-each (lambda (f) (install-file f doc))
1055 '("fe.doc" "fe.html" "fe.ps" "feref.ps" "README"))
1058 `(("gettext" ,gettext-minimal)))
1060 `(("ncurses" ,ncurses)))
1061 (home-page "http://www.moria.de/~michael/fe/")
1062 (synopsis "Small folding editor")
1063 (description "Fe is a small folding editor. It folds
1064 arbitrary text regions; it is not bound to syntactic units.
1066 Fe has no configuration or extension language and requires no setup.
1067 Its user interface is emacs-like and it has menus for the very most
1068 important functions to help beginners. Further there is a reference
1072 @item Regions and Emacs-like kill ring
1073 @item Incremental search
1074 @item Keyboard macros
1075 @item Editing binary files
1076 @item Multiple windows and views
1077 @item Compose function for Latin 1 characters
1079 (license license:gpl2+)))
1088 (url "https://github.com/vigna/ne")
1090 (file-name (git-file-name name version))
1093 "0sg2f6lxq6cjkpd3dvlxxns82hvq826rjnams5in97pssmknr77g"))))
1094 (build-system gnu-build-system)
1097 ("texinfo" ,texinfo)))
1099 `(("ncurses" ,ncurses)))
1104 (string-append "PREFIX=" (assoc-ref %outputs "out"))
1105 (string-append "LDFLAGS=-L" (assoc-ref %build-inputs "ncurses")
1108 (modify-phases %standard-phases
1109 (add-before 'configure 'patch-early-shebang
1111 (substitute* "version.pl"
1112 (("/usr/bin/env .*perl") (which "perl")))))
1115 (substitute* "src/makefile"
1116 (("-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+)))