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 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.6") ; also update the vis-test input
88 (url "https://github.com/martanne/vis")
89 (commit (string-append "v" version))))
91 (base32 "1zjm89cn3rfq8fxpwp66khy53s6vqlmw6q103qyyvix8ydzxdmsh"))
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://github.com/martanne/vis-test")
140 (commit "4c4f6645de77f697a45899e8645e0c2bbdc7208a")))
142 (base32 "10vh1pxsqw88a5xwh5irkm85xr66dbycmgpmabyw9h0vm14cvcz2"))
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 "10idv2kyw2dg45wfcnh7nybs8qys7kfvif90sjrff3541k97pm5y"))))
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
607 (url "https://github.com/wereturtle/ghostwriter")
608 (commit (string-append "v" version))))
609 (file-name (git-file-name name version))
612 "0jc6szfh5sdnafhwsr1xv7cn1fznniq58bix41hb9wlbkvq7wzi6"))))
613 (build-system gnu-build-system)
615 `(("pkg-config" ,pkg-config)
616 ("qttools" ,qttools))) ; for lrelease
618 `(("hunspell" ,hunspell)
620 ("qtdeclarative" ,qtdeclarative)
621 ("qtmultimedia" ,qtmultimedia)
622 ("qtquickcontrols" ,qtquickcontrols)
624 ("qtwebchannel" ,qtwebchannel)))
625 (propagated-inputs ; To get native-search-path
626 `(("qtwebengine" ,qtwebengine)))
629 (modify-phases %standard-phases
631 (lambda* (#:key outputs #:allow-other-keys)
632 (let ((out (assoc-ref outputs "out")))
633 (invoke "qmake" (string-append "PREFIX=" out)))))
634 (add-after 'configure 'create-translations
636 ;; `lrelease` will not overwrite, so delete existing .qm files
637 (for-each delete-file (find-files "translations" ".*\\.qm"))
638 (apply invoke "lrelease" (find-files "translations" ".*\\.ts"))))
639 ;; Ensure that icons are found at runtime.
640 (add-after 'install 'wrap-executable
641 (lambda* (#:key inputs outputs #:allow-other-keys)
642 (let ((out (assoc-ref outputs "out")))
643 (wrap-program (string-append out "/bin/ghostwriter")
644 `("QT_PLUGIN_PATH" ":" prefix
645 ,(map (lambda (label)
646 (string-append (assoc-ref inputs label)
647 "/lib/qt5/plugins/"))
648 '("qtsvg" "qtmultimedia"))))))))))
649 (home-page "https://wereturtle.github.io/ghostwriter/")
650 (synopsis "Write without distractions")
652 "@code{ghostwriter} provides a relaxing, distraction-free writing
653 environment with Markdown markup.")
654 (license license:gpl3+))) ; icons/* under CC-BY-SA3
656 (define-public manuskript
664 (url "https://github.com/olivierkes/manuskript")
666 (file-name (git-file-name name version))
668 (base32 "1l6l9k6k69yv8xqpll0zv9cwdqqg4zvxy90l6sx5nv2yywh5crla"))))
669 (build-system python-build-system)
671 `(#:tests? #f ;no test
673 (modify-phases %standard-phases
677 (lambda* (#:key outputs #:allow-other-keys)
678 (let* ((out (assoc-ref outputs "out"))
679 (share (string-append out "/share/manuskript")))
684 (let ((destination (string-append share "/" d)))
685 (mkdir-p destination)
686 (copy-recursively d destination)))
687 '("bin" "i18n" "icons" "libs" "manuskript" "resources"))
688 ;; Install documentation.
689 (let ((doc (string-append out
690 "/doc/manuskript-" ,version
691 "/sample-projects")))
693 (copy-recursively "sample-projects" doc))
694 ;; Wrap executable in "$out/share/manuskript/bin" and
695 ;; link to it from "$out/bin".
696 (let ((bin (string-append out "/bin"))
697 (executable (string-append share "/bin/manuskript")))
698 (wrap-program executable
699 (list "PYTHONPATH" 'prefix (list (getenv "PYTHONPATH"))))
701 (with-directory-excursion bin
702 (symlink (string-append share "/bin/manuskript")
704 ;; Install icons and create .desktop file.
705 (let ((apps (string-append out "/share/applications"))
706 (icons-dir (string-append out "/share/pixmaps")))
707 (install-file "icons/Manuskript/manuskript.svg" icons-dir)
709 (make-desktop-entry-file (string-append apps "/manuskript.desktop")
711 #:mime-type "application/x-manuskript-book;"
712 #:exec (string-append out "/bin/manuskript %f")
713 #:comment '((#f "Tool for writers")
714 ("es" "Herramienta para escritores/as"))
715 #:keywords "manuskript;office;write;edit;novel;text;msk"
719 #:categories "Office;WordProcessor;"))
723 ("python-lxml" ,python-lxml)
724 ("python-markdown" ,python-markdown)
725 ("python-pyqt" ,python-pyqt)
727 (home-page "http://www.theologeek.ch/manuskript/")
728 (synopsis "Tool for writers")
729 (description "Manuskript provides a rich environment to help
730 writers create their first draft and then further refine and edit
731 their masterpiece. With Manuskript you can:
734 @item Grow your premise from one sentence, to a paragraph, to a full
736 @item Create characters,
737 @item Conceive plots,
738 @item Construct outlines (Outline mode and/or Index cards),
739 @item Write with focus (Distraction free mode),
742 @item Edit and re-organize chapters and scenes,
743 @item View Story line,
744 @item Compose with fiction or non-fiction templates and writing modes,
745 @item Import and export document formats such as HTML, ePub,
746 OpenDocument, DocX, and more.
749 Additionally Manuskript can help in many more ways with a spell
750 checker, markdown highlighter, frequency analyzer, and automatic save
751 in plain text file format.")
752 (license license:gpl3+)))
754 (define-public editorconfig-core-c
756 (name "editorconfig-core-c")
762 (url "https://github.com/editorconfig/editorconfig-core-c")
763 (commit (string-append "v" version))))
764 (file-name (git-file-name name version))
766 (base32 "1311fhh2jfsja2hhk3nwb6nijlq03jw8dk35cwbrac0p9jvy03jx"))))
767 (build-system cmake-build-system)
770 (modify-phases %standard-phases
771 (add-after 'unpack 'insert-tests
772 (lambda* (#:key inputs #:allow-other-keys)
773 (let ((tests (assoc-ref inputs "tests")))
774 (copy-recursively tests "tests"))
776 (add-after 'install 'delete-static-library
777 (lambda* (#:key outputs #:allow-other-keys)
778 (let* ((out (assoc-ref outputs "out"))
779 (lib (string-append out "/lib")))
780 (with-directory-excursion lib
781 (delete-file "libeditorconfig_static.a"))
788 (url "https://github.com/editorconfig/editorconfig-core-test")
789 ;; The tests submodule commit matching this package's version.
790 (commit "48610d43b7455af12195473377f93c4ceea654f5")))
791 (file-name (git-file-name "editorconfig-core-test" version))
793 (base32 "1s29p4brmcsc3xsww3gk85dg45f1kk3iykh1air3ij0hymf5dyqy"))))))
796 (home-page "https://editorconfig.org/")
797 (synopsis "EditorConfig core library written in C")
798 (description "EditorConfig makes it easy to maintain the correct coding
799 style when switching between different text editors and between different
800 projects. The EditorConfig project maintains a file format and plugins for
801 various text editors which allow this file format to be read and used by those
803 (license license:bsd-2)))
805 (define-public texmacs
812 (uri (string-append "https://www.texmacs.org/Download/ftp/tmftp/"
813 "source/TeXmacs-" version "-src.tar.gz"))
815 (base32 "118sk75k0k9pkyfyx000n2ypab8vm1lz5zxkkdmsi5nwyr3rp56s"))))
816 (build-system gnu-build-system)
818 `(("pkg-config" ,pkg-config)
819 ("xdg-utils" ,xdg-utils))) ;for xdg-icon-resource
821 `(("freetype" ,freetype)
824 ("python" ,python-wrapper)
828 `(#:tests? #f ; no check target
830 (modify-phases %standard-phases
831 (add-after 'unpack 'fix-icon-directory
832 (lambda* (#:key outputs #:allow-other-keys)
833 (let ((out (assoc-ref outputs "out")))
834 (substitute* "packages/linux/icons.sh"
836 (string-append out "/share")))
838 (add-after 'install 'install-desktop-file
839 (lambda* (#:key outputs #:allow-other-keys)
840 ;; Install desktop file.
841 (let* ((out (assoc-ref outputs "out"))
842 (apps (string-append out "/share/applications"))
843 (source "TeXmacs/misc/mime/texmacs.desktop"))
844 (install-file source apps)
846 (add-before 'configure 'gzip-flags
848 (substitute* "Makefile.in"
849 (("^GZIP = gzip -f") "GZIP = gzip -f -n")))))))
850 (synopsis "Editing platform with special features for scientists")
852 "GNU TeXmacs is a text editing platform which is specialized for
853 scientists. It is ideal for editing structured documents with different types
854 of content. It has robust support for mathematical formulas and plots. It
855 can also act as an interface to external mathematical programs such as R and
856 Octave. TeXmacs is completely extensible via Guile.")
857 (license license:gpl3+)
858 (home-page "https://www.texmacs.org/tmweb/home/welcome.en.html")))
860 (define-public scintilla
867 (uri (let ((v (apply string-append (string-split version #\.))))
868 (string-append "https://www.scintilla.org/scintilla" v ".tgz")))
870 (base32 "1p62dq2fgdkvdn2clz1xjdj09acv87rbifl67zhlz7skqip31y9d"))))
871 (build-system gnu-build-system)
873 `(#:make-flags (list "GTK3=1" "CC=gcc" "-Cgtk")
874 #:tests? #f ;require un-packaged Pyside
876 (modify-phases %standard-phases
877 (delete 'configure) ;no configure script
879 ;; Upstream provides no install script.
880 (lambda* (#:key outputs #:allow-other-keys)
881 (let* ((out (assoc-ref outputs "out"))
882 (lib (string-append out "/lib"))
883 (include (string-append out "/include")))
884 (for-each (lambda (f) (install-file f lib))
885 (find-files "bin/" "\\.so$"))
886 (for-each (lambda (f) (install-file f include))
887 (find-files "include/" "."))
890 `(("pkg-config" ,pkg-config)
891 ("python" ,python-wrapper)))
894 (home-page "https://www.scintilla.org/")
895 (synopsis "Code editor for GTK+")
896 (description "Scintilla is a source code editing component for
897 GTK+. It has the usual features found in text editing components, as
898 well as some that are especially useful for editing and debugging
899 source code; these include support for syntax styling, error
900 indicators, code completion and call tips. Styling choices are more
901 open than with many editors: Scintilla lets you use proportional
902 fonts, bold and italics, multiple foreground and background colours,
903 and multiple fonts.")
904 (license license:hpnd)))
913 (uri (string-append "https://download.geany.org/"
914 "geany-" version ".tar.bz2"))
916 (base32 "060sachn33xpx3a609f09y97qq5ky17gvv686zbvrn618ij7bi8q"))))
917 (build-system gnu-build-system)
919 `(("autoconf" ,autoconf)
920 ("automake" ,automake)
923 ("intltool" ,intltool)
925 ("pkg-config" ,pkg-config)
926 ("python-docutils" ,python-docutils))) ;for rst2html
929 ;; FIXME: Geany bundles a 3.X release of Scintilla. It is not
930 ;; currently possible to replace it with our Scintilla package.
931 ;; ("scintilla" ,scintilla)
934 `(#:imported-modules ((guix build glib-or-gtk-build-system)
935 ,@%gnu-build-system-modules)
936 #:modules (((guix build glib-or-gtk-build-system) #:prefix glib-or-gtk:)
937 (guix build gnu-build-system)
940 (modify-phases %standard-phases
941 (add-after 'install 'glib-or-gtk-wrap
942 (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-wrap)))))
943 (home-page "https://www.geany.org")
944 (synopsis "Fast and lightweight IDE")
945 (description "Geany is a small and fast Integrated Development
946 Environment (IDE) that only has a few dependencies on other packages and is as
947 independent as possible from special desktop environments like KDE or GNOME.
949 The basic features of Geany are:
951 @item syntax highlighting
952 @item code completion
953 @item auto completion of often constructed constructs like if, for and while
954 @item auto completion of XML and HTML tags
957 @item many supported filetypes like C, Java, PHP, HTML, Python, Perl, Pascal
959 @item embedded terminal emulation
960 @item extensibility through plugins
962 (license license:gpl2+)))
967 ;; Stable release is 1.8. However, this development version
968 ;; introduces support for UTF-8.
972 (uri (string-append "http://www.moria.de/~michael/fe/"
973 "fe-" version ".tar.gz"))
976 "1hwws7si1752z6hp61zxznvgsb6846lp8zl1hn5ddhsbafwalwb9"))))
977 (build-system gnu-build-system)
979 `(#:tests? #f ;no test
980 ;; Sendmail is only used to send a crash log. Disable the
981 ;; feature since it is (1) undocumented (2) not very useful.
982 #:configure-flags (list "--disable-sendmail")
984 (modify-phases %standard-phases
985 (add-after 'install 'install-doc
986 (lambda* (#:key outputs #:allow-other-keys)
987 (let* ((out (assoc-ref outputs "out"))
988 (doc (string-append out "/share/doc/" ,name "-" ,version)))
989 (for-each (lambda (f) (install-file f doc))
990 '("fe.doc" "fe.html" "fe.ps" "feref.ps" "README"))
993 `(("gettext" ,gettext-minimal)))
995 `(("ncurses" ,ncurses)))
996 (home-page "http://www.moria.de/~michael/fe/")
997 (synopsis "Small folding editor")
998 (description "Fe is a small folding editor. It folds
999 arbitrary text regions; it is not bound to syntactic units.
1001 Fe has no configuration or extension language and requires no setup.
1002 Its user interface is emacs-like and it has menus for the very most
1003 important functions to help beginners. Further there is a reference
1007 @item Regions and Emacs-like kill ring
1008 @item Incremental search
1009 @item Keyboard macros
1010 @item Editing binary files
1011 @item Multiple windows and views
1012 @item Compose function for Latin 1 characters
1014 (license license:gpl2+)))
1023 (url "https://github.com/vigna/ne")
1025 (file-name (git-file-name name version))
1028 "01aglnsfljlvx0wvyvpjfn4y88jf450a06qnj9a8lgdqv1hdkq1a"))))
1029 (build-system gnu-build-system)
1032 ("texinfo" ,texinfo)))
1034 `(("ncurses" ,ncurses)))
1039 (string-append "PREFIX=" (assoc-ref %outputs "out"))
1040 (string-append "LDFLAGS=-L" (assoc-ref %build-inputs "ncurses")
1043 (modify-phases %standard-phases
1046 (substitute* "src/makefile"
1047 (("-lcurses") "-lncurses"))
1049 (home-page "http://ne.di.unimi.it/")
1050 (synopsis "Text editor with menu bar")
1051 (description "This package provides a modeless text editor with menu bar.
1052 It supports syntax highlighting, regular expressions, configurable menus,
1053 keybindings, autocomplete and unlimited undo. It can pipe a marked block
1054 of text through any command line filter. It can also open very large binary
1055 files. It was originally developed on the Amiga 3000T.")
1056 (license license:gpl3+)))
1058 (define-public hexer
1065 (uri (string-append "https://devel.ringlet.net/files/editors/hexer/"
1066 "hexer-" version ".tar.xz"))
1068 (base32 "157z17z8qivdin2km2wp86x1bv1nx15frrwcz11mk0l3ab74mf76"))))
1069 (build-system gnu-build-system)
1071 `(#:tests? #f ;no upstream tests
1074 (string-append "PREFIX=" (assoc-ref %outputs "out"))
1075 (string-append "LTERMCAP=-lncurses")
1076 (string-append "LDFLAGS=-L" (assoc-ref %build-inputs "ncurses")
1079 (modify-phases %standard-phases
1080 (delete 'configure)))) ;no configure script
1082 `(("ncurses" ,ncurses)))
1083 (home-page "https://devel.ringlet.net/editors/hexer/")
1084 (synopsis "Multi buffer editor for binary files with vi-like interface")
1085 (description "Hexer is a multi-buffer editor for binary files for Unix-like
1086 systems that displays its buffer(s) as a hex dump. The user interface is kept
1088 (license license:bsd-3)))
1090 (define-public virtaal
1096 (uri (string-append "mirror://sourceforge/translate/Virtaal/"
1097 version "/virtaal-" version ".tar.bz2"))
1100 "0cyimjp3191qlmw6n0ipqdr9xr0cq4f6dqvz4rl9q31h6l3kywf9"))))
1101 (build-system python-build-system)
1103 `(#:python ,python-2
1104 #:use-setuptools? #f
1105 #:tests? #f ;; Failing tests
1107 (modify-phases %standard-phases
1108 (add-before 'build 'configure
1109 (lambda* (#:key outputs #:allow-other-keys)
1110 ;; Set data file path to absolute store path.
1111 (substitute* "virtaal/common/pan_app.py"
1112 (("file_discovery\\.get_abs_data_filename.*")
1113 (string-append "os.path.join('"
1114 (assoc-ref outputs "out")
1115 "/share', *path_parts)"))))))))
1117 `(("python2-lxml" ,python2-lxml)
1118 ("python2-pygtk" ,python2-pygtk)
1119 ("python2-simplejson" ,python2-simplejson)
1120 ("python2-translate-toolkit" ,python2-translate-toolkit)
1121 ("python2-pycurl" ,python2-pycurl)))
1122 (synopsis "Graphical translation tool")
1123 (description "Virtaal is a powerful yet simple translation tool with an
1124 uncluttered user interface. It supports a multitude of translation formats
1125 provided by the Translate Toolkit, including XLIFF and PO.")
1126 (home-page "https://virtaal.translatehouse.org/")
1127 (license license:gpl2+)))