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>
18 ;;; This file is part of GNU Guix.
20 ;;; GNU Guix is free software; you can redistribute it and/or modify it
21 ;;; under the terms of the GNU General Public License as published by
22 ;;; the Free Software Foundation; either version 3 of the License, or (at
23 ;;; your option) any later version.
25 ;;; GNU Guix is distributed in the hope that it will be useful, but
26 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
27 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
28 ;;; GNU General Public License for more details.
30 ;;; You should have received a copy of the GNU General Public License
31 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
33 (define-module (gnu packages text-editors)
34 #:use-module (guix packages)
35 #:use-module (guix download)
36 #:use-module (guix git-download)
37 #:use-module (guix utils)
38 #:use-module (guix build-system cargo)
39 #:use-module (guix build-system cmake)
40 #:use-module (guix build-system gnu)
41 #:use-module (guix build-system glib-or-gtk)
42 #:use-module (guix build-system python)
43 #:use-module ((guix licenses) #:prefix license:)
44 #:use-module (gnu packages)
45 #:use-module (gnu packages aspell)
46 #:use-module (gnu packages assembly)
47 #:use-module (gnu packages autotools)
48 #:use-module (gnu packages boost)
49 #:use-module (gnu packages code)
50 #:use-module (gnu packages crates-io)
51 #:use-module (gnu packages documentation)
52 #:use-module (gnu packages fontutils)
53 #:use-module (gnu packages freedesktop)
54 #:use-module (gnu packages gcc)
55 #:use-module (gnu packages gettext)
56 #:use-module (gnu packages glib)
57 #:use-module (gnu packages gtk)
58 #:use-module (gnu packages guile)
59 #:use-module (gnu packages haskell-xyz)
60 #:use-module (gnu packages libbsd)
61 #:use-module (gnu packages libreoffice)
62 #:use-module (gnu packages llvm)
63 #:use-module (gnu packages lua)
64 #:use-module (gnu packages ncurses)
65 #:use-module (gnu packages pcre)
66 #:use-module (gnu packages perl)
67 #:use-module (gnu packages pkg-config)
68 #:use-module (gnu packages python)
69 #:use-module (gnu packages python-web)
70 #:use-module (gnu packages python-xyz)
71 #:use-module (gnu packages qt)
72 #:use-module (gnu packages regex)
73 #:use-module (gnu packages ruby)
74 #:use-module (gnu packages terminals)
75 #:use-module (gnu packages texinfo)
76 #:use-module (gnu packages version-control)
77 #:use-module (gnu packages xml)
78 #:use-module (gnu packages xorg))
83 (version "0.7") ; also update the vis-test input
88 (url "https://git.sr.ht/~martanne/vis")
89 (commit (string-append "v" version))))
91 (base32 "1g05ncsnk57kcqm9wsv6sz8b24kyzj8r5rfpa1wfwj8qkjzx3vji"))
92 (file-name (git-file-name name version))))
93 (build-system gnu-build-system)
95 `(#:test-target "test"
97 (modify-phases %standard-phases
98 (add-after 'unpack 'unpack-test-suite
99 (lambda* (#:key inputs #:allow-other-keys)
100 (let ((vis-test (assoc-ref inputs "vis-test")))
101 (copy-recursively vis-test "test")
103 (delete 'check) ; the tests need a wrapped vis
104 (add-after 'install 'wrap-binary
105 (lambda* (#:key inputs outputs #:allow-other-keys)
106 (let* ((out (assoc-ref outputs "out"))
107 (lpeg (assoc-ref inputs "lua-lpeg"))
108 (lua-version ,(version-major+minor (package-version lua)))
109 (LUA_PATH (string-append lpeg "/share/lua/"
110 lua-version "/?.lua"))
111 (LUA_CPATH (string-append lpeg "/lib/lua/"
112 lua-version "/?.so")))
113 (wrap-program (string-append out "/bin/vis")
114 `("LUA_PATH" ":" prefix (,LUA_PATH))
115 `("LUA_CPATH" ":" prefix (,LUA_CPATH)))
117 (add-after 'wrap-binary 'check
118 (assoc-ref %standard-phases 'check))
119 (add-before 'check 'set-up-tests
120 (lambda* (#:key outputs #:allow-other-keys)
121 (let ((out (assoc-ref outputs "out")))
122 ;; DEFAULT_COMPILER is hard-coded here.
123 (substitute* "test/core/ccan-config.c"
125 (format #f "\"~a\"" ,(cc-for-target))))
127 ;; Use the ‘vis’ executable that we wrapped above.
128 (install-file (string-append out "/bin/vis") ".")
130 ;; XXX Delete 2 failing tests. TODO: make them not fail. :-)
131 (for-each delete-file
132 (find-files "test/vis/selections" "^complement"))
139 (url "https://git.sr.ht/~martanne/vis-test")
140 (commit "bbd2f34ff788e87a51a74069069273ad83c44f1f")))
142 (base32 "1jsvg2lg3xqfgi79x08kx94mc34mh62ivca10vsci6fqsk68jbd0"))
143 (file-name (git-file-name "vis-test" version))))))
144 (inputs `(("lua" ,lua)
146 ("libtermkey" ,libtermkey)
147 ("lua-lpeg" ,lua-lpeg)
149 (synopsis "Vim-like text editor")
151 "Vis aims to be a modern, legacy free, simple yet efficient vim-like text
152 editor. It extends vim's modal editing with built-in support for multiple
153 cursors/selections and combines it with sam's structural regular expression
154 based command language.")
155 (home-page "https://github.com/martanne/vis")
156 (license (list license:isc ; Main distribution.
157 license:public-domain ; map.[ch]
158 license:expat)))) ; lexers and libutf.[ch]
160 (define-public kakoune
163 (version "2020.09.01")
167 (uri (string-append "https://github.com/mawww/kakoune/"
168 "releases/download/v" version "/"
169 "kakoune-" version ".tar.bz2"))
171 (base32 "0x81rxy7bqnhd9374g5ypy4w4nxmm0vnqw6b52bf62jxdg2qj6l6"))))
172 (build-system gnu-build-system)
175 (list (string-append "PREFIX=" (assoc-ref %outputs "out")))
177 (modify-phases %standard-phases
178 (add-after 'unpack 'patch-source
180 ;; kakoune uses confstr with _CS_PATH to find out where to find
181 ;; a posix shell, but this doesn't work in the build
182 ;; environment. This substitution just replaces that result
183 ;; with the "sh" path.
184 (substitute* "src/shell_manager.cc"
185 (("if \\(m_shell.empty\\(\\)\\)" line)
186 (string-append "m_shell = \"" (which "sh")
189 (delete 'configure) ; no configure script
190 ;; kakoune requires us to be in the src/ directory to build.
191 (add-before 'build 'chdir
192 (lambda _ (chdir "src") #t)))))
194 `(("asciidoc" ,asciidoc)
195 ("pkg-config" ,pkg-config)
198 `(("ncurses" ,ncurses)))
199 (synopsis "Vim-inspired code editor")
201 "Kakoune is a code editor heavily inspired by Vim, as such most of its
202 commands are similar to Vi's ones, and it shares Vi's \"keystrokes as a text
203 editing language\" model. Kakoune has a strong focus on interactivity, most
204 commands provide immediate and incremental results, while still being
205 competitive (as in keystroke count) with Vim.")
206 (home-page "https://kakoune.org/")
207 (license license:unlicense)))
209 (define-public kak-lsp
217 (url "https://github.com/kak-lsp/kak-lsp")
218 (commit (string-append "v" version))))
219 (file-name (git-file-name name version))
220 (sha256 "1wfv2fy5ga6kc51zka3pak0hq97csm2l11bz74w3n1hrf5q9nnf8")))
221 (build-system cargo-build-system)
224 (("rust-crossbeam-channel" ,rust-crossbeam-channel-0.4)
225 ("rust-clap" ,rust-clap-2)
226 ("rust-daemonize" ,rust-daemonize-0.4)
227 ("rust-dirs" ,rust-dirs-2)
228 ("rust-enum_primitive" ,rust-enum-primitive-0.1)
229 ("rust-glob" ,rust-glob-0.3)
230 ("rust-itertools" ,rust-itertools-0.9)
231 ("rust-lsp-types" ,rust-lsp-types-0.80)
232 ("rust-jsonrpc-core" ,rust-jsonrpc-core-14)
233 ("rust-libc" ,rust-libc-0.2)
234 ("rust-rand" ,rust-rand-0.7)
235 ("rust-regex" ,rust-regex-1)
236 ("rust-ropey" ,rust-ropey-1)
237 ("rust-serde" ,rust-serde-1)
238 ("rust-serde_derive" ,rust-serde-derive-1)
239 ("rust-serde_json" ,rust-serde-json-1)
240 ("rust-slog" ,rust-slog-2)
241 ("rust-slog-scope" ,rust-slog-scope-4)
242 ("rust-sloggers" ,rust-sloggers-1)
243 ("rust-toml" ,rust-toml-0.5)
244 ("rust-url" ,rust-url-2)
245 ("rust-whoami" ,rust-whoami-0.8))))
246 (home-page "https://github.com/kak-lsp/kak-lsp")
247 (synopsis "Language Server Protocol (LSP) client for Kakoune")
249 "kak-lsp is a Language Server Protocol client for Kakoune implemented in
251 (license license:unlicense)))
260 (uri (string-append "https://sourceforge.net/projects/joe-editor/"
261 "files/JOE sources/joe-" version "/"
262 "joe-" version ".tar.gz"))
265 "1pmr598xxxm9j9dl93kq4dv36zyw0q2dh6d7x07hf134y9hhlnj9"))))
266 (build-system gnu-build-system)
267 (inputs `(("ncurses" ,ncurses)))
268 (home-page "http://joe-editor.sourceforge.net/")
269 (synopsis "Console screen editor")
271 "JOE is a powerful console screen editor with a \"mode-less\" user
272 interface similar to many user-friendly editors. JOE has some of the key
273 bindings and many of the powerful features of GNU Emacs.")
274 (license license:gpl3+)))
276 (define-public jucipp
280 (home-page "https://gitlab.com/cppit/jucipp")
283 (uri (git-reference (url home-page)
284 (commit (string-append "v" version))
285 ;; Two submodules are required which are
286 ;; developed alongside JuCi++ and difficult
287 ;; to package separately.
289 (file-name (git-file-name name version))
291 (base32 "1gy2xb5rm7q4zx9rl23h96b1i46fz27v25nklj50fvqp8ax2gxqy"))))
292 (build-system cmake-build-system)
294 `(#:configure-flags '("-DBUILD_TESTING=ON"
296 ;; These arguments are here to facilitate an "in-source"
297 ;; build using "./build" instead of the default "../build".
298 ;; The test suite expects that to be the case.
301 #:phases (modify-phases %standard-phases
302 (add-before 'configure 'enter-build-directory
308 (add-after 'unpack 'patch-tiny-process-library
310 (with-directory-excursion "lib/tiny-process-library"
311 (substitute* '("process_unix.cpp"
313 (("/bin/sh") (which "sh"))))
315 (add-after 'unpack 'disable-git-test
317 (substitute* "tests/CMakeLists.txt"
318 ;; Disable the git test, as it requires the full checkout.
319 (("add_test\\(git_test.*\\)") ""))
321 (add-before 'check 'pre-check
322 (lambda* (#:key inputs #:allow-other-keys)
323 ;; Tests do not expect HOME to be empty.
324 (setenv "HOME" "/etc")
326 ;; Most tests require an X server.
327 (let ((xorg-server (assoc-ref inputs "xorg-server"))
329 (setenv "DISPLAY" display)
330 (system (string-append xorg-server "/bin/Xvfb "
333 (add-after 'install 'wrap
334 (lambda* (#:key inputs outputs #:allow-other-keys)
335 ;; The package needs GTK+ and GtkSourceView on XDG_DATA_DIRS
336 ;; for syntax highlighting to work. shared-mime-info is
337 ;; necessary for MIME handling.
338 ;; XXX: Ideally we'd reuse glib-or-gtk-wrap here, but it
339 ;; does not pick up $gtksourceview/share/gtksourceview-3.0.
340 (let ((out (assoc-ref outputs "out"))
341 (gtk+ (assoc-ref inputs "gtk+"))
342 (gtksourceview (assoc-ref inputs "gtksourceview"))
343 (shared-mime-info (assoc-ref inputs "shared-mime-info")))
344 (wrap-program (string-append out "/bin/juci")
345 `("XDG_DATA_DIRS" ":" prefix
348 (string-append pkg "/share"))
349 (list out gtk+ gtksourceview shared-mime-info))
353 `(("pkg-config" ,pkg-config)
354 ("xorg-server" ,xorg-server-for-tests)))
358 ("ctags" ,universal-ctags)
360 ("gtksourceviewmm" ,gtksourceviewmm)
361 ("libclang" ,clang-10) ;XXX: must be the same version as Mesas LLVM
362 ("libgit2" ,libgit2)))
363 (synopsis "Lightweight C++ IDE")
365 "juCi++ is a small @dfn{IDE} (Integrated Development Environment)
366 designed especially towards libclang with speed, stability, and ease of use
369 It supports autocompletion, on-the-fly warnings and errors, syntax
370 highlighting, and integrates with Git as well as the CMake and Meson build
372 (license license:expat)))
374 (define-public leafpad
380 (uri (string-append "mirror://savannah/"
381 "leafpad/leafpad-" version ".tar.gz"))
384 "0b0az2wvqgvam7w0ns1j8xp2llslm1rx6h7zcsy06a7j0yp257cm"))))
385 (build-system glib-or-gtk-build-system)
387 `(("intltool" ,intltool)
388 ("pkg-config" ,pkg-config)))
391 (home-page "http://tarot.freeshell.org/leafpad/")
392 (synopsis "GTK+ based text editor")
393 (description "Leafpad is a GTK+ text editor that emphasizes simplicity. As
394 development focuses on keeping weight down to a minimum, only the most essential
395 features are implemented in the editor. Leafpad is simple to use, is easily
396 compiled, requires few libraries, and starts up quickly. ")
397 (license license:gpl2+)))
405 (uri (string-append "https://sites.google.com/site/e3editor/Home/"
406 "e3-" version ".tgz"))
409 "0919kadkas020maqq37852isnzp053q2fnws2zh3mz81d1jiviak"))
410 (modules '((guix build utils)))
412 ;; Remove pre-built binaries.
414 (delete-file-recursively "bin")
416 (build-system gnu-build-system)
419 #:make-flags (list (string-append "PREFIX="
420 (assoc-ref %outputs "out")))
421 #:phases (modify-phases %standard-phases
422 (delete 'configure))))
425 (home-page "https://sites.google.com/site/e3editor/")
426 (synopsis "Tiny text editor written in assembly")
428 "e3 is a micro text editor with an executable code size between 3800 and
429 35000 bytes. Except for ``syntax highlighting'', the e3 binary supports all
430 of the basic functions one expects plus built in arithmetic calculations.
431 UTF-8 coding of unicode characters is supported as well. e3 can use
432 Wordstar-, EMACS-, Pico, Nedit or vi-like key bindings. e3 can be used on
433 16, 32, and 64-bit CPUs.")
434 (supported-systems '("x86_64-linux" "i686-linux"))
435 (license license:gpl2+)))
444 (url "https://github.com/hboetes/mg")
446 (file-name (git-file-name name version))
449 "14vrm8lvwksf697sqks7xfd1xaqjlqjc9afjk33sksq5p27wr203"))
450 (modules '((guix build utils)))
452 (substitute* "GNUmakefile"
455 (build-system gnu-build-system)
457 `(("pkg-config" ,pkg-config)))
460 ("ncurses" ,ncurses)))
462 ;; No test suite available.
464 #:make-flags (list (string-append "prefix=" %output)
466 #:phases (modify-phases %standard-phases
467 (delete 'configure) ; no configure script
468 (add-before 'build 'correct-location-of-difftool
470 (substitute* "buffer.c"
474 (add-before 'install 'patch-tutorial-location
475 (lambda* (#:key outputs #:allow-other-keys)
477 (("/usr") (assoc-ref outputs "out")))
479 (add-after 'install 'install-tutorial
480 (lambda* (#:key outputs #:allow-other-keys)
481 (let* ((out (assoc-ref outputs "out"))
482 (doc (string-append out "/share/doc/mg")))
483 (install-file "tutorial" doc)
485 (home-page "https://homepage.boetes.org/software/mg/")
486 (synopsis "Microscopic GNU Emacs clone")
488 "Mg (@command{mg}) is a GNU Emacs style editor, with which it is
489 \"broadly\" compatible. This is a portable version of the mg maintained by the
491 (license license:public-domain)))
493 (define-public qemacs
500 (uri (string-append "https://bellard.org/qemacs/"
501 "qemacs-" version ".tar.gz"))
503 (base32 "156z4wpj49i6j388yjird5qvrph7hz0grb4r44l4jf3q8imadyrg"))))
504 (build-system gnu-build-system)
506 `(#:tests? #f ;no test
508 (modify-phases %standard-phases
509 (add-before 'build 'build-qhtml
510 ;; Build fails without first creating qHTML library.
511 (lambda _ (invoke "make" "-C" "libqhtml")))
512 (add-before 'install 'fix-man-pages-directory
513 ;; Install in $out/share/man instead of $out/man.
515 (substitute* "Makefile"
516 (("/man/man1" all) (string-append "/share" all)))
518 (add-before 'install 'create-directories
519 ;; Ensure directories exist before installing files.
520 (lambda* (#:key outputs #:allow-other-keys)
521 (let ((out (assoc-ref outputs "out")))
522 (for-each (lambda (d) (mkdir-p (string-append out d)))
523 '("/bin" "/share/man/man1" "/share/qe"))
525 (add-after 'install 'install-extra-documentation
526 ;; Install sample configuration file, Info, and HTML manual.
527 (lambda* (#:key outputs #:allow-other-keys)
528 (let* ((share (string-append (assoc-ref outputs "out") "/share"))
529 (doc (string-append share "/doc/" ,name "-" ,version))
530 (html (string-append share "/html"))
531 (info (string-append share "/info"))
532 (makeinfo (string-append (assoc-ref %build-inputs "texinfo")
534 ;; First fix Texinfo documentation, create appropriate
535 ;; directories, then generate Info and HTML files there.
536 (substitute* "qe-doc.texi"
537 (("^M-([{}])" _ bracket) (string-append "M-@" bracket)))
538 (for-each (lambda (d) (mkdir-p d)) (list html info))
539 (invoke makeinfo "qe-doc.texi" "-o" info)
540 (invoke makeinfo "qe-doc.texi" "--html" "--no-split" "-o" html)
541 ;; Install sample configuration file.
542 (install-file "config.eg" doc)
545 `(("texinfo" ,texinfo)))
550 (home-page "https://bellard.org/qemacs/")
551 (synopsis "Small but powerful text editor")
552 (description "QEmacs (for Quick Emacs) is a very small but
553 powerful editor. It has features that even big editors lack:
557 @item Full screen editor with an Emacs look and feel with all Emacs
558 common features: multi-buffer, multi-window, command mode, universal
559 argument, keyboard macros, config file with C-like syntax, minibuffer
560 with completion and history.
562 @item Can edit files of hundreds of Megabytes without being slow by
563 using a highly optimized internal representation and by mmaping the
566 @item Full Unicode support, including multi charset handling (8859-x,
567 UTF8, SJIS, EUC-JP, ...) and bidirectional editing respecting the
568 Unicode bidi algorithm. Arabic and Indic scripts handling (in
571 @item WYSIWYG HTML/XML/CSS2 mode graphical editing. Also supports
572 Lynx like rendering on VT100 terminals.
574 @item WYSIWYG DocBook mode based on XML/CSS2 renderer.
576 @item C mode: coloring with immediate update. Emacs like auto-indent.
578 @item Shell mode: colorized VT100 emulation so that your shell work
579 exactly as you expect. Compile mode with next/prev error.
581 @item Input methods for most languages, including Chinese (input
582 methods come from the Yudit editor).
584 @item Hexadecimal editing mode with insertion and block commands.
585 Unicode hexa editing is also supported.
587 @item Works on any VT100 terminals without termcap. UTF8 VT100
588 support included with double width glyphs.
590 @item X11 support. Support multiple proportional fonts at the same
591 time (as XEmacs). X Input methods supported. Xft extension supported
592 for anti aliased font display.
594 @item Small! Full version (including HTML/XML/CSS2/DocBook rendering
595 and all charsets): 200KB big. Basic version (without bidir/unicode
596 scripts/input/X11/C/Shell/HTML/Dired): 49KB.
598 (license license:lgpl2.1+)))
600 (define-public ghostwriter
603 ;; XXX We use a release candidate to fix incompatibility with Qt 5.15.
604 (version "2.0.0-rc4")
608 (url "https://github.com/wereturtle/ghostwriter")
610 (file-name (git-file-name name version))
613 "07547503a209hc0fcg902w3x0s1m899c10nj3gqz3hak0cmrasi3"))))
614 (build-system gnu-build-system)
616 `(("pkg-config" ,pkg-config)
617 ("qttools" ,qttools))) ; for lrelease
619 `(("hunspell" ,hunspell)
621 ("qtdeclarative" ,qtdeclarative)
622 ("qtmultimedia" ,qtmultimedia)
623 ("qtquickcontrols" ,qtquickcontrols)
625 ("qtwebchannel" ,qtwebchannel)))
626 (propagated-inputs ; To get native-search-path
627 `(("qtwebengine" ,qtwebengine)))
630 (modify-phases %standard-phases
632 (lambda* (#:key outputs #:allow-other-keys)
633 (let ((out (assoc-ref outputs "out")))
634 (invoke "qmake" (string-append "PREFIX=" out)))))
635 (add-after 'configure 'create-translations
637 ;; `lrelease` will not overwrite, so delete existing .qm files
638 (for-each delete-file (find-files "translations" ".*\\.qm"))
639 (apply invoke "lrelease" (find-files "translations" ".*\\.ts"))))
640 ;; Ensure that icons are found at runtime.
641 (add-after 'install 'wrap-executable
642 (lambda* (#:key inputs outputs #:allow-other-keys)
643 (let ((out (assoc-ref outputs "out")))
644 (wrap-program (string-append out "/bin/ghostwriter")
645 `("QT_PLUGIN_PATH" ":" prefix
646 ,(map (lambda (label)
647 (string-append (assoc-ref inputs label)
648 "/lib/qt5/plugins/"))
649 '("qtsvg" "qtmultimedia"))))))))))
650 (home-page "https://wereturtle.github.io/ghostwriter/")
651 (synopsis "Write without distractions")
653 "@code{ghostwriter} provides a relaxing, distraction-free writing
654 environment with Markdown markup.")
655 (license license:gpl3+))) ; icons/* under CC-BY-SA3
657 (define-public manuskript
665 (url "https://github.com/olivierkes/manuskript")
667 (file-name (git-file-name name version))
669 (base32 "1l6l9k6k69yv8xqpll0zv9cwdqqg4zvxy90l6sx5nv2yywh5crla"))))
670 (build-system python-build-system)
672 `(#:tests? #f ;no test
674 (modify-phases %standard-phases
678 (lambda* (#:key outputs #:allow-other-keys)
679 (let* ((out (assoc-ref outputs "out"))
680 (share (string-append out "/share/manuskript")))
685 (let ((destination (string-append share "/" d)))
686 (mkdir-p destination)
687 (copy-recursively d destination)))
688 '("bin" "i18n" "icons" "libs" "manuskript" "resources"))
689 ;; Install documentation.
690 (let ((doc (string-append out
691 "/doc/manuskript-" ,version
692 "/sample-projects")))
694 (copy-recursively "sample-projects" doc))
695 ;; Wrap executable in "$out/share/manuskript/bin" and
696 ;; link to it from "$out/bin".
697 (let ((bin (string-append out "/bin"))
698 (executable (string-append share "/bin/manuskript")))
699 (wrap-program executable
700 (list "PYTHONPATH" 'prefix (list (getenv "PYTHONPATH"))))
702 (with-directory-excursion bin
703 (symlink (string-append share "/bin/manuskript")
705 ;; Install icons and create .desktop file.
706 (let ((apps (string-append out "/share/applications"))
707 (icons-dir (string-append out "/share/pixmaps")))
708 (install-file "icons/Manuskript/manuskript.svg" icons-dir)
710 (make-desktop-entry-file (string-append apps "/manuskript.desktop")
712 #:mime-type "application/x-manuskript-book;"
713 #:exec (string-append out "/bin/manuskript %f")
714 #:comment '((#f "Tool for writers")
715 ("es" "Herramienta para escritores/as"))
716 #:keywords "manuskript;office;write;edit;novel;text;msk"
720 #:categories "Office;WordProcessor;"))
724 ("python-lxml" ,python-lxml)
725 ("python-markdown" ,python-markdown)
726 ("python-pyqt" ,python-pyqt)
728 (home-page "http://www.theologeek.ch/manuskript/")
729 (synopsis "Tool for writers")
730 (description "Manuskript provides a rich environment to help
731 writers create their first draft and then further refine and edit
732 their masterpiece. With Manuskript you can:
735 @item Grow your premise from one sentence, to a paragraph, to a full
737 @item Create characters,
738 @item Conceive plots,
739 @item Construct outlines (Outline mode and/or Index cards),
740 @item Write with focus (Distraction free mode),
743 @item Edit and re-organize chapters and scenes,
744 @item View Story line,
745 @item Compose with fiction or non-fiction templates and writing modes,
746 @item Import and export document formats such as HTML, ePub,
747 OpenDocument, DocX, and more.
750 Additionally Manuskript can help in many more ways with a spell
751 checker, markdown highlighter, frequency analyzer, and automatic save
752 in plain text file format.")
753 (license license:gpl3+)))
755 (define-public editorconfig-core-c
757 (name "editorconfig-core-c")
763 (url "https://github.com/editorconfig/editorconfig-core-c")
764 (commit (string-append "v" version))))
765 (file-name (git-file-name name version))
767 (base32 "1311fhh2jfsja2hhk3nwb6nijlq03jw8dk35cwbrac0p9jvy03jx"))))
768 (build-system cmake-build-system)
771 (modify-phases %standard-phases
772 (add-after 'unpack 'insert-tests
773 (lambda* (#:key inputs #:allow-other-keys)
774 (let ((tests (assoc-ref inputs "tests")))
775 (copy-recursively tests "tests"))
777 (add-after 'install 'delete-static-library
778 (lambda* (#:key outputs #:allow-other-keys)
779 (let* ((out (assoc-ref outputs "out"))
780 (lib (string-append out "/lib")))
781 (with-directory-excursion lib
782 (delete-file "libeditorconfig_static.a"))
789 (url "https://github.com/editorconfig/editorconfig-core-test")
790 ;; The tests submodule commit matching this package's version.
791 (commit "48610d43b7455af12195473377f93c4ceea654f5")))
792 (file-name (git-file-name "editorconfig-core-test" version))
794 (base32 "1s29p4brmcsc3xsww3gk85dg45f1kk3iykh1air3ij0hymf5dyqy"))))))
797 (home-page "https://editorconfig.org/")
798 (synopsis "EditorConfig core library written in C")
799 (description "EditorConfig makes it easy to maintain the correct coding
800 style when switching between different text editors and between different
801 projects. The EditorConfig project maintains a file format and plugins for
802 various text editors which allow this file format to be read and used by those
804 (license license:bsd-2)))
806 (define-public texmacs
813 (uri (string-append "https://www.texmacs.org/Download/ftp/tmftp/"
814 "source/TeXmacs-" version "-src.tar.gz"))
816 (base32 "1izwqb0z4gqiglv57mjswk6sjivny73kd2sxrf3nmj7wr12pn5m8"))))
817 (build-system gnu-build-system)
819 `(("pkg-config" ,pkg-config)
820 ("xdg-utils" ,xdg-utils))) ;for xdg-icon-resource
822 `(("freetype" ,freetype)
825 ("python" ,python-wrapper)
829 `(#:tests? #f ; no check target
831 (modify-phases %standard-phases
832 (add-after 'unpack 'fix-icon-directory
833 (lambda* (#:key outputs #:allow-other-keys)
834 (let ((out (assoc-ref outputs "out")))
835 (substitute* "packages/linux/icons.sh"
837 (string-append out "/share")))
839 (add-after 'install 'install-desktop-file
840 (lambda* (#:key outputs #:allow-other-keys)
841 ;; Install desktop file.
842 (let* ((out (assoc-ref outputs "out"))
843 (apps (string-append out "/share/applications"))
844 (source "TeXmacs/misc/mime/texmacs.desktop"))
845 (install-file source apps)
847 (add-before 'configure 'gzip-flags
849 (substitute* "Makefile.in"
850 (("^GZIP = gzip -f") "GZIP = gzip -f -n")))))))
851 (synopsis "Editing platform with special features for scientists")
853 "GNU TeXmacs is a text editing platform which is specialized for
854 scientists. It is ideal for editing structured documents with different types
855 of content. It has robust support for mathematical formulas and plots. It
856 can also act as an interface to external mathematical programs such as R and
857 Octave. TeXmacs is completely extensible via Guile.")
858 (license license:gpl3+)
859 (home-page "https://www.texmacs.org/tmweb/home/welcome.en.html")))
861 (define-public scintilla
868 (uri (let ((v (apply string-append (string-split version #\.))))
869 (string-append "https://www.scintilla.org/scintilla" v ".tgz")))
871 (base32 "0w5550fijkhmzvdydd8770qq9dgnbq1sd0a8rn4g6mwyfpcyhbfy"))))
872 (build-system gnu-build-system)
874 `(#:make-flags (list "GTK3=1" "CC=gcc" "-Cgtk")
875 #:tests? #f ;require un-packaged Pyside
877 (modify-phases %standard-phases
878 (delete 'configure) ;no configure script
880 ;; Upstream provides no install script.
881 (lambda* (#:key outputs #:allow-other-keys)
882 (let* ((out (assoc-ref outputs "out"))
883 (lib (string-append out "/lib"))
884 (include (string-append out "/include")))
885 (for-each (lambda (f) (install-file f lib))
886 (find-files "bin/" "\\.so$"))
887 (for-each (lambda (f) (install-file f include))
888 (find-files "include/" "."))
891 `(("gcc" ,gcc-9) ;Code has C++17 requirements
892 ("pkg-config" ,pkg-config)
893 ("python" ,python-wrapper)))
896 (home-page "https://www.scintilla.org/")
897 (synopsis "Code editor for GTK+")
898 (description "Scintilla is a source code editing component for
899 GTK+. It has the usual features found in text editing components, as
900 well as some that are especially useful for editing and debugging
901 source code; these include support for syntax styling, error
902 indicators, code completion and call tips. Styling choices are more
903 open than with many editors: Scintilla lets you use proportional
904 fonts, bold and italics, multiple foreground and background colours,
905 and multiple fonts.")
906 (license license:hpnd)))
915 (uri (string-append "https://download.geany.org/"
916 "geany-" version ".tar.bz2"))
918 (base32 "060sachn33xpx3a609f09y97qq5ky17gvv686zbvrn618ij7bi8q"))))
919 (build-system gnu-build-system)
921 `(("autoconf" ,autoconf)
922 ("automake" ,automake)
925 ("intltool" ,intltool)
927 ("pkg-config" ,pkg-config)
928 ("python-docutils" ,python-docutils))) ;for rst2html
931 ;; FIXME: Geany bundles a 3.X release of Scintilla. It is not
932 ;; currently possible to replace it with our Scintilla package.
933 ;; ("scintilla" ,scintilla)
936 `(#:imported-modules ((guix build glib-or-gtk-build-system)
937 ,@%gnu-build-system-modules)
938 #:modules (((guix build glib-or-gtk-build-system) #:prefix glib-or-gtk:)
939 (guix build gnu-build-system)
942 (modify-phases %standard-phases
943 (add-after 'install 'glib-or-gtk-wrap
944 (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-wrap)))))
945 (home-page "https://www.geany.org")
946 (synopsis "Fast and lightweight IDE")
947 (description "Geany is a small and fast Integrated Development
948 Environment (IDE) that only has a few dependencies on other packages and is as
949 independent as possible from special desktop environments like KDE or GNOME.
951 The basic features of Geany are:
953 @item syntax highlighting
954 @item code completion
955 @item auto completion of often constructed constructs like if, for and while
956 @item auto completion of XML and HTML tags
959 @item many supported filetypes like C, Java, PHP, HTML, Python, Perl, Pascal
961 @item embedded terminal emulation
962 @item extensibility through plugins
964 (license license:gpl2+)))
969 ;; Stable release is 1.9. However, this development version
970 ;; introduces support for UTF-8.
974 (uri (string-append "http://www.moria.de/~michael/fe/"
975 "fe-" version ".tar.gz"))
978 "10mk5wc3dsdp46b3hkjyd740gcdv6m1gvlr3p8xjxf55b3vfs0la"))))
979 (build-system gnu-build-system)
981 `(#:tests? #f ;no test
982 ;; Sendmail is only used to send a crash log. Disable the
983 ;; feature since it is (1) undocumented (2) not very useful.
984 #:configure-flags (list "--disable-sendmail")
986 (modify-phases %standard-phases
987 (add-after 'install 'install-doc
988 (lambda* (#:key outputs #:allow-other-keys)
989 (let* ((out (assoc-ref outputs "out"))
990 (doc (string-append out "/share/doc/" ,name "-" ,version)))
991 (for-each (lambda (f) (install-file f doc))
992 '("fe.doc" "fe.html" "fe.ps" "feref.ps" "README"))
995 `(("gettext" ,gettext-minimal)))
997 `(("ncurses" ,ncurses)))
998 (home-page "http://www.moria.de/~michael/fe/")
999 (synopsis "Small folding editor")
1000 (description "Fe is a small folding editor. It folds
1001 arbitrary text regions; it is not bound to syntactic units.
1003 Fe has no configuration or extension language and requires no setup.
1004 Its user interface is emacs-like and it has menus for the very most
1005 important functions to help beginners. Further there is a reference
1009 @item Regions and Emacs-like kill ring
1010 @item Incremental search
1011 @item Keyboard macros
1012 @item Editing binary files
1013 @item Multiple windows and views
1014 @item Compose function for Latin 1 characters
1016 (license license:gpl2+)))
1025 (url "https://github.com/vigna/ne")
1027 (file-name (git-file-name name version))
1030 "01aglnsfljlvx0wvyvpjfn4y88jf450a06qnj9a8lgdqv1hdkq1a"))))
1031 (build-system gnu-build-system)
1034 ("texinfo" ,texinfo)))
1036 `(("ncurses" ,ncurses)))
1041 (string-append "PREFIX=" (assoc-ref %outputs "out"))
1042 (string-append "LDFLAGS=-L" (assoc-ref %build-inputs "ncurses")
1045 (modify-phases %standard-phases
1048 (substitute* "src/makefile"
1049 (("-lcurses") "-lncurses"))
1051 (home-page "https://ne.di.unimi.it/")
1052 (synopsis "Text editor with menu bar")
1053 (description "This package provides a modeless text editor with menu bar.
1054 It supports syntax highlighting, regular expressions, configurable menus,
1055 keybindings, autocomplete and unlimited undo. It can pipe a marked block
1056 of text through any command line filter. It can also open very large binary
1057 files. It was originally developed on the Amiga 3000T.")
1058 (license license:gpl3+)))
1060 (define-public hexer
1067 (uri (string-append "https://devel.ringlet.net/files/editors/hexer/"
1068 "hexer-" version ".tar.xz"))
1070 (base32 "157z17z8qivdin2km2wp86x1bv1nx15frrwcz11mk0l3ab74mf76"))))
1071 (build-system gnu-build-system)
1073 `(#:tests? #f ;no upstream tests
1076 (string-append "PREFIX=" (assoc-ref %outputs "out"))
1077 (string-append "LTERMCAP=-lncurses")
1078 (string-append "LDFLAGS=-L" (assoc-ref %build-inputs "ncurses")
1081 (modify-phases %standard-phases
1082 (delete 'configure)))) ;no configure script
1084 `(("ncurses" ,ncurses)))
1085 (home-page "https://devel.ringlet.net/editors/hexer/")
1086 (synopsis "Multi buffer editor for binary files with vi-like interface")
1087 (description "Hexer is a multi-buffer editor for binary files for Unix-like
1088 systems that displays its buffer(s) as a hex dump. The user interface is kept
1090 (license license:bsd-3)))
1092 (define-public virtaal
1098 (uri (string-append "mirror://sourceforge/translate/Virtaal/"
1099 version "/virtaal-" version ".tar.bz2"))
1102 "0cyimjp3191qlmw6n0ipqdr9xr0cq4f6dqvz4rl9q31h6l3kywf9"))))
1103 (build-system python-build-system)
1105 `(#:python ,python-2
1106 #:use-setuptools? #f
1107 #:tests? #f ;; Failing tests
1109 (modify-phases %standard-phases
1110 (add-before 'build 'configure
1111 (lambda* (#:key outputs #:allow-other-keys)
1112 ;; Set data file path to absolute store path.
1113 (substitute* "virtaal/common/pan_app.py"
1114 (("file_discovery\\.get_abs_data_filename.*")
1115 (string-append "os.path.join('"
1116 (assoc-ref outputs "out")
1117 "/share', *path_parts)"))))))))
1119 `(("python2-lxml" ,python2-lxml)
1120 ("python2-pygtk" ,python2-pygtk)
1121 ("python2-simplejson" ,python2-simplejson)
1122 ("python2-translate-toolkit" ,python2-translate-toolkit)
1123 ("python2-pycurl" ,python2-pycurl)))
1124 (synopsis "Graphical translation tool")
1125 (description "Virtaal is a powerful yet simple translation tool with an
1126 uncluttered user interface. It supports a multitude of translation formats
1127 provided by the Translate Toolkit, including XLIFF and PO.")
1128 (home-page "https://virtaal.translatehouse.org/")
1129 (license license:gpl2+)))