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