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>
19 ;;; This file is part of GNU Guix.
21 ;;; GNU Guix is free software; you can redistribute it and/or modify it
22 ;;; under the terms of the GNU General Public License as published by
23 ;;; the Free Software Foundation; either version 3 of the License, or (at
24 ;;; your option) any later version.
26 ;;; GNU Guix is distributed in the hope that it will be useful, but
27 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
28 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
29 ;;; GNU General Public License for more details.
31 ;;; You should have received a copy of the GNU General Public License
32 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
34 (define-module (gnu packages text-editors)
35 #:use-module (guix packages)
36 #:use-module (guix download)
37 #:use-module (guix git-download)
38 #:use-module (guix utils)
39 #:use-module (guix build-system cargo)
40 #:use-module (guix build-system cmake)
41 #:use-module (guix build-system gnu)
42 #:use-module (guix build-system glib-or-gtk)
43 #:use-module (guix build-system python)
44 #:use-module ((guix licenses) #:prefix license:)
45 #:use-module (gnu packages)
46 #:use-module (gnu packages aspell)
47 #:use-module (gnu packages assembly)
48 #:use-module (gnu packages autotools)
49 #:use-module (gnu packages boost)
50 #:use-module (gnu packages code)
51 #:use-module (gnu packages crates-io)
52 #:use-module (gnu packages documentation)
53 #:use-module (gnu packages fontutils)
54 #:use-module (gnu packages freedesktop)
55 #:use-module (gnu packages gcc)
56 #:use-module (gnu packages gettext)
57 #:use-module (gnu packages glib)
58 #:use-module (gnu packages gtk)
59 #:use-module (gnu packages guile)
60 #:use-module (gnu packages haskell-xyz)
61 #:use-module (gnu packages libbsd)
62 #:use-module (gnu packages libreoffice)
63 #:use-module (gnu packages llvm)
64 #:use-module (gnu packages lua)
65 #:use-module (gnu packages ncurses)
66 #:use-module (gnu packages pcre)
67 #:use-module (gnu packages perl)
68 #:use-module (gnu packages pkg-config)
69 #:use-module (gnu packages python)
70 #:use-module (gnu packages python-web)
71 #:use-module (gnu packages python-xyz)
72 #:use-module (gnu packages qt)
73 #:use-module (gnu packages regex)
74 #:use-module (gnu packages ruby)
75 #:use-module (gnu packages terminals)
76 #:use-module (gnu packages texinfo)
77 #:use-module (gnu packages version-control)
78 #:use-module (gnu packages xml)
79 #:use-module (gnu packages xorg))
84 (version "0.7") ; also update the vis-test input
89 (url "https://git.sr.ht/~martanne/vis")
90 (commit (string-append "v" version))))
92 (base32 "1g05ncsnk57kcqm9wsv6sz8b24kyzj8r5rfpa1wfwj8qkjzx3vji"))
93 (file-name (git-file-name name version))))
94 (build-system gnu-build-system)
96 `(#:test-target "test"
98 (modify-phases %standard-phases
99 (add-after 'unpack 'unpack-test-suite
100 (lambda* (#:key inputs #:allow-other-keys)
101 (let ((vis-test (assoc-ref inputs "vis-test")))
102 (copy-recursively vis-test "test")
104 (delete 'check) ; the tests need a wrapped vis
105 (add-after 'install 'wrap-binary
106 (lambda* (#:key inputs outputs #:allow-other-keys)
107 (let* ((out (assoc-ref outputs "out"))
108 (lpeg (assoc-ref inputs "lua-lpeg"))
109 (lua-version ,(version-major+minor (package-version lua)))
110 (LUA_PATH (string-append lpeg "/share/lua/"
111 lua-version "/?.lua"))
112 (LUA_CPATH (string-append lpeg "/lib/lua/"
113 lua-version "/?.so")))
114 (wrap-program (string-append out "/bin/vis")
115 `("LUA_PATH" ":" prefix (,LUA_PATH))
116 `("LUA_CPATH" ":" prefix (,LUA_CPATH)))
118 (add-after 'wrap-binary 'check
119 (assoc-ref %standard-phases 'check))
120 (add-before 'check 'set-up-tests
121 (lambda* (#:key outputs #:allow-other-keys)
122 (let ((out (assoc-ref outputs "out")))
123 ;; DEFAULT_COMPILER is hard-coded here.
124 (substitute* "test/core/ccan-config.c"
126 (format #f "\"~a\"" ,(cc-for-target))))
128 ;; Use the ‘vis’ executable that we wrapped above.
129 (install-file (string-append out "/bin/vis") ".")
131 ;; XXX Delete 2 failing tests. TODO: make them not fail. :-)
132 (for-each delete-file
133 (find-files "test/vis/selections" "^complement"))
140 (url "https://git.sr.ht/~martanne/vis-test")
141 (commit "bbd2f34ff788e87a51a74069069273ad83c44f1f")))
143 (base32 "1jsvg2lg3xqfgi79x08kx94mc34mh62ivca10vsci6fqsk68jbd0"))
144 (file-name (git-file-name "vis-test" version))))))
145 (inputs `(("lua" ,lua)
147 ("libtermkey" ,libtermkey)
148 ("lua-lpeg" ,lua-lpeg)
150 (synopsis "Vim-like text editor")
152 "Vis aims to be a modern, legacy free, simple yet efficient vim-like text
153 editor. It extends vim's modal editing with built-in support for multiple
154 cursors/selections and combines it with sam's structural regular expression
155 based command language.")
156 (home-page "https://github.com/martanne/vis")
157 (license (list license:isc ; Main distribution.
158 license:public-domain ; map.[ch]
159 license:expat)))) ; lexers and libutf.[ch]
161 (define-public kakoune
164 (version "2020.09.01")
168 (uri (string-append "https://github.com/mawww/kakoune/"
169 "releases/download/v" version "/"
170 "kakoune-" version ".tar.bz2"))
172 (base32 "0x81rxy7bqnhd9374g5ypy4w4nxmm0vnqw6b52bf62jxdg2qj6l6"))))
173 (build-system gnu-build-system)
176 (list (string-append "PREFIX=" (assoc-ref %outputs "out")))
178 (modify-phases %standard-phases
179 (add-after 'unpack 'patch-source
181 ;; kakoune uses confstr with _CS_PATH to find out where to find
182 ;; a posix shell, but this doesn't work in the build
183 ;; environment. This substitution just replaces that result
184 ;; with the "sh" path.
185 (substitute* "src/shell_manager.cc"
186 (("if \\(m_shell.empty\\(\\)\\)" line)
187 (string-append "m_shell = \"" (which "sh")
190 (delete 'configure) ; no configure script
191 ;; kakoune requires us to be in the src/ directory to build.
192 (add-before 'build 'chdir
193 (lambda _ (chdir "src") #t)))))
195 `(("asciidoc" ,asciidoc)
196 ("pkg-config" ,pkg-config)
199 `(("ncurses" ,ncurses)))
200 (synopsis "Vim-inspired code editor")
202 "Kakoune is a code editor heavily inspired by Vim, as such most of its
203 commands are similar to Vi's ones, and it shares Vi's \"keystrokes as a text
204 editing language\" model. Kakoune has a strong focus on interactivity, most
205 commands provide immediate and incremental results, while still being
206 competitive (as in keystroke count) with Vim.")
207 (home-page "https://kakoune.org/")
208 (license license:unlicense)))
210 (define-public kak-lsp
218 (url "https://github.com/kak-lsp/kak-lsp")
219 (commit (string-append "v" version))))
220 (file-name (git-file-name name version))
221 (sha256 "1wfv2fy5ga6kc51zka3pak0hq97csm2l11bz74w3n1hrf5q9nnf8")))
222 (build-system cargo-build-system)
225 (("rust-crossbeam-channel" ,rust-crossbeam-channel-0.4)
226 ("rust-clap" ,rust-clap-2)
227 ("rust-daemonize" ,rust-daemonize-0.4)
228 ("rust-dirs" ,rust-dirs-2)
229 ("rust-enum_primitive" ,rust-enum-primitive-0.1)
230 ("rust-glob" ,rust-glob-0.3)
231 ("rust-itertools" ,rust-itertools-0.9)
232 ("rust-lsp-types" ,rust-lsp-types-0.80)
233 ("rust-jsonrpc-core" ,rust-jsonrpc-core-14)
234 ("rust-libc" ,rust-libc-0.2)
235 ("rust-rand" ,rust-rand-0.7)
236 ("rust-regex" ,rust-regex-1)
237 ("rust-ropey" ,rust-ropey-1)
238 ("rust-serde" ,rust-serde-1)
239 ("rust-serde_derive" ,rust-serde-derive-1)
240 ("rust-serde_json" ,rust-serde-json-1)
241 ("rust-slog" ,rust-slog-2)
242 ("rust-slog-scope" ,rust-slog-scope-4)
243 ("rust-sloggers" ,rust-sloggers-1)
244 ("rust-toml" ,rust-toml-0.5)
245 ("rust-url" ,rust-url-2)
246 ("rust-whoami" ,rust-whoami-0.8))))
247 (home-page "https://github.com/kak-lsp/kak-lsp")
248 (synopsis "Language Server Protocol (LSP) client for Kakoune")
250 "kak-lsp is a Language Server Protocol client for Kakoune implemented in
252 (license license:unlicense)))
261 (uri (string-append "https://sourceforge.net/projects/joe-editor/"
262 "files/JOE sources/joe-" version "/"
263 "joe-" version ".tar.gz"))
266 "1pmr598xxxm9j9dl93kq4dv36zyw0q2dh6d7x07hf134y9hhlnj9"))))
267 (build-system gnu-build-system)
268 (inputs `(("ncurses" ,ncurses)))
269 (home-page "http://joe-editor.sourceforge.net/")
270 (synopsis "Console screen editor")
272 "JOE is a powerful console screen editor with a \"mode-less\" user
273 interface similar to many user-friendly editors. JOE has some of the key
274 bindings and many of the powerful features of GNU Emacs.")
275 (license license:gpl3+)))
277 (define-public jucipp
281 (home-page "https://gitlab.com/cppit/jucipp")
284 (uri (git-reference (url home-page)
285 (commit (string-append "v" version))
286 ;; Two submodules are required which are
287 ;; developed alongside JuCi++ and difficult
288 ;; to package separately.
290 (file-name (git-file-name name version))
292 (base32 "1gy2xb5rm7q4zx9rl23h96b1i46fz27v25nklj50fvqp8ax2gxqy"))))
293 (build-system cmake-build-system)
295 `(#:configure-flags '("-DBUILD_TESTING=ON"
297 ;; These arguments are here to facilitate an "in-source"
298 ;; build using "./build" instead of the default "../build".
299 ;; The test suite expects that to be the case.
302 #:phases (modify-phases %standard-phases
303 (add-before 'configure 'enter-build-directory
309 (add-after 'unpack 'patch-tiny-process-library
311 (with-directory-excursion "lib/tiny-process-library"
312 (substitute* '("process_unix.cpp"
314 (("/bin/sh") (which "sh"))))
316 (add-after 'unpack 'disable-git-test
318 (substitute* "tests/CMakeLists.txt"
319 ;; Disable the git test, as it requires the full checkout.
320 (("add_test\\(git_test.*\\)") ""))
322 (add-before 'check 'pre-check
323 (lambda* (#:key inputs #:allow-other-keys)
324 ;; Tests do not expect HOME to be empty.
325 (setenv "HOME" "/etc")
327 ;; Most tests require an X server.
328 (let ((xorg-server (assoc-ref inputs "xorg-server"))
330 (setenv "DISPLAY" display)
331 (system (string-append xorg-server "/bin/Xvfb "
334 (add-after 'install 'wrap
335 (lambda* (#:key inputs outputs #:allow-other-keys)
336 ;; The package needs GTK+ and GtkSourceView on XDG_DATA_DIRS
337 ;; for syntax highlighting to work. shared-mime-info is
338 ;; necessary for MIME handling.
339 ;; XXX: Ideally we'd reuse glib-or-gtk-wrap here, but it
340 ;; does not pick up $gtksourceview/share/gtksourceview-3.0.
341 (let ((out (assoc-ref outputs "out"))
342 (gtk+ (assoc-ref inputs "gtk+"))
343 (gtksourceview (assoc-ref inputs "gtksourceview"))
344 (shared-mime-info (assoc-ref inputs "shared-mime-info")))
345 (wrap-program (string-append out "/bin/juci")
346 `("XDG_DATA_DIRS" ":" prefix
349 (string-append pkg "/share"))
350 (list out gtk+ gtksourceview shared-mime-info))
354 `(("pkg-config" ,pkg-config)
355 ("xorg-server" ,xorg-server-for-tests)))
359 ("ctags" ,universal-ctags)
361 ("gtksourceviewmm" ,gtksourceviewmm)
362 ("libclang" ,clang-11) ;XXX: must be the same version as Mesas LLVM
363 ("libgit2" ,libgit2)))
364 (synopsis "Lightweight C++ IDE")
366 "juCi++ is a small @acronym{IDE, Integrated Development Environment}
367 designed especially towards libclang with speed, stability, and ease of use
370 It supports autocompletion, on-the-fly warnings and errors, syntax
371 highlighting, and integrates with Git as well as the CMake and Meson build
373 (license license:expat)))
375 (define-public leafpad
381 (uri (string-append "mirror://savannah/"
382 "leafpad/leafpad-" version ".tar.gz"))
385 "0b0az2wvqgvam7w0ns1j8xp2llslm1rx6h7zcsy06a7j0yp257cm"))))
386 (build-system glib-or-gtk-build-system)
388 `(("intltool" ,intltool)
389 ("pkg-config" ,pkg-config)))
392 (home-page "http://tarot.freeshell.org/leafpad/")
393 (synopsis "GTK+ based text editor")
394 (description "Leafpad is a GTK+ text editor that emphasizes simplicity. As
395 development focuses on keeping weight down to a minimum, only the most essential
396 features are implemented in the editor. Leafpad is simple to use, is easily
397 compiled, requires few libraries, and starts up quickly. ")
398 (license license:gpl2+)))
400 (define-public l3afpad
401 (let ((commit "5235c9e13bbf0d31a902c6776918c2d7cdbb61ff")
405 (version (git-version "0.8.18.1.11" revision commit))
408 (file-name (git-file-name name version))
410 (url "https://github.com/stevenhoneyman/l3afpad")
414 "1alyghm2wpakzdfag0g4g8gb1h9l4wdg7mnhq8bk0iq5ryqia16a"))))
415 (build-system glib-or-gtk-build-system)
417 `(("intltool" ,intltool)
418 ("autoconf" ,autoconf)
419 ("automake" ,automake)
420 ("pkg-config" ,pkg-config)))
423 (home-page "http://tarot.freeshell.org/leafpad/")
424 (synopsis "GTK+ 3 based text editor")
425 (description "L3afpad is a GTK+ 3 text editor that emphasizes simplicity. As
426 development focuses on keeping weight down to a minimum, only the most essential
427 features are implemented in the editor. L3afpad is simple to use, is easily
428 compiled, requires few libraries, and starts up quickly. L3afpad is a
429 fork of Leafpad that uses GTK+ 3 instead of GTK+ 2.")
430 (license license:gpl2+))))
438 (uri (string-append "https://sites.google.com/site/e3editor/Home/"
439 "e3-" version ".tgz"))
442 "0919kadkas020maqq37852isnzp053q2fnws2zh3mz81d1jiviak"))
443 (modules '((guix build utils)))
445 ;; Remove pre-built binaries.
447 (delete-file-recursively "bin")
449 (build-system gnu-build-system)
452 #:make-flags (list (string-append "PREFIX="
453 (assoc-ref %outputs "out")))
454 #:phases (modify-phases %standard-phases
455 (delete 'configure))))
458 (home-page "https://sites.google.com/site/e3editor/")
459 (synopsis "Tiny text editor written in assembly")
461 "e3 is a micro text editor with an executable code size between 3800 and
462 35000 bytes. Except for ``syntax highlighting'', the e3 binary supports all
463 of the basic functions one expects plus built in arithmetic calculations.
464 UTF-8 coding of unicode characters is supported as well. e3 can use
465 Wordstar-, EMACS-, Pico, Nedit or vi-like key bindings. e3 can be used on
466 16, 32, and 64-bit CPUs.")
467 (supported-systems '("x86_64-linux" "i686-linux"))
468 (license license:gpl2+)))
477 (url "https://github.com/hboetes/mg")
479 (file-name (git-file-name name version))
482 "14vrm8lvwksf697sqks7xfd1xaqjlqjc9afjk33sksq5p27wr203"))
483 (modules '((guix build utils)))
485 (substitute* "GNUmakefile"
488 (build-system gnu-build-system)
490 `(("pkg-config" ,pkg-config)))
493 ("ncurses" ,ncurses)))
495 ;; No test suite available.
497 #:make-flags (list (string-append "prefix=" %output)
499 #:phases (modify-phases %standard-phases
500 (delete 'configure) ; no configure script
501 (add-before 'build 'correct-location-of-difftool
503 (substitute* "buffer.c"
507 (add-before 'install 'patch-tutorial-location
508 (lambda* (#:key outputs #:allow-other-keys)
510 (("/usr") (assoc-ref outputs "out")))
512 (add-after 'install 'install-tutorial
513 (lambda* (#:key outputs #:allow-other-keys)
514 (let* ((out (assoc-ref outputs "out"))
515 (doc (string-append out "/share/doc/mg")))
516 (install-file "tutorial" doc)
518 (home-page "https://homepage.boetes.org/software/mg/")
519 (synopsis "Microscopic GNU Emacs clone")
521 "Mg (@command{mg}) is a GNU Emacs style editor, with which it is
522 \"broadly\" compatible. This is a portable version of the mg maintained by the
524 (license license:public-domain)))
526 (define-public qemacs
533 (uri (string-append "https://bellard.org/qemacs/"
534 "qemacs-" version ".tar.gz"))
536 (base32 "156z4wpj49i6j388yjird5qvrph7hz0grb4r44l4jf3q8imadyrg"))))
537 (build-system gnu-build-system)
539 `(#:tests? #f ;no test
541 (modify-phases %standard-phases
542 (add-before 'build 'build-qhtml
543 ;; Build fails without first creating qHTML library.
544 (lambda _ (invoke "make" "-C" "libqhtml")))
545 (add-before 'install 'fix-man-pages-directory
546 ;; Install in $out/share/man instead of $out/man.
548 (substitute* "Makefile"
549 (("/man/man1" all) (string-append "/share" all)))
551 (add-before 'install 'create-directories
552 ;; Ensure directories exist before installing files.
553 (lambda* (#:key outputs #:allow-other-keys)
554 (let ((out (assoc-ref outputs "out")))
555 (for-each (lambda (d) (mkdir-p (string-append out d)))
556 '("/bin" "/share/man/man1" "/share/qe"))
558 (add-after 'install 'install-extra-documentation
559 ;; Install sample configuration file, Info, and HTML manual.
560 (lambda* (#:key native-inputs inputs outputs #:allow-other-keys)
561 (let* ((share (string-append (assoc-ref outputs "out") "/share"))
562 (doc (string-append share "/doc/" ,name "-" ,version))
563 (html (string-append share "/html"))
564 (info (string-append share "/info"))
565 (makeinfo (string-append
566 (assoc-ref (or native-inputs inputs) "texinfo")
568 ;; First fix Texinfo documentation, create appropriate
569 ;; directories, then generate Info and HTML files there.
570 (substitute* "qe-doc.texi"
571 (("^M-([{}])" _ bracket) (string-append "M-@" bracket)))
572 (for-each (lambda (d) (mkdir-p d)) (list html info))
573 (invoke makeinfo "qe-doc.texi" "-o" info)
574 (invoke makeinfo "qe-doc.texi" "--html" "--no-split" "-o" html)
575 ;; Install sample configuration file.
576 (install-file "config.eg" doc)
579 `(("texinfo" ,texinfo)))
584 (home-page "https://bellard.org/qemacs/")
585 (synopsis "Small but powerful text editor")
586 (description "QEmacs (for Quick Emacs) is a very small but
587 powerful editor. It has features that even big editors lack:
591 @item Full screen editor with an Emacs look and feel with all Emacs
592 common features: multi-buffer, multi-window, command mode, universal
593 argument, keyboard macros, config file with C-like syntax, minibuffer
594 with completion and history.
596 @item Can edit files of hundreds of Megabytes without being slow by
597 using a highly optimized internal representation and by mmaping the
600 @item Full Unicode support, including multi charset handling (8859-x,
601 UTF8, SJIS, EUC-JP, ...) and bidirectional editing respecting the
602 Unicode bidi algorithm. Arabic and Indic scripts handling (in
605 @item WYSIWYG HTML/XML/CSS2 mode graphical editing. Also supports
606 Lynx like rendering on VT100 terminals.
608 @item WYSIWYG DocBook mode based on XML/CSS2 renderer.
610 @item C mode: coloring with immediate update. Emacs like auto-indent.
612 @item Shell mode: colorized VT100 emulation so that your shell work
613 exactly as you expect. Compile mode with next/prev error.
615 @item Input methods for most languages, including Chinese (input
616 methods come from the Yudit editor).
618 @item Hexadecimal editing mode with insertion and block commands.
619 Unicode hexa editing is also supported.
621 @item Works on any VT100 terminals without termcap. UTF8 VT100
622 support included with double width glyphs.
624 @item X11 support. Support multiple proportional fonts at the same
625 time (as XEmacs). X Input methods supported. Xft extension supported
626 for anti aliased font display.
628 @item Small! Full version (including HTML/XML/CSS2/DocBook rendering
629 and all charsets): 200KB big. Basic version (without bidir/unicode
630 scripts/input/X11/C/Shell/HTML/Dired): 49KB.
632 (license license:lgpl2.1+)))
634 (define-public ghostwriter
641 (url "https://github.com/wereturtle/ghostwriter")
643 (file-name (git-file-name name version))
646 "19cf55b86yj2b5hdazbyw4iyp6xq155243aiyg4m0vhwh0h79nwh"))))
647 (build-system gnu-build-system)
649 `(("pkg-config" ,pkg-config)
650 ("qttools" ,qttools))) ; for lrelease
652 `(("hunspell" ,hunspell)
654 ("qtdeclarative" ,qtdeclarative)
655 ("qtmultimedia" ,qtmultimedia)
656 ("qtquickcontrols" ,qtquickcontrols)
658 ("qtwebchannel" ,qtwebchannel)))
659 (propagated-inputs ; To get native-search-path
660 `(("qtwebengine" ,qtwebengine)))
663 (modify-phases %standard-phases
665 (lambda* (#:key outputs #:allow-other-keys)
666 (let ((out (assoc-ref outputs "out")))
667 (invoke "qmake" (string-append "PREFIX=" out)))))
668 (add-after 'configure 'create-translations
670 ;; `lrelease` will not overwrite, so delete existing .qm files
671 (for-each delete-file (find-files "translations" ".*\\.qm"))
672 (apply invoke "lrelease" (find-files "translations" ".*\\.ts"))))
673 ;; Ensure that icons are found at runtime.
674 (add-after 'install 'wrap-executable
675 (lambda* (#:key inputs outputs #:allow-other-keys)
676 (let ((out (assoc-ref outputs "out")))
677 (wrap-program (string-append out "/bin/ghostwriter")
678 `("QT_PLUGIN_PATH" ":" prefix
679 ,(map (lambda (label)
680 (string-append (assoc-ref inputs label)
681 "/lib/qt5/plugins/"))
682 '("qtsvg" "qtmultimedia"))))))))))
683 (home-page "https://wereturtle.github.io/ghostwriter/")
684 (synopsis "Write without distractions")
686 "@code{ghostwriter} provides a relaxing, distraction-free writing
687 environment with Markdown markup.")
688 (license license:gpl3+))) ; icons/* under CC-BY-SA3
690 (define-public manuskript
698 (url "https://github.com/olivierkes/manuskript")
700 (file-name (git-file-name name version))
702 (base32 "0gfwwnpjslb0g8y3v9ha4sd8in6bpy6bhi4rn4hmfd2vmq2flpbd"))))
703 (build-system python-build-system)
705 `(#:tests? #f ;no test
707 (modify-phases %standard-phases
711 (lambda* (#:key outputs #:allow-other-keys)
712 (let* ((out (assoc-ref outputs "out"))
713 (share (string-append out "/share/manuskript")))
718 (let ((destination (string-append share "/" d)))
719 (mkdir-p destination)
720 (copy-recursively d destination)))
721 '("bin" "i18n" "icons" "libs" "manuskript" "resources"))
722 ;; Install documentation.
723 (let ((doc (string-append out
724 "/doc/manuskript-" ,version
725 "/sample-projects")))
727 (copy-recursively "sample-projects" doc))
728 ;; Wrap executable in "$out/share/manuskript/bin" and
729 ;; link to it from "$out/bin".
730 (let ((bin (string-append out "/bin"))
731 (executable (string-append share "/bin/manuskript")))
732 (wrap-program executable
733 (list "PYTHONPATH" 'prefix (list (getenv "PYTHONPATH"))))
735 (with-directory-excursion bin
736 (symlink (string-append share "/bin/manuskript")
738 ;; Install icons and create .desktop file.
739 (let ((apps (string-append out "/share/applications"))
740 (icons-dir (string-append out "/share/pixmaps")))
741 (install-file "icons/Manuskript/manuskript.svg" icons-dir)
743 (make-desktop-entry-file (string-append apps "/manuskript.desktop")
745 #:mime-type "application/x-manuskript-book;"
746 #:exec (string-append out "/bin/manuskript %f")
747 #:comment '((#f "Tool for writers")
748 ("es" "Herramienta para escritores/as"))
749 #:keywords "manuskript;office;write;edit;novel;text;msk"
753 #:categories "Office;WordProcessor;"))
757 ("python-lxml" ,python-lxml)
758 ("python-markdown" ,python-markdown)
759 ("python-pyqt" ,python-pyqt)
761 (home-page "http://www.theologeek.ch/manuskript/")
762 (synopsis "Tool for writers")
763 (description "Manuskript provides a rich environment to help
764 writers create their first draft and then further refine and edit
765 their masterpiece. With Manuskript you can:
768 @item Grow your premise from one sentence, to a paragraph, to a full
770 @item Create characters,
771 @item Conceive plots,
772 @item Construct outlines (Outline mode and/or Index cards),
773 @item Write with focus (Distraction free mode),
776 @item Edit and re-organize chapters and scenes,
777 @item View Story line,
778 @item Compose with fiction or non-fiction templates and writing modes,
779 @item Import and export document formats such as HTML, ePub,
780 OpenDocument, DocX, and more.
783 Additionally Manuskript can help in many more ways with a spell
784 checker, markdown highlighter, frequency analyzer, and automatic save
785 in plain text file format.")
786 (license license:gpl3+)))
788 (define-public editorconfig-core-c
790 (name "editorconfig-core-c")
796 (url "https://github.com/editorconfig/editorconfig-core-c")
797 (commit (string-append "v" version))))
798 (file-name (git-file-name name version))
800 (base32 "073sh18y0v8wm10iphaia54pkdmwylalccpn1k5i9dwyfjzgj7yg"))))
801 (build-system cmake-build-system)
804 (modify-phases %standard-phases
805 (add-after 'unpack 'insert-tests
806 (lambda* (#:key inputs #:allow-other-keys)
807 (let ((tests (assoc-ref inputs "tests")))
808 (copy-recursively tests "tests"))
810 (add-after 'install 'delete-static-library
811 (lambda* (#:key outputs #:allow-other-keys)
812 (let* ((out (assoc-ref outputs "out"))
813 (lib (string-append out "/lib")))
814 (with-directory-excursion lib
815 (delete-file "libeditorconfig_static.a"))
822 (url "https://github.com/editorconfig/editorconfig-core-test")
823 ;; The tests submodule commit matching this package's version.
824 (commit "48610d43b7455af12195473377f93c4ceea654f5")))
825 (file-name (git-file-name "editorconfig-core-test" version))
827 (base32 "1s29p4brmcsc3xsww3gk85dg45f1kk3iykh1air3ij0hymf5dyqy"))))))
830 (home-page "https://editorconfig.org/")
831 (synopsis "EditorConfig core library written in C")
832 (description "EditorConfig makes it easy to maintain the correct coding
833 style when switching between different text editors and between different
834 projects. The EditorConfig project maintains a file format and plugins for
835 various text editors which allow this file format to be read and used by those
837 (license license:bsd-2)))
839 (define-public texmacs
846 (uri (string-append "https://www.texmacs.org/Download/ftp/tmftp/"
847 "source/TeXmacs-" version "-src.tar.gz"))
849 (base32 "1gl6k1bwrk1y7hjyl4xvlqvmk5crl4jvsk8wrfp7ynbdin6n2i48"))))
850 (build-system gnu-build-system)
852 `(("pkg-config" ,pkg-config)
853 ("xdg-utils" ,xdg-utils))) ;for xdg-icon-resource
855 `(("freetype" ,freetype)
858 ("python" ,python-wrapper)
862 `(#:tests? #f ; no check target
864 (modify-phases %standard-phases
865 (add-after 'unpack 'fix-icon-directory
866 (lambda* (#:key outputs #:allow-other-keys)
867 (let ((out (assoc-ref outputs "out")))
868 (substitute* "packages/linux/icons.sh"
870 (string-append out "/share"))))))
871 (add-after 'install 'install-desktop-file
872 (lambda* (#:key outputs #:allow-other-keys)
873 ;; Install desktop file.
874 (let* ((out (assoc-ref outputs "out"))
875 (apps (string-append out "/share/applications"))
876 (source "TeXmacs/misc/mime/texmacs.desktop"))
877 (install-file source apps))))
878 (add-before 'configure 'gzip-flags
880 (substitute* "Makefile.in"
881 (("^GZIP = gzip -f") "GZIP = gzip -f -n")))))))
882 (synopsis "Editing platform with special features for scientists")
884 "GNU TeXmacs is a text editing platform which is specialized for
885 scientists. It is ideal for editing structured documents with different types
886 of content. It has robust support for mathematical formulas and plots. It
887 can also act as an interface to external mathematical programs such as R and
888 Octave. TeXmacs is completely extensible via Guile.")
889 (license license:gpl3+)
890 (home-page "https://www.texmacs.org/tmweb/home/welcome.en.html")))
892 (define-public scintilla
899 (uri (let ((v (apply string-append (string-split version #\.))))
900 (string-append "https://www.scintilla.org/scintilla" v ".tgz")))
902 (base32 "0figd543inpi00yr6han73qd2fzx99r099vzcbg9mhpzsgxfwz4f"))))
903 (build-system gnu-build-system)
905 `(#:make-flags (list "GTK3=1" "CC=gcc" "-Cgtk")
906 #:tests? #f ;require un-packaged Pyside
908 (modify-phases %standard-phases
909 (delete 'configure) ;no configure script
911 ;; Upstream provides no install script.
912 (lambda* (#:key outputs #:allow-other-keys)
913 (let* ((out (assoc-ref outputs "out"))
914 (lib (string-append out "/lib"))
915 (include (string-append out "/include")))
916 (for-each (lambda (f) (install-file f lib))
917 (find-files "bin/" "\\.so$"))
918 (for-each (lambda (f) (install-file f include))
919 (find-files "include/" "."))))))))
921 `(("gcc" ,gcc-9) ;Code has C++17 requirements
922 ("pkg-config" ,pkg-config)
923 ("python" ,python-wrapper)))
926 (home-page "https://www.scintilla.org/")
927 (synopsis "Code editor for GTK+")
928 (description "Scintilla is a source code editing component for
929 GTK+. It has the usual features found in text editing components, as
930 well as some that are especially useful for editing and debugging
931 source code; these include support for syntax styling, error
932 indicators, code completion and call tips. Styling choices are more
933 open than with many editors: Scintilla lets you use proportional
934 fonts, bold and italics, multiple foreground and background colours,
935 and multiple fonts.")
936 (license license:hpnd)))
945 (uri (string-append "https://download.geany.org/"
946 "geany-" version ".tar.bz2"))
948 (base32 "060sachn33xpx3a609f09y97qq5ky17gvv686zbvrn618ij7bi8q"))))
949 (build-system gnu-build-system)
951 `(("autoconf" ,autoconf)
952 ("automake" ,automake)
955 ("intltool" ,intltool)
957 ("pkg-config" ,pkg-config)
958 ("python-docutils" ,python-docutils))) ;for rst2html
961 ;; FIXME: Geany bundles a 3.X release of Scintilla. It is not
962 ;; currently possible to replace it with our Scintilla package.
963 ;; ("scintilla" ,scintilla)
966 `(#:imported-modules ((guix build glib-or-gtk-build-system)
967 ,@%gnu-build-system-modules)
968 #:modules (((guix build glib-or-gtk-build-system) #:prefix glib-or-gtk:)
969 (guix build gnu-build-system)
972 (modify-phases %standard-phases
973 (add-after 'install 'glib-or-gtk-wrap
974 (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-wrap)))))
975 (home-page "https://www.geany.org")
976 (synopsis "Fast and lightweight IDE")
977 (description "Geany is a small and fast Integrated Development
978 Environment (IDE) that only has a few dependencies on other packages and is as
979 independent as possible from special desktop environments like KDE or GNOME.
981 The basic features of Geany are:
983 @item syntax highlighting
984 @item code completion
985 @item auto completion of often constructed constructs like if, for and while
986 @item auto completion of XML and HTML tags
989 @item many supported filetypes like C, Java, PHP, HTML, Python, Perl, Pascal
991 @item embedded terminal emulation
992 @item extensibility through plugins
994 (license license:gpl2+)))
999 ;; Stable release is 1.9. However, this development version
1000 ;; introduces support for UTF-8.
1004 (uri (string-append "http://www.moria.de/~michael/fe/"
1005 "fe-" version ".tar.gz"))
1008 "10mk5wc3dsdp46b3hkjyd740gcdv6m1gvlr3p8xjxf55b3vfs0la"))))
1009 (build-system gnu-build-system)
1011 `(#:tests? #f ;no test
1012 ;; Sendmail is only used to send a crash log. Disable the
1013 ;; feature since it is (1) undocumented (2) not very useful.
1014 #:configure-flags (list "--disable-sendmail")
1016 (modify-phases %standard-phases
1017 (add-after 'install 'install-doc
1018 (lambda* (#:key outputs #:allow-other-keys)
1019 (let* ((out (assoc-ref outputs "out"))
1020 (doc (string-append out "/share/doc/" ,name "-" ,version)))
1021 (for-each (lambda (f) (install-file f doc))
1022 '("fe.doc" "fe.html" "fe.ps" "feref.ps" "README"))
1025 `(("gettext" ,gettext-minimal)))
1027 `(("ncurses" ,ncurses)))
1028 (home-page "http://www.moria.de/~michael/fe/")
1029 (synopsis "Small folding editor")
1030 (description "Fe is a small folding editor. It folds
1031 arbitrary text regions; it is not bound to syntactic units.
1033 Fe has no configuration or extension language and requires no setup.
1034 Its user interface is emacs-like and it has menus for the very most
1035 important functions to help beginners. Further there is a reference
1039 @item Regions and Emacs-like kill ring
1040 @item Incremental search
1041 @item Keyboard macros
1042 @item Editing binary files
1043 @item Multiple windows and views
1044 @item Compose function for Latin 1 characters
1046 (license license:gpl2+)))
1055 (url "https://github.com/vigna/ne")
1057 (file-name (git-file-name name version))
1060 "01aglnsfljlvx0wvyvpjfn4y88jf450a06qnj9a8lgdqv1hdkq1a"))))
1061 (build-system gnu-build-system)
1064 ("texinfo" ,texinfo)))
1066 `(("ncurses" ,ncurses)))
1071 (string-append "PREFIX=" (assoc-ref %outputs "out"))
1072 (string-append "LDFLAGS=-L" (assoc-ref %build-inputs "ncurses")
1075 (modify-phases %standard-phases
1078 (substitute* "src/makefile"
1079 (("-lcurses") "-lncurses"))
1081 (home-page "https://ne.di.unimi.it/")
1082 (synopsis "Text editor with menu bar")
1083 (description "This package provides a modeless text editor with menu bar.
1084 It supports syntax highlighting, regular expressions, configurable menus,
1085 keybindings, autocomplete and unlimited undo. It can pipe a marked block
1086 of text through any command line filter. It can also open very large binary
1087 files. It was originally developed on the Amiga 3000T.")
1088 (license license:gpl3+)))
1090 (define-public hexer
1097 (uri (string-append "https://devel.ringlet.net/files/editors/hexer/"
1098 "hexer-" version ".tar.xz"))
1100 (base32 "157z17z8qivdin2km2wp86x1bv1nx15frrwcz11mk0l3ab74mf76"))))
1101 (build-system gnu-build-system)
1103 `(#:tests? #f ;no upstream tests
1106 (string-append "PREFIX=" (assoc-ref %outputs "out"))
1107 (string-append "LTERMCAP=-lncurses")
1108 (string-append "LDFLAGS=-L" (assoc-ref %build-inputs "ncurses")
1111 (modify-phases %standard-phases
1112 (delete 'configure)))) ;no configure script
1114 `(("ncurses" ,ncurses)))
1115 (home-page "https://devel.ringlet.net/editors/hexer/")
1116 (synopsis "Multi buffer editor for binary files with vi-like interface")
1117 (description "Hexer is a multi-buffer editor for binary files for Unix-like
1118 systems that displays its buffer(s) as a hex dump. The user interface is kept
1120 (license license:bsd-3)))
1122 (define-public virtaal
1128 (uri (string-append "mirror://sourceforge/translate/Virtaal/"
1129 version "/virtaal-" version ".tar.bz2"))
1132 "0cyimjp3191qlmw6n0ipqdr9xr0cq4f6dqvz4rl9q31h6l3kywf9"))))
1133 (build-system python-build-system)
1135 `(#:python ,python-2
1136 #:use-setuptools? #f
1137 #:tests? #f ;; Failing tests
1139 (modify-phases %standard-phases
1140 (add-before 'build 'configure
1141 (lambda* (#:key outputs #:allow-other-keys)
1142 ;; Set data file path to absolute store path.
1143 (substitute* "virtaal/common/pan_app.py"
1144 (("file_discovery\\.get_abs_data_filename.*")
1145 (string-append "os.path.join('"
1146 (assoc-ref outputs "out")
1147 "/share', *path_parts)"))))))))
1149 `(("python2-lxml" ,python2-lxml)
1150 ("python2-pygtk" ,python2-pygtk)
1151 ("python2-simplejson" ,python2-simplejson)
1152 ("python2-translate-toolkit" ,python2-translate-toolkit)
1153 ("python2-pycurl" ,python2-pycurl)))
1154 (synopsis "Graphical translation tool")
1155 (description "Virtaal is a powerful yet simple translation tool with an
1156 uncluttered user interface. It supports a multitude of translation formats
1157 provided by the Translate Toolkit, including XLIFF and PO.")
1158 (home-page "https://virtaal.translatehouse.org/")
1159 (license license:gpl2+)))