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