Merge branch 'master' into core-updates
[jackhill/guix/guix.git] / gnu / packages / text-editors.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2016 José Miguel Sánchez García <jmi2k@openmailbox.org>
3 ;;; Copyright © 2016 Carlo Zancanaro <carlo@zancanaro.id.au>
4 ;;; Copyright © 2017, 2018, 2020 Eric Bavier <bavier@posteo.net>
5 ;;; Copyright © 2017 Feng Shu <tumashu@163.com>
6 ;;; Copyright © 2017 Nikita <nikita@n0.is>
7 ;;; Copyright © 2014 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.org>
8 ;;; Copyright © 2017–2021 Tobias Geerinckx-Rice <me@tobias.gr>
9 ;;; Copyright © 2019 Efraim Flashner <efraim@flashner.co.il>
10 ;;; Copyright © 2019 Andreas Enge <andreas@enge.fr>
11 ;;; Copyright © 2019, 2020, 2021 Nicolas Goaziou <mail@nicolasgoaziou.fr>
12 ;;; Copyright © 2020 Marius Bakke <mbakke@fastmail.com>
13 ;;; Copyright © 2020 Tom Zander <tomz@freedommail.ch>
14 ;;; Copyright © 2020 Mark Meyer <mark@ofosos.org>
15 ;;; Copyright © 2020 Maxime Devos <maximedevos@telenet.be>
16 ;;; Copyright © 2021 aecepoglu <aecepoglu@fastmail.fm>
17 ;;; Copyright © 2021 Leo Famulari <leo@famulari.name>
18 ;;; Copyright © 2021 Pierre Langlois <pierre.langlois@gmx.com>
19 ;;;
20 ;;; This file is part of GNU Guix.
21 ;;;
22 ;;; GNU Guix is free software; you can redistribute it and/or modify it
23 ;;; under the terms of the GNU General Public License as published by
24 ;;; the Free Software Foundation; either version 3 of the License, or (at
25 ;;; your option) any later version.
26 ;;;
27 ;;; GNU Guix is distributed in the hope that it will be useful, but
28 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
29 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
30 ;;; GNU General Public License for more details.
31 ;;;
32 ;;; You should have received a copy of the GNU General Public License
33 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
34
35 (define-module (gnu packages text-editors)
36 #:use-module (guix packages)
37 #:use-module (guix download)
38 #:use-module (guix git-download)
39 #:use-module (guix utils)
40 #:use-module (guix build-system cargo)
41 #:use-module (guix build-system cmake)
42 #:use-module (guix build-system gnu)
43 #:use-module (guix build-system glib-or-gtk)
44 #:use-module (guix build-system python)
45 #:use-module ((guix licenses) #:prefix license:)
46 #:use-module (gnu packages)
47 #:use-module (gnu packages aspell)
48 #:use-module (gnu packages assembly)
49 #:use-module (gnu packages autotools)
50 #:use-module (gnu packages boost)
51 #:use-module (gnu packages code)
52 #:use-module (gnu packages crates-io)
53 #:use-module (gnu packages documentation)
54 #:use-module (gnu packages fontutils)
55 #:use-module (gnu packages freedesktop)
56 #:use-module (gnu packages gcc)
57 #:use-module (gnu packages gettext)
58 #:use-module (gnu packages glib)
59 #:use-module (gnu packages gtk)
60 #:use-module (gnu packages guile)
61 #:use-module (gnu packages haskell-xyz)
62 #:use-module (gnu packages libbsd)
63 #:use-module (gnu packages libreoffice)
64 #:use-module (gnu packages llvm)
65 #:use-module (gnu packages lua)
66 #:use-module (gnu packages ncurses)
67 #:use-module (gnu packages pcre)
68 #:use-module (gnu packages perl)
69 #:use-module (gnu packages pkg-config)
70 #:use-module (gnu packages python)
71 #:use-module (gnu packages python-web)
72 #:use-module (gnu packages python-xyz)
73 #:use-module (gnu packages qt)
74 #:use-module (gnu packages regex)
75 #:use-module (gnu packages ruby)
76 #:use-module (gnu packages terminals)
77 #:use-module (gnu packages texinfo)
78 #:use-module (gnu packages version-control)
79 #:use-module (gnu packages xml)
80 #:use-module (gnu packages xorg))
81
82 (define-public vis
83 (package
84 (name "vis")
85 (version "0.7") ; also update the vis-test input
86 (source
87 (origin
88 (method git-fetch)
89 (uri (git-reference
90 (url "https://git.sr.ht/~martanne/vis")
91 (commit (string-append "v" version))))
92 (sha256
93 (base32 "1g05ncsnk57kcqm9wsv6sz8b24kyzj8r5rfpa1wfwj8qkjzx3vji"))
94 (file-name (git-file-name name version))))
95 (build-system gnu-build-system)
96 (arguments
97 `(#:test-target "test"
98 #:phases
99 (modify-phases %standard-phases
100 (add-after 'unpack 'unpack-test-suite
101 (lambda* (#:key inputs #:allow-other-keys)
102 (let ((vis-test (assoc-ref inputs "vis-test")))
103 (copy-recursively vis-test "test")
104 #t)))
105 (delete 'check) ; the tests need a wrapped vis
106 (add-after 'install 'wrap-binary
107 (lambda* (#:key inputs outputs #:allow-other-keys)
108 (let* ((out (assoc-ref outputs "out"))
109 (lpeg (assoc-ref inputs "lua-lpeg"))
110 (lua-version ,(version-major+minor (package-version lua)))
111 (LUA_PATH (string-append lpeg "/share/lua/"
112 lua-version "/?.lua"))
113 (LUA_CPATH (string-append lpeg "/lib/lua/"
114 lua-version "/?.so")))
115 (wrap-program (string-append out "/bin/vis")
116 `("LUA_PATH" ":" prefix (,LUA_PATH))
117 `("LUA_CPATH" ":" prefix (,LUA_CPATH)))
118 #t)))
119 (add-after 'wrap-binary 'check
120 (assoc-ref %standard-phases 'check))
121 (add-before 'check 'set-up-tests
122 (lambda* (#:key outputs #:allow-other-keys)
123 (let ((out (assoc-ref outputs "out")))
124 ;; DEFAULT_COMPILER is hard-coded here.
125 (substitute* "test/core/ccan-config.c"
126 (("\"cc\"")
127 (format #f "\"~a\"" ,(cc-for-target))))
128
129 ;; Use the ‘vis’ executable that we wrapped above.
130 (install-file (string-append out "/bin/vis") ".")
131
132 ;; XXX Delete 2 failing tests. TODO: make them not fail. :-)
133 (for-each delete-file
134 (find-files "test/vis/selections" "^complement"))
135 #t))))))
136 (native-inputs
137 `(("vis-test"
138 ,(origin
139 (method git-fetch)
140 (uri (git-reference
141 (url "https://git.sr.ht/~martanne/vis-test")
142 (commit "bbd2f34ff788e87a51a74069069273ad83c44f1f")))
143 (sha256
144 (base32 "1jsvg2lg3xqfgi79x08kx94mc34mh62ivca10vsci6fqsk68jbd0"))
145 (file-name (git-file-name "vis-test" version))))))
146 (inputs `(("lua" ,lua)
147 ("ncurses" ,ncurses)
148 ("libtermkey" ,libtermkey)
149 ("lua-lpeg" ,lua-lpeg)
150 ("tre" ,tre)))
151 (synopsis "Vim-like text editor")
152 (description
153 "Vis aims to be a modern, legacy free, simple yet efficient vim-like text
154 editor. It extends vim's modal editing with built-in support for multiple
155 cursors/selections and combines it with sam's structural regular expression
156 based command language.")
157 (home-page "https://github.com/martanne/vis")
158 (license (list license:isc ; Main distribution.
159 license:public-domain ; map.[ch]
160 license:expat)))) ; lexers and libutf.[ch]
161
162 (define-public kakoune
163 (package
164 (name "kakoune")
165 (version "2020.09.01")
166 (source
167 (origin
168 (method url-fetch)
169 (uri (string-append "https://github.com/mawww/kakoune/"
170 "releases/download/v" version "/"
171 "kakoune-" version ".tar.bz2"))
172 (sha256
173 (base32 "0x81rxy7bqnhd9374g5ypy4w4nxmm0vnqw6b52bf62jxdg2qj6l6"))))
174 (build-system gnu-build-system)
175 (arguments
176 `(#:make-flags
177 (list (string-append "PREFIX=" (assoc-ref %outputs "out")))
178 #:phases
179 (modify-phases %standard-phases
180 (add-after 'unpack 'patch-source
181 (lambda _
182 ;; kakoune uses confstr with _CS_PATH to find out where to find
183 ;; a posix shell, but this doesn't work in the build
184 ;; environment. This substitution just replaces that result
185 ;; with the "sh" path.
186 (substitute* "src/shell_manager.cc"
187 (("if \\(m_shell.empty\\(\\)\\)" line)
188 (string-append "m_shell = \"" (which "sh")
189 "\";\n " line)))
190 #t))
191 (delete 'configure) ; no configure script
192 ;; kakoune requires us to be in the src/ directory to build.
193 (add-before 'build 'chdir
194 (lambda _ (chdir "src") #t)))))
195 (native-inputs
196 `(("asciidoc" ,asciidoc)
197 ("pkg-config" ,pkg-config)
198 ("ruby" ,ruby)))
199 (inputs
200 `(("ncurses" ,ncurses)))
201 (synopsis "Vim-inspired code editor")
202 (description
203 "Kakoune is a code editor heavily inspired by Vim, as such most of its
204 commands are similar to Vi's ones, and it shares Vi's \"keystrokes as a text
205 editing language\" model. Kakoune has a strong focus on interactivity, most
206 commands provide immediate and incremental results, while still being
207 competitive (as in keystroke count) with Vim.")
208 (home-page "https://kakoune.org/")
209 (license license:unlicense)))
210
211 (define-public kak-lsp
212 (package
213 (name "kak-lsp")
214 (version "9.0.0")
215 (source
216 (origin
217 (method git-fetch)
218 (uri (git-reference
219 (url "https://github.com/kak-lsp/kak-lsp")
220 (commit (string-append "v" version))))
221 (file-name (git-file-name name version))
222 (sha256 "1wfv2fy5ga6kc51zka3pak0hq97csm2l11bz74w3n1hrf5q9nnf8")))
223 (build-system cargo-build-system)
224 (arguments
225 `(#:cargo-inputs
226 (("rust-crossbeam-channel" ,rust-crossbeam-channel-0.4)
227 ("rust-clap" ,rust-clap-2)
228 ("rust-daemonize" ,rust-daemonize-0.4)
229 ("rust-dirs" ,rust-dirs-2)
230 ("rust-enum_primitive" ,rust-enum-primitive-0.1)
231 ("rust-glob" ,rust-glob-0.3)
232 ("rust-itertools" ,rust-itertools-0.9)
233 ("rust-lsp-types" ,rust-lsp-types-0.80)
234 ("rust-jsonrpc-core" ,rust-jsonrpc-core-14)
235 ("rust-libc" ,rust-libc-0.2)
236 ("rust-rand" ,rust-rand-0.7)
237 ("rust-regex" ,rust-regex-1)
238 ("rust-ropey" ,rust-ropey-1)
239 ("rust-serde" ,rust-serde-1)
240 ("rust-serde_derive" ,rust-serde-derive-1)
241 ("rust-serde_json" ,rust-serde-json-1)
242 ("rust-slog" ,rust-slog-2)
243 ("rust-slog-scope" ,rust-slog-scope-4)
244 ("rust-sloggers" ,rust-sloggers-1)
245 ("rust-toml" ,rust-toml-0.5)
246 ("rust-url" ,rust-url-2)
247 ("rust-whoami" ,rust-whoami-0.8))))
248 (home-page "https://github.com/kak-lsp/kak-lsp")
249 (synopsis "Language Server Protocol (LSP) client for Kakoune")
250 (description
251 "kak-lsp is a Language Server Protocol client for Kakoune implemented in
252 Rust.")
253 (license license:unlicense)))
254
255 (define-public parinfer-rust
256 (package
257 (name "parinfer-rust")
258 (version "0.4.3")
259 (source
260 (origin
261 (method git-fetch)
262 (uri (git-reference
263 (url "https://github.com/eraserhd/parinfer-rust")
264 (commit (string-append "v" version))))
265 (sha256
266 (base32 "0hj5in5h7pj72m4ag80ing513fh65q8xlsf341qzm3vmxm3y3jgd"))
267 (file-name (git-file-name name version))))
268 (build-system cargo-build-system)
269 (arguments
270 `(#:cargo-inputs
271 (("rust-getopts" ,rust-getopts-0.2)
272 ("rust-libc" ,rust-libc-0.2)
273 ("rust-emacs" ,rust-emacs-0.11)
274 ("rust-serde" ,rust-serde-1)
275 ("rust-serde-json" ,rust-serde-json-1)
276 ("rust-serde-derive" ,rust-serde-derive-1)
277 ("rust-unicode-segmentation" ,rust-unicode-segmentation-1)
278 ("rust-unicode-width" ,rust-unicode-width-0.1))))
279 (inputs
280 `(("clang" ,clang)))
281 (home-page "https://github.com/justinbarclay/parinfer-rust")
282 (synopsis "Infer parantheses for Clojure, Lisp and Scheme")
283 (description
284 "Parinfer is a plugin for Kakoune, Vim, Neovim and Emacs that infers
285 paretheses and indentation. This library can be called from other editors that
286 can load dynamic libraries.")
287 (license license:expat)))
288
289 (define-public joe
290 (package
291 (name "joe")
292 (version "4.6")
293 (source
294 (origin
295 (method url-fetch)
296 (uri (string-append "https://sourceforge.net/projects/joe-editor/"
297 "files/JOE sources/joe-" version "/"
298 "joe-" version ".tar.gz"))
299 (sha256
300 (base32
301 "1pmr598xxxm9j9dl93kq4dv36zyw0q2dh6d7x07hf134y9hhlnj9"))))
302 (build-system gnu-build-system)
303 (inputs `(("ncurses" ,ncurses)))
304 (home-page "http://joe-editor.sourceforge.net/")
305 (synopsis "Console screen editor")
306 (description
307 "JOE is a powerful console screen editor with a \"mode-less\" user
308 interface similar to many user-friendly editors. JOE has some of the key
309 bindings and many of the powerful features of GNU Emacs.")
310 (license license:gpl3+)))
311
312 (define-public jucipp
313 (package
314 (name "jucipp")
315 (version "1.6.3")
316 (home-page "https://gitlab.com/cppit/jucipp")
317 (source (origin
318 (method git-fetch)
319 (uri (git-reference (url home-page)
320 (commit (string-append "v" version))
321 ;; Two submodules are required which are
322 ;; developed alongside JuCi++ and difficult
323 ;; to package separately.
324 (recursive? #t)))
325 (file-name (git-file-name name version))
326 (sha256
327 (base32 "1gy2xb5rm7q4zx9rl23h96b1i46fz27v25nklj50fvqp8ax2gxqy"))))
328 (build-system cmake-build-system)
329 (arguments
330 `(#:configure-flags '("-DBUILD_TESTING=ON"
331
332 ;; These arguments are here to facilitate an "in-source"
333 ;; build using "./build" instead of the default "../build".
334 ;; The test suite expects that to be the case.
335 "..")
336 #:out-of-source? #f
337 #:phases (modify-phases %standard-phases
338 (add-before 'configure 'enter-build-directory
339 (lambda _
340 (mkdir "build")
341 (chdir "build")
342 #t))
343
344 (add-after 'unpack 'patch-tiny-process-library
345 (lambda _
346 (with-directory-excursion "lib/tiny-process-library"
347 (substitute* '("process_unix.cpp"
348 "tests/io_test.cpp")
349 (("/bin/sh") (which "sh"))))
350 #t))
351 (add-after 'unpack 'disable-git-test
352 (lambda _
353 (substitute* "tests/CMakeLists.txt"
354 ;; Disable the git test, as it requires the full checkout.
355 (("add_test\\(git_test.*\\)") ""))
356 #t))
357 (add-before 'check 'pre-check
358 (lambda* (#:key inputs #:allow-other-keys)
359 ;; Tests do not expect HOME to be empty.
360 (setenv "HOME" "/etc")
361
362 ;; Most tests require an X server.
363 (let ((xorg-server (assoc-ref inputs "xorg-server"))
364 (display ":1"))
365 (setenv "DISPLAY" display)
366 (system (string-append xorg-server "/bin/Xvfb "
367 display " &")))
368 #t))
369 (add-after 'install 'wrap
370 (lambda* (#:key inputs outputs #:allow-other-keys)
371 ;; The package needs GTK+ and GtkSourceView on XDG_DATA_DIRS
372 ;; for syntax highlighting to work. shared-mime-info is
373 ;; necessary for MIME handling.
374 ;; XXX: Ideally we'd reuse glib-or-gtk-wrap here, but it
375 ;; does not pick up $gtksourceview/share/gtksourceview-3.0.
376 (let ((out (assoc-ref outputs "out"))
377 (gtk+ (assoc-ref inputs "gtk+"))
378 (gtksourceview (assoc-ref inputs "gtksourceview"))
379 (shared-mime-info (assoc-ref inputs "shared-mime-info")))
380 (wrap-program (string-append out "/bin/juci")
381 `("XDG_DATA_DIRS" ":" prefix
382 (,(string-join
383 (map (lambda (pkg)
384 (string-append pkg "/share"))
385 (list out gtk+ gtksourceview shared-mime-info))
386 ":"))))
387 #t))))))
388 (native-inputs
389 `(("pkg-config" ,pkg-config)
390 ("xorg-server" ,xorg-server-for-tests)))
391 (inputs
392 `(("aspell" ,aspell)
393 ("boost" ,boost)
394 ("ctags" ,universal-ctags)
395 ("gtkmm" ,gtkmm)
396 ("gtksourceviewmm" ,gtksourceviewmm)
397 ("libclang" ,clang-11) ;XXX: must be the same version as Mesas LLVM
398 ("libgit2" ,libgit2)))
399 (synopsis "Lightweight C++ IDE")
400 (description
401 "juCi++ is a small @acronym{IDE, Integrated Development Environment}
402 designed especially towards libclang with speed, stability, and ease of use
403 in mind.
404
405 It supports autocompletion, on-the-fly warnings and errors, syntax
406 highlighting, and integrates with Git as well as the CMake and Meson build
407 systems.")
408 (license license:expat)))
409
410 (define-public leafpad
411 (package
412 (name "leafpad")
413 (version "0.8.18.1")
414 (source (origin
415 (method url-fetch)
416 (uri (string-append "mirror://savannah/"
417 "leafpad/leafpad-" version ".tar.gz"))
418 (sha256
419 (base32
420 "0b0az2wvqgvam7w0ns1j8xp2llslm1rx6h7zcsy06a7j0yp257cm"))))
421 (build-system glib-or-gtk-build-system)
422 (native-inputs
423 `(("intltool" ,intltool)
424 ("pkg-config" ,pkg-config)))
425 (inputs
426 `(("gtk+" ,gtk+-2)))
427 (home-page "http://tarot.freeshell.org/leafpad/")
428 (synopsis "GTK+ based text editor")
429 (description "Leafpad is a GTK+ text editor that emphasizes simplicity. As
430 development focuses on keeping weight down to a minimum, only the most essential
431 features are implemented in the editor. Leafpad is simple to use, is easily
432 compiled, requires few libraries, and starts up quickly. ")
433 (license license:gpl2+)))
434
435 (define-public l3afpad
436 (let ((commit "5235c9e13bbf0d31a902c6776918c2d7cdbb61ff")
437 (revision "0"))
438 (package
439 (name "l3afpad")
440 (version (git-version "0.8.18.1.11" revision commit))
441 (source (origin
442 (method git-fetch)
443 (file-name (git-file-name name version))
444 (uri (git-reference
445 (url "https://github.com/stevenhoneyman/l3afpad")
446 (commit commit)))
447 (sha256
448 (base32
449 "1alyghm2wpakzdfag0g4g8gb1h9l4wdg7mnhq8bk0iq5ryqia16a"))))
450 (build-system glib-or-gtk-build-system)
451 (native-inputs
452 `(("intltool" ,intltool)
453 ("autoconf" ,autoconf)
454 ("automake" ,automake)
455 ("pkg-config" ,pkg-config)))
456 (inputs
457 `(("gtk+" ,gtk+)))
458 (home-page "http://tarot.freeshell.org/leafpad/")
459 (synopsis "GTK+ 3 based text editor")
460 (description "L3afpad is a GTK+ 3 text editor that emphasizes simplicity. As
461 development focuses on keeping weight down to a minimum, only the most essential
462 features are implemented in the editor. L3afpad is simple to use, is easily
463 compiled, requires few libraries, and starts up quickly. L3afpad is a
464 fork of Leafpad that uses GTK+ 3 instead of GTK+ 2.")
465 (license license:gpl2+))))
466
467 (define-public e3
468 (package
469 (name "e3")
470 (version "2.82")
471 (source (origin
472 (method url-fetch)
473 (uri (string-append "https://sites.google.com/site/e3editor/Home/"
474 "e3-" version ".tgz"))
475 (sha256
476 (base32
477 "0919kadkas020maqq37852isnzp053q2fnws2zh3mz81d1jiviak"))
478 (modules '((guix build utils)))
479
480 ;; Remove pre-built binaries.
481 (snippet '(begin
482 (delete-file-recursively "bin")
483 #t))))
484 (build-system gnu-build-system)
485 (arguments
486 `(#:tests? #f
487 #:make-flags (list (string-append "PREFIX="
488 (assoc-ref %outputs "out")))
489 #:phases (modify-phases %standard-phases
490 (delete 'configure))))
491 (native-inputs
492 `(("nasm" ,nasm)))
493 (home-page "https://sites.google.com/site/e3editor/")
494 (synopsis "Tiny text editor written in assembly")
495 (description
496 "e3 is a micro text editor with an executable code size between 3800 and
497 35000 bytes. Except for ``syntax highlighting'', the e3 binary supports all
498 of the basic functions one expects plus built in arithmetic calculations.
499 UTF-8 coding of unicode characters is supported as well. e3 can use
500 Wordstar-, EMACS-, Pico, Nedit or vi-like key bindings. e3 can be used on
501 16, 32, and 64-bit CPUs.")
502 (supported-systems '("x86_64-linux" "i686-linux"))
503 (license license:gpl2+)))
504
505 (define-public mg
506 (package
507 (name "mg")
508 (version "20180927")
509 (source (origin
510 (method git-fetch)
511 (uri (git-reference
512 (url "https://github.com/hboetes/mg")
513 (commit version)))
514 (file-name (git-file-name name version))
515 (sha256
516 (base32
517 "14vrm8lvwksf697sqks7xfd1xaqjlqjc9afjk33sksq5p27wr203"))
518 (modules '((guix build utils)))
519 (snippet '(begin
520 (substitute* "GNUmakefile"
521 (("/usr/bin/") ""))
522 #t))))
523 (build-system gnu-build-system)
524 (native-inputs
525 `(("pkg-config" ,pkg-config)))
526 (inputs
527 `(("libbsd" ,libbsd)
528 ("ncurses" ,ncurses)))
529 (arguments
530 ;; No test suite available.
531 `(#:tests? #f
532 #:make-flags (list (string-append "prefix=" %output)
533 (string-append "CC=" ,(cc-for-target)))
534 #:phases (modify-phases %standard-phases
535 (delete 'configure) ; no configure script
536 (add-before 'build 'correct-location-of-difftool
537 (lambda _
538 (substitute* "buffer.c"
539 (("/usr/bin/diff")
540 (which "diff")))))
541 (add-before 'build 'pkg-config-for-cross-compiling-target
542 (lambda _
543 (substitute* "GNUmakefile"
544 (("pkg-config")
545 (or (which "pkg-config")
546 (string-append ,(%current-target-system)
547 "-pkg-config"))))))
548 (add-before 'install 'patch-tutorial-location
549 (lambda* (#:key outputs #:allow-other-keys)
550 (substitute* "mg.1"
551 (("/usr") (assoc-ref outputs "out")))))
552 (add-after 'install 'install-tutorial
553 (lambda* (#:key outputs #:allow-other-keys)
554 (let* ((out (assoc-ref outputs "out"))
555 (doc (string-append out "/share/doc/mg")))
556 (install-file "tutorial" doc)))))))
557 (home-page "https://homepage.boetes.org/software/mg/")
558 (synopsis "Microscopic GNU Emacs clone")
559 (description
560 "Mg (@command{mg}) is a GNU Emacs style editor, with which it is
561 \"broadly\" compatible. This is a portable version of the mg maintained by the
562 OpenBSD team.")
563 (license license:public-domain)))
564
565 (define-public qemacs
566 (package
567 (name "qemacs")
568 (version "0.3.3")
569 (source
570 (origin
571 (method url-fetch)
572 (uri (string-append "https://bellard.org/qemacs/"
573 "qemacs-" version ".tar.gz"))
574 (sha256
575 (base32 "156z4wpj49i6j388yjird5qvrph7hz0grb4r44l4jf3q8imadyrg"))))
576 (build-system gnu-build-system)
577 (arguments
578 `(#:tests? #f ;no test
579 #:phases
580 (modify-phases %standard-phases
581 (add-before 'build 'build-qhtml
582 ;; Build fails without first creating qHTML library.
583 (lambda _ (invoke "make" "-C" "libqhtml")))
584 (add-before 'install 'fix-man-pages-directory
585 ;; Install in $out/share/man instead of $out/man.
586 (lambda _
587 (substitute* "Makefile"
588 (("/man/man1" all) (string-append "/share" all)))
589 #t))
590 (add-before 'install 'create-directories
591 ;; Ensure directories exist before installing files.
592 (lambda* (#:key outputs #:allow-other-keys)
593 (let ((out (assoc-ref outputs "out")))
594 (for-each (lambda (d) (mkdir-p (string-append out d)))
595 '("/bin" "/share/man/man1" "/share/qe"))
596 #t)))
597 (add-after 'install 'install-extra-documentation
598 ;; Install sample configuration file, Info, and HTML manual.
599 (lambda* (#:key native-inputs inputs outputs #:allow-other-keys)
600 (let* ((share (string-append (assoc-ref outputs "out") "/share"))
601 (doc (string-append share "/doc/" ,name "-" ,version))
602 (html (string-append share "/html"))
603 (info (string-append share "/info"))
604 (makeinfo (string-append
605 (assoc-ref (or native-inputs inputs) "texinfo")
606 "/bin/makeinfo")))
607 ;; First fix Texinfo documentation, create appropriate
608 ;; directories, then generate Info and HTML files there.
609 (substitute* "qe-doc.texi"
610 (("^M-([{}])" _ bracket) (string-append "M-@" bracket)))
611 (for-each (lambda (d) (mkdir-p d)) (list html info))
612 (invoke makeinfo "qe-doc.texi" "-o" info)
613 (invoke makeinfo "qe-doc.texi" "--html" "--no-split" "-o" html)
614 ;; Install sample configuration file.
615 (install-file "config.eg" doc)
616 #t))))))
617 (native-inputs
618 `(("texinfo" ,texinfo)))
619 (inputs
620 `(("libx11" ,libx11)
621 ("libxext" ,libxext)
622 ("libxv" ,libxv)))
623 (home-page "https://bellard.org/qemacs/")
624 (synopsis "Small but powerful text editor")
625 (description "QEmacs (for Quick Emacs) is a very small but
626 powerful editor. It has features that even big editors lack:
627
628 @itemize
629
630 @item Full screen editor with an Emacs look and feel with all Emacs
631 common features: multi-buffer, multi-window, command mode, universal
632 argument, keyboard macros, config file with C-like syntax, minibuffer
633 with completion and history.
634
635 @item Can edit files of hundreds of Megabytes without being slow by
636 using a highly optimized internal representation and by mmaping the
637 file.
638
639 @item Full Unicode support, including multi charset handling (8859-x,
640 UTF8, SJIS, EUC-JP, ...) and bidirectional editing respecting the
641 Unicode bidi algorithm. Arabic and Indic scripts handling (in
642 progress).
643
644 @item WYSIWYG HTML/XML/CSS2 mode graphical editing. Also supports
645 Lynx like rendering on VT100 terminals.
646
647 @item WYSIWYG DocBook mode based on XML/CSS2 renderer.
648
649 @item C mode: coloring with immediate update. Emacs like auto-indent.
650
651 @item Shell mode: colorized VT100 emulation so that your shell work
652 exactly as you expect. Compile mode with next/prev error.
653
654 @item Input methods for most languages, including Chinese (input
655 methods come from the Yudit editor).
656
657 @item Hexadecimal editing mode with insertion and block commands.
658 Unicode hexa editing is also supported.
659
660 @item Works on any VT100 terminals without termcap. UTF8 VT100
661 support included with double width glyphs.
662
663 @item X11 support. Support multiple proportional fonts at the same
664 time (as XEmacs). X Input methods supported. Xft extension supported
665 for anti aliased font display.
666
667 @item Small! Full version (including HTML/XML/CSS2/DocBook rendering
668 and all charsets): 200KB big. Basic version (without bidir/unicode
669 scripts/input/X11/C/Shell/HTML/Dired): 49KB.
670 @end itemize")
671 (license license:lgpl2.1+)))
672
673 (define-public ghostwriter
674 (package
675 (name "ghostwriter")
676 (version "2.0.2")
677 (source (origin
678 (method git-fetch)
679 (uri (git-reference
680 (url "https://github.com/wereturtle/ghostwriter")
681 (commit version)))
682 (file-name (git-file-name name version))
683 (sha256
684 (base32
685 "19cf55b86yj2b5hdazbyw4iyp6xq155243aiyg4m0vhwh0h79nwh"))))
686 (build-system gnu-build-system)
687 (native-inputs
688 `(("pkg-config" ,pkg-config)
689 ("qttools" ,qttools))) ; for lrelease
690 (inputs
691 `(("hunspell" ,hunspell)
692 ("qtbase" ,qtbase-5)
693 ("qtdeclarative" ,qtdeclarative)
694 ("qtmultimedia" ,qtmultimedia)
695 ("qtquickcontrols" ,qtquickcontrols)
696 ("qtsvg" ,qtsvg)
697 ("qtwebchannel" ,qtwebchannel)))
698 (propagated-inputs ; To get native-search-path
699 `(("qtwebengine" ,qtwebengine)))
700 (arguments
701 `(#:phases
702 (modify-phases %standard-phases
703 (replace 'configure
704 (lambda* (#:key outputs #:allow-other-keys)
705 (let ((out (assoc-ref outputs "out")))
706 (invoke "qmake" (string-append "PREFIX=" out)))))
707 (add-after 'configure 'create-translations
708 (lambda _
709 ;; `lrelease` will not overwrite, so delete existing .qm files
710 (for-each delete-file (find-files "translations" ".*\\.qm"))
711 (apply invoke "lrelease" (find-files "translations" ".*\\.ts"))))
712 ;; Ensure that icons are found at runtime.
713 (add-after 'install 'wrap-executable
714 (lambda* (#:key inputs outputs #:allow-other-keys)
715 (let ((out (assoc-ref outputs "out")))
716 (wrap-program (string-append out "/bin/ghostwriter")
717 `("QT_PLUGIN_PATH" ":" prefix
718 ,(map (lambda (label)
719 (string-append (assoc-ref inputs label)
720 "/lib/qt5/plugins/"))
721 '("qtsvg" "qtmultimedia"))))))))))
722 (home-page "https://wereturtle.github.io/ghostwriter/")
723 (synopsis "Write without distractions")
724 (description
725 "@code{ghostwriter} provides a relaxing, distraction-free writing
726 environment with Markdown markup.")
727 (license license:gpl3+))) ; icons/* under CC-BY-SA3
728
729 (define-public manuskript
730 (package
731 (name "manuskript")
732 (version "0.12.0")
733 (source
734 (origin
735 (method git-fetch)
736 (uri (git-reference
737 (url "https://github.com/olivierkes/manuskript")
738 (commit version)))
739 (file-name (git-file-name name version))
740 (sha256
741 (base32 "0gfwwnpjslb0g8y3v9ha4sd8in6bpy6bhi4rn4hmfd2vmq2flpbd"))))
742 (build-system python-build-system)
743 (arguments
744 `(#:tests? #f ;no test
745 #:phases
746 (modify-phases %standard-phases
747 (delete 'configure)
748 (delete 'build)
749 (replace 'install
750 (lambda* (#:key outputs #:allow-other-keys)
751 (let* ((out (assoc-ref outputs "out"))
752 (share (string-append out "/share/manuskript")))
753 ;; Install data.
754 (mkdir-p share)
755 (for-each
756 (lambda (d)
757 (let ((destination (string-append share "/" d)))
758 (mkdir-p destination)
759 (copy-recursively d destination)))
760 '("bin" "i18n" "icons" "libs" "manuskript" "resources"))
761 ;; Install documentation.
762 (let ((doc (string-append out
763 "/doc/manuskript-" ,version
764 "/sample-projects")))
765 (mkdir-p doc)
766 (copy-recursively "sample-projects" doc))
767 ;; Wrap executable in "$out/share/manuskript/bin" and
768 ;; link to it from "$out/bin".
769 (let ((bin (string-append out "/bin"))
770 (executable (string-append share "/bin/manuskript")))
771 (wrap-program executable
772 (list "GUIX_PYTHONPATH" 'prefix
773 (list (getenv "GUIX_PYTHONPATH"))))
774 (mkdir-p bin)
775 (with-directory-excursion bin
776 (symlink (string-append share "/bin/manuskript")
777 "manuskript")))
778 ;; Install icons and create .desktop file.
779 (let ((apps (string-append out "/share/applications"))
780 (icons-dir (string-append out "/share/pixmaps")))
781 (install-file "icons/Manuskript/manuskript.svg" icons-dir)
782 (mkdir-p apps)
783 (make-desktop-entry-file (string-append apps "/manuskript.desktop")
784 #:name "Manuskript"
785 #:mime-type "application/x-manuskript-book;"
786 #:exec (string-append out "/bin/manuskript %f")
787 #:comment '((#f "Tool for writers")
788 ("es" "Herramienta para escritores/as"))
789 #:keywords "manuskript;office;write;edit;novel;text;msk"
790 #:terminal #f
791 #:type "Application"
792 #:icon "manuskript"
793 #:categories "Office;WordProcessor;"))
794 #t))))))
795 (inputs
796 `(("pandoc" ,pandoc)
797 ("python-lxml" ,python-lxml)
798 ("python-markdown" ,python-markdown)
799 ("python-pyqt" ,python-pyqt)
800 ("qtsvg" ,qtsvg)))
801 (home-page "http://www.theologeek.ch/manuskript/")
802 (synopsis "Tool for writers")
803 (description "Manuskript provides a rich environment to help
804 writers create their first draft and then further refine and edit
805 their masterpiece. With Manuskript you can:
806
807 @itemize
808 @item Grow your premise from one sentence, to a paragraph, to a full
809 summary,
810 @item Create characters,
811 @item Conceive plots,
812 @item Construct outlines (Outline mode and/or Index cards),
813 @item Write with focus (Distraction free mode),
814 @item Build worlds,
815 @item Track items,
816 @item Edit and re-organize chapters and scenes,
817 @item View Story line,
818 @item Compose with fiction or non-fiction templates and writing modes,
819 @item Import and export document formats such as HTML, ePub,
820 OpenDocument, DocX, and more.
821 @end itemize
822
823 Additionally Manuskript can help in many more ways with a spell
824 checker, markdown highlighter, frequency analyzer, and automatic save
825 in plain text file format.")
826 (license license:gpl3+)))
827
828 (define-public editorconfig-core-c
829 (package
830 (name "editorconfig-core-c")
831 (version "0.12.5")
832 (source
833 (origin
834 (method git-fetch)
835 (uri (git-reference
836 (url "https://github.com/editorconfig/editorconfig-core-c")
837 (commit (string-append "v" version))))
838 (file-name (git-file-name name version))
839 (sha256
840 (base32 "073sh18y0v8wm10iphaia54pkdmwylalccpn1k5i9dwyfjzgj7yg"))))
841 (build-system cmake-build-system)
842 (arguments
843 '(#:phases
844 (modify-phases %standard-phases
845 (add-after 'unpack 'insert-tests
846 (lambda* (#:key inputs #:allow-other-keys)
847 (let ((tests (assoc-ref inputs "tests")))
848 (copy-recursively tests "tests"))
849 #t))
850 (add-after 'install 'delete-static-library
851 (lambda* (#:key outputs #:allow-other-keys)
852 (let* ((out (assoc-ref outputs "out"))
853 (lib (string-append out "/lib")))
854 (with-directory-excursion lib
855 (delete-file "libeditorconfig_static.a"))
856 #t))))))
857 (native-inputs
858 `(("tests"
859 ,(origin
860 (method git-fetch)
861 (uri (git-reference
862 (url "https://github.com/editorconfig/editorconfig-core-test")
863 ;; The tests submodule commit matching this package's version.
864 (commit "48610d43b7455af12195473377f93c4ceea654f5")))
865 (file-name (git-file-name "editorconfig-core-test" version))
866 (sha256
867 (base32 "1s29p4brmcsc3xsww3gk85dg45f1kk3iykh1air3ij0hymf5dyqy"))))))
868 (inputs
869 `(("pcre2" ,pcre2)))
870 (home-page "https://editorconfig.org/")
871 (synopsis "EditorConfig core library written in C")
872 (description "EditorConfig makes it easy to maintain the correct coding
873 style when switching between different text editors and between different
874 projects. The EditorConfig project maintains a file format and plugins for
875 various text editors which allow this file format to be read and used by those
876 editors.")
877 (license license:bsd-2)))
878
879 (define-public texmacs
880 (package
881 (name "texmacs")
882 (version "2.1")
883 (source
884 (origin
885 (method url-fetch)
886 (uri (string-append "https://www.texmacs.org/Download/ftp/tmftp/"
887 "source/TeXmacs-" version "-src.tar.gz"))
888 (sha256
889 (base32 "1gl6k1bwrk1y7hjyl4xvlqvmk5crl4jvsk8wrfp7ynbdin6n2i48"))))
890 (build-system gnu-build-system)
891 (native-inputs
892 `(("pkg-config" ,pkg-config)
893 ("xdg-utils" ,xdg-utils))) ;for xdg-icon-resource
894 (inputs
895 `(("freetype" ,freetype)
896 ("guile" ,guile-1.8)
897 ("perl" ,perl)
898 ("python" ,python-wrapper)
899 ("qt" ,qtbase-5)
900 ("qtsvg" ,qtsvg)))
901 (arguments
902 `(#:tests? #f ; no check target
903 #:phases
904 (modify-phases %standard-phases
905 (add-after 'unpack 'fix-icon-directory
906 (lambda* (#:key outputs #:allow-other-keys)
907 (let ((out (assoc-ref outputs "out")))
908 (substitute* "packages/linux/icons.sh"
909 (("/usr/share")
910 (string-append out "/share"))))))
911 (add-after 'install 'install-desktop-file
912 (lambda* (#:key outputs #:allow-other-keys)
913 ;; Install desktop file.
914 (let* ((out (assoc-ref outputs "out"))
915 (apps (string-append out "/share/applications"))
916 (source "TeXmacs/misc/mime/texmacs.desktop"))
917 (install-file source apps))))
918 (add-before 'configure 'gzip-flags
919 (lambda _
920 (substitute* "Makefile.in"
921 (("^GZIP = gzip -f") "GZIP = gzip -f -n")))))))
922 (synopsis "Editing platform with special features for scientists")
923 (description
924 "GNU TeXmacs is a text editing platform which is specialized for
925 scientists. It is ideal for editing structured documents with different types
926 of content. It has robust support for mathematical formulas and plots. It
927 can also act as an interface to external mathematical programs such as R and
928 Octave. TeXmacs is completely extensible via Guile.")
929 (license license:gpl3+)
930 (home-page "https://www.texmacs.org/tmweb/home/welcome.en.html")))
931
932 (define-public scintilla
933 (package
934 (name "scintilla")
935 (version "5.1.0")
936 (source
937 (origin
938 (method url-fetch)
939 (uri (let ((v (apply string-append (string-split version #\.))))
940 (string-append "https://www.scintilla.org/scintilla" v ".tgz")))
941 (sha256
942 (base32 "0figd543inpi00yr6han73qd2fzx99r099vzcbg9mhpzsgxfwz4f"))))
943 (build-system gnu-build-system)
944 (arguments
945 `(#:make-flags (list "GTK3=1" "CC=gcc" "-Cgtk")
946 #:tests? #f ;require un-packaged Pyside
947 #:phases
948 (modify-phases %standard-phases
949 (delete 'configure) ;no configure script
950 (replace 'install
951 ;; Upstream provides no install script.
952 (lambda* (#:key outputs #:allow-other-keys)
953 (let* ((out (assoc-ref outputs "out"))
954 (lib (string-append out "/lib"))
955 (include (string-append out "/include")))
956 (for-each (lambda (f) (install-file f lib))
957 (find-files "bin/" "\\.so$"))
958 (for-each (lambda (f) (install-file f include))
959 (find-files "include/" "."))))))))
960 (native-inputs
961 `(("gcc" ,gcc-9) ;Code has C++17 requirements
962 ("pkg-config" ,pkg-config)
963 ("python" ,python-wrapper)))
964 (inputs
965 `(("gtk+" ,gtk+)))
966 (home-page "https://www.scintilla.org/")
967 (synopsis "Code editor for GTK+")
968 (description "Scintilla is a source code editing component for
969 GTK+. It has the usual features found in text editing components, as
970 well as some that are especially useful for editing and debugging
971 source code; these include support for syntax styling, error
972 indicators, code completion and call tips. Styling choices are more
973 open than with many editors: Scintilla lets you use proportional
974 fonts, bold and italics, multiple foreground and background colours,
975 and multiple fonts.")
976 (license license:hpnd)))
977
978 (define-public geany
979 (package
980 (name "geany")
981 (version "1.37.1")
982 (source
983 (origin
984 (method url-fetch)
985 (uri (string-append "https://download.geany.org/"
986 "geany-" version ".tar.bz2"))
987 (sha256
988 (base32 "060sachn33xpx3a609f09y97qq5ky17gvv686zbvrn618ij7bi8q"))))
989 (build-system gnu-build-system)
990 (native-inputs
991 `(("autoconf" ,autoconf)
992 ("automake" ,automake)
993 ("doxygen" ,doxygen)
994 ("glib" ,glib "bin")
995 ("intltool" ,intltool)
996 ("libtool" ,libtool)
997 ("pkg-config" ,pkg-config)
998 ("python-docutils" ,python-docutils))) ;for rst2html
999 (inputs
1000 `(("gtk+" ,gtk+)
1001 ;; FIXME: Geany bundles a 3.X release of Scintilla. It is not
1002 ;; currently possible to replace it with our Scintilla package.
1003 ;; ("scintilla" ,scintilla)
1004 ))
1005 (arguments
1006 `(#:imported-modules ((guix build glib-or-gtk-build-system)
1007 ,@%gnu-build-system-modules)
1008 #:modules (((guix build glib-or-gtk-build-system) #:prefix glib-or-gtk:)
1009 (guix build gnu-build-system)
1010 (guix build utils))
1011 #:phases
1012 (modify-phases %standard-phases
1013 (add-after 'install 'glib-or-gtk-wrap
1014 (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-wrap)))))
1015 (home-page "https://www.geany.org")
1016 (synopsis "Fast and lightweight IDE")
1017 (description "Geany is a small and fast Integrated Development
1018 Environment (IDE) that only has a few dependencies on other packages and is as
1019 independent as possible from special desktop environments like KDE or GNOME.
1020
1021 The basic features of Geany are:
1022 @itemize
1023 @item syntax highlighting
1024 @item code completion
1025 @item auto completion of often constructed constructs like if, for and while
1026 @item auto completion of XML and HTML tags
1027 @item call tips
1028 @item folding
1029 @item many supported filetypes like C, Java, PHP, HTML, Python, Perl, Pascal
1030 @item symbol lists
1031 @item embedded terminal emulation
1032 @item extensibility through plugins
1033 @end itemize")
1034 (license license:gpl2+)))
1035
1036 (define-public fe
1037 (package
1038 (name "fe")
1039 ;; Stable release is 1.9. However, this development version
1040 ;; introduces support for UTF-8.
1041 (version "2.0")
1042 (source (origin
1043 (method url-fetch)
1044 (uri (string-append "http://www.moria.de/~michael/fe/"
1045 "fe-" version ".tar.gz"))
1046 (sha256
1047 (base32
1048 "10mk5wc3dsdp46b3hkjyd740gcdv6m1gvlr3p8xjxf55b3vfs0la"))))
1049 (build-system gnu-build-system)
1050 (arguments
1051 `(#:tests? #f ;no test
1052 ;; Sendmail is only used to send a crash log. Disable the
1053 ;; feature since it is (1) undocumented (2) not very useful.
1054 #:configure-flags (list "--disable-sendmail")
1055 #:phases
1056 (modify-phases %standard-phases
1057 (add-after 'install 'install-doc
1058 (lambda* (#:key outputs #:allow-other-keys)
1059 (let* ((out (assoc-ref outputs "out"))
1060 (doc (string-append out "/share/doc/" ,name "-" ,version)))
1061 (for-each (lambda (f) (install-file f doc))
1062 '("fe.doc" "fe.html" "fe.ps" "feref.ps" "README"))
1063 #t))))))
1064 (native-inputs
1065 `(("gettext" ,gettext-minimal)))
1066 (inputs
1067 `(("ncurses" ,ncurses)))
1068 (home-page "http://www.moria.de/~michael/fe/")
1069 (synopsis "Small folding editor")
1070 (description "Fe is a small folding editor. It folds
1071 arbitrary text regions; it is not bound to syntactic units.
1072
1073 Fe has no configuration or extension language and requires no setup.
1074 Its user interface is emacs-like and it has menus for the very most
1075 important functions to help beginners. Further there is a reference
1076 card. It offers:
1077
1078 @itemize
1079 @item Regions and Emacs-like kill ring
1080 @item Incremental search
1081 @item Keyboard macros
1082 @item Editing binary files
1083 @item Multiple windows and views
1084 @item Compose function for Latin 1 characters
1085 @end itemize")
1086 (license license:gpl2+)))
1087
1088 (define-public ne
1089 (package
1090 (name "ne")
1091 (version "3.3.0")
1092 (source (origin
1093 (method git-fetch)
1094 (uri (git-reference
1095 (url "https://github.com/vigna/ne")
1096 (commit version)))
1097 (file-name (git-file-name name version))
1098 (sha256
1099 (base32
1100 "01aglnsfljlvx0wvyvpjfn4y88jf450a06qnj9a8lgdqv1hdkq1a"))))
1101 (build-system gnu-build-system)
1102 (native-inputs
1103 `(("perl" ,perl)
1104 ("texinfo" ,texinfo)))
1105 (inputs
1106 `(("ncurses" ,ncurses)))
1107 (arguments
1108 `(#:tests? #f
1109 #:make-flags
1110 (list "CC=gcc"
1111 (string-append "PREFIX=" (assoc-ref %outputs "out"))
1112 (string-append "LDFLAGS=-L" (assoc-ref %build-inputs "ncurses")
1113 "/lib"))
1114 #:phases
1115 (modify-phases %standard-phases
1116 (replace 'configure
1117 (lambda _
1118 (substitute* "src/makefile"
1119 (("-lcurses") "-lncurses"))
1120 #t)))))
1121 (home-page "https://ne.di.unimi.it/")
1122 (synopsis "Text editor with menu bar")
1123 (description "This package provides a modeless text editor with menu bar.
1124 It supports syntax highlighting, regular expressions, configurable menus,
1125 keybindings, autocomplete and unlimited undo. It can pipe a marked block
1126 of text through any command line filter. It can also open very large binary
1127 files. It was originally developed on the Amiga 3000T.")
1128 (license license:gpl3+)))
1129
1130 (define-public hexer
1131 (package
1132 (name "hexer")
1133 (version "1.0.6")
1134 (source
1135 (origin
1136 (method url-fetch)
1137 (uri (string-append "https://devel.ringlet.net/files/editors/hexer/"
1138 "hexer-" version ".tar.xz"))
1139 (sha256
1140 (base32 "157z17z8qivdin2km2wp86x1bv1nx15frrwcz11mk0l3ab74mf76"))))
1141 (build-system gnu-build-system)
1142 (arguments
1143 `(#:tests? #f ;no upstream tests
1144 #:make-flags
1145 (list "CC=gcc"
1146 (string-append "PREFIX=" (assoc-ref %outputs "out"))
1147 (string-append "LTERMCAP=-lncurses")
1148 (string-append "LDFLAGS=-L" (assoc-ref %build-inputs "ncurses")
1149 "/lib"))
1150 #:phases
1151 (modify-phases %standard-phases
1152 (delete 'configure)))) ;no configure script
1153 (inputs
1154 `(("ncurses" ,ncurses)))
1155 (home-page "https://devel.ringlet.net/editors/hexer/")
1156 (synopsis "Multi buffer editor for binary files with vi-like interface")
1157 (description "Hexer is a multi-buffer editor for binary files for Unix-like
1158 systems that displays its buffer(s) as a hex dump. The user interface is kept
1159 similar to vi/ex.")
1160 (license license:bsd-3)))
1161
1162 (define-public virtaal
1163 (package
1164 (name "virtaal")
1165 (version "0.7.1")
1166 (source (origin
1167 (method url-fetch)
1168 (uri (string-append "mirror://sourceforge/translate/Virtaal/"
1169 version "/virtaal-" version ".tar.bz2"))
1170 (sha256
1171 (base32
1172 "0cyimjp3191qlmw6n0ipqdr9xr0cq4f6dqvz4rl9q31h6l3kywf9"))))
1173 (build-system python-build-system)
1174 (arguments
1175 `(#:python ,python-2
1176 #:use-setuptools? #f
1177 #:tests? #f ;; Failing tests
1178 #:phases
1179 (modify-phases %standard-phases
1180 (add-before 'build 'configure
1181 (lambda* (#:key outputs #:allow-other-keys)
1182 ;; Set data file path to absolute store path.
1183 (substitute* "virtaal/common/pan_app.py"
1184 (("file_discovery\\.get_abs_data_filename.*")
1185 (string-append "os.path.join('"
1186 (assoc-ref outputs "out")
1187 "/share', *path_parts)"))))))))
1188 (inputs
1189 `(("python2-lxml" ,python2-lxml)
1190 ("python2-pygtk" ,python2-pygtk)
1191 ("python2-simplejson" ,python2-simplejson)
1192 ("python2-translate-toolkit" ,python2-translate-toolkit)
1193 ("python2-pycurl" ,python2-pycurl)))
1194 (synopsis "Graphical translation tool")
1195 (description "Virtaal is a powerful yet simple translation tool with an
1196 uncluttered user interface. It supports a multitude of translation formats
1197 provided by the Translate Toolkit, including XLIFF and PO.")
1198 (home-page "https://virtaal.translatehouse.org/")
1199 (license license:gpl2+)))