gnu: wine: Update to 3.0.3.
[jackhill/guix/guix.git] / gnu / packages / text-editors.scm
CommitLineData
a2c1dcea
JMSG
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2016 José Miguel Sánchez García <jmi2k@openmailbox.org>
5613ea79 3;;; Copyright © 2016 Carlo Zancanaro <carlo@zancanaro.id.au>
bc111d39 4;;; Copyright © 2017, 2018 Eric Bavier <bavier@member.fsf.org>
0bf11648 5;;; Copyright © 2017 Feng Shu <tumashu@163.com>
4a78fd46 6;;; Copyright © 2017 Nils Gillmann <ng0@n0.is>
bcd757fd 7;;; Copyright © 2014 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.org>
dadc8610 8;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice <me@tobias.gr>
a2c1dcea
JMSG
9;;;
10;;; This file is part of GNU Guix.
11;;;
12;;; GNU Guix is free software; you can redistribute it and/or modify it
13;;; under the terms of the GNU General Public License as published by
14;;; the Free Software Foundation; either version 3 of the License, or (at
15;;; your option) any later version.
16;;;
17;;; GNU Guix is distributed in the hope that it will be useful, but
18;;; WITHOUT ANY WARRANTY; without even the implied warranty of
19;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20;;; GNU General Public License for more details.
21;;;
22;;; You should have received a copy of the GNU General Public License
23;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
24
25(define-module (gnu packages text-editors)
26 #:use-module (guix packages)
27 #:use-module (guix download)
5613ea79 28 #:use-module (guix git-download)
a2c1dcea
JMSG
29 #:use-module (guix utils)
30 #:use-module (guix build-system gnu)
4f038621 31 #:use-module (guix build-system glib-or-gtk)
a2c1dcea
JMSG
32 #:use-module ((guix licenses) #:prefix license:)
33 #:use-module (gnu packages)
3312fda0 34 #:use-module (gnu packages assembly)
5613ea79
CZ
35 #:use-module (gnu packages boost)
36 #:use-module (gnu packages documentation)
37 #:use-module (gnu packages gcc)
0bf11648
FS
38 #:use-module (gnu packages glib)
39 #:use-module (gnu packages gtk)
bcd757fd 40 #:use-module (gnu packages libbsd)
04918a00 41 #:use-module (gnu packages libreoffice)
a2c1dcea
JMSG
42 #:use-module (gnu packages lua)
43 #:use-module (gnu packages ncurses)
0bf11648 44 #:use-module (gnu packages pkg-config)
04918a00 45 #:use-module (gnu packages qt)
852ba10a 46 #:use-module (gnu packages regex)
5613ea79 47 #:use-module (gnu packages ruby)
264ccbb3 48 #:use-module (gnu packages terminals)
5613ea79 49 #:use-module (gnu packages xml))
a2c1dcea
JMSG
50
51(define-public vis
52 (package
53 (name "vis")
dadc8610 54 (version "0.5")
a2c1dcea
JMSG
55 (source (origin
56 (method url-fetch)
57 (uri (string-append "https://github.com/martanne/"
58 name "/archive/v" version ".tar.gz"))
59 (file-name (string-append name "-" version ".tar.gz"))
60 (sha256
852ba10a 61 (base32
dadc8610 62 "1xbxb3q963s6sav63yw0x30lm0wvxsrzb7hr6a7dh4f8r7mp1skp"))))
a2c1dcea
JMSG
63 (build-system gnu-build-system)
64 (arguments
852ba10a
TGR
65 `(#:test-target "test"
66 #:tests? #f ; no releases; snapshots are missing tests
a2c1dcea
JMSG
67 #:phases
68 (modify-phases %standard-phases
69 (add-after 'install 'wrap-binary
70 (lambda* (#:key inputs outputs #:allow-other-keys)
71 (let* ((out (assoc-ref outputs "out"))
72 (lpeg (assoc-ref inputs "lua-lpeg"))
73 (lua-version ,(version-major+minor (package-version lua)))
74 (LUA_PATH (string-append lpeg "/share/lua/"
75 lua-version "/?.lua"))
76 (LUA_CPATH (string-append lpeg "/lib/lua/"
77 lua-version "/?.so")))
78 (wrap-program (string-append out "/bin/vis")
79 `("LUA_PATH" ":" prefix (,LUA_PATH))
80 `("LUA_CPATH" ":" prefix (,LUA_CPATH)))
81 #t))))))
82 (native-search-paths
83 (list (search-path-specification
84 (variable "VIS_PATH")
85 (files '("share/vis")))))
c695fb76
TGR
86 (inputs `(("lua" ,lua)
87 ("ncurses" ,ncurses)
88 ("libtermkey" ,libtermkey)
89 ("lua-lpeg" ,lua-lpeg)
852ba10a 90 ("tre" ,tre)))
a2c1dcea
JMSG
91 (synopsis "Vim-like text editor")
92 (description
93 "Vis aims to be a modern, legacy free, simple yet efficient vim-like text
94editor. It extends vim's modal editing with built-in support for multiple
95cursors/selections and combines it with sam's structural regular expression
96based command language.")
97 (home-page "https://github.com/martanne/vis")
98 (license (list license:isc ; Main distribution.
99 license:public-domain ; map.[ch]
100 license:expat)))) ; lexers and libutf.[ch]
5613ea79
CZ
101
102(define-public kakoune
fbe8ebec
TGR
103 (package
104 (name "kakoune")
695775b1 105 (version "2018.09.04")
fbe8ebec
TGR
106 (source
107 (origin
108 (method url-fetch)
109 (uri (string-append "https://github.com/mawww/kakoune/"
110 "releases/download/v" version "/"
111 name "-" version ".tar.bz2"))
112 (sha256
113 (base32
695775b1 114 "1qbj2hmcfs6pr5lc78z9ni5zxdyp3mr64dvms4l52716ikqcjcbs"))))
fbe8ebec
TGR
115 (build-system gnu-build-system)
116 (arguments
117 `(#:make-flags
118 (list (string-append "PREFIX=" (assoc-ref %outputs "out")))
119 #:phases
120 (modify-phases %standard-phases
121 (add-after 'unpack 'patch-source
122 (lambda _
123 ;; kakoune uses confstr with _CS_PATH to find out where to find
124 ;; a posix shell, but this doesn't work in the build
125 ;; environment. This substitution just replaces that result
126 ;; with the "sh" path.
127 (substitute* "src/shell_manager.cc"
128 (("if \\(m_shell.empty\\(\\)\\)" line)
129 (string-append "m_shell = \"" (which "sh")
130 "\";\n " line)))
131 #t))
132 (delete 'configure) ; no configure script
133 ;; kakoune requires us to be in the src/ directory to build
134 (add-before 'build 'chdir
135 (lambda _ (chdir "src") #t)))))
136 (native-inputs
137 `(("asciidoc" ,asciidoc)
138 ("pkg-config" ,pkg-config)
139 ("ruby" ,ruby)))
140 (inputs
141 `(("ncurses" ,ncurses)
142 ("boost" ,boost)))
143 (synopsis "Vim-inspired code editor")
144 (description
145 "Kakoune is a code editor heavily inspired by Vim, as such most of its
5613ea79
CZ
146commands are similar to Vi's ones, and it shares Vi's \"keystrokes as a text
147editing language\" model. Kakoune has a strong focus on interactivity, most
148commands provide immediate and incremental results, while still being
149competitive (as in keystroke count) with Vim.")
27405497 150 (home-page "https://kakoune.org/")
fbe8ebec 151 (license license:unlicense)))
f255a6db
EB
152
153(define-public joe
154 (package
155 (name "joe")
bc111d39 156 (version "4.6")
f255a6db
EB
157 (source
158 (origin
159 (method url-fetch)
160 (uri (string-append "https://sourceforge.net/projects/joe-editor/"
161 "files/JOE sources/joe-" version "/"
162 "joe-" version ".tar.gz"))
163 (sha256
164 (base32
bc111d39 165 "1pmr598xxxm9j9dl93kq4dv36zyw0q2dh6d7x07hf134y9hhlnj9"))))
f255a6db
EB
166 (build-system gnu-build-system)
167 (inputs `(("ncurses" ,ncurses)))
168 (home-page "http://joe-editor.sourceforge.net/")
169 (synopsis "Console screen editor")
170 (description
7904f18a
EB
171 "JOE is a powerful console screen editor with a \"mode-less\" user
172interface similar to many user-friendly editors. JOE has some of the key
173bindings and many of the powerful features of GNU Emacs.")
f255a6db 174 (license license:gpl3+)))
0bf11648
FS
175
176(define-public leafpad
177 (package
178 (name "leafpad")
179 (version "0.8.18.1")
180 (source (origin
181 (method url-fetch)
b7fd77ef 182 (uri (string-append "mirror://savannah/"
0bf11648
FS
183 "leafpad/leafpad-" version ".tar.gz"))
184 (sha256
185 (base32
186 "0b0az2wvqgvam7w0ns1j8xp2llslm1rx6h7zcsy06a7j0yp257cm"))))
4f038621 187 (build-system glib-or-gtk-build-system)
0bf11648
FS
188 (native-inputs
189 `(("intltool" ,intltool)
190 ("pkg-config" ,pkg-config)))
191 (inputs
192 `(("gtk+" ,gtk+-2)))
dde5831c 193 (home-page "http://tarot.freeshell.org/leafpad/")
0bf11648
FS
194 (synopsis "GTK+ based text editor")
195 (description "Leafpad is a GTK+ text editor that emphasizes simplicity. As
196development focuses on keeping weight down to a minimum, only the most essential
197features are implemented in the editor. Leafpad is simple to use, is easily
198compiled, requires few libraries, and starts up quickly. ")
199 (license license:gpl2+)))
3312fda0 200
201(define-public e3
202 (package
203 (name "e3")
204 (version "2.82")
205 (source (origin
206 (method url-fetch)
207 (uri (string-append "https://sites.google.com/site/e3editor/Home/"
208 "e3-" version ".tgz"))
209 (sha256
210 (base32
211 "0919kadkas020maqq37852isnzp053q2fnws2zh3mz81d1jiviak"))
212 (modules '((guix build utils)))
213
214 ;; Remove pre-built binaries.
6cbee49d
MW
215 (snippet '(begin
216 (delete-file-recursively "bin")
217 #t))))
3312fda0 218 (build-system gnu-build-system)
219 (arguments
220 `(#:tests? #f
221 #:make-flags (list (string-append "PREFIX="
222 (assoc-ref %outputs "out")))
223 #:phases (modify-phases %standard-phases
224 (delete 'configure))))
225 (native-inputs
226 `(("nasm" ,nasm)))
227 (home-page "https://sites.google.com/site/e3editor/")
228 (synopsis "Tiny text editor written in assembly")
229 (description
230 "e3 is a micro text editor with an executable code size between 3800 and
23135000 bytes. Except for ``syntax highlighting'', the e3 binary supports all
232of the basic functions one expects plus built in arithmetic calculations.
233UTF-8 coding of unicode characters is supported as well. e3 can use
234Wordstar-, EMACS-, Pico, Nedit or vi-like key bindings. e3 can be used on
23516, 32, and 64-bit CPUs.")
236 (supported-systems '("x86_64-linux" "i686-linux"))
237 (license license:gpl2+)))
bcd757fd
LC
238
239(define-public mg
240 (package
241 (name "mg")
a4d8b386 242 (version "20180408")
bcd757fd 243 (source (origin
a4d8b386
TGR
244 (method git-fetch)
245 (uri (git-reference
246 (url "https://github.com/hboetes/mg")
247 (commit version)))
248 (file-name (git-file-name name version))
bcd757fd
LC
249 (sha256
250 (base32
a4d8b386 251 "06w86xk7sjl2x2h3z6msn8kpmwj05qdimcym77wzhz5s94dzh1bl"))
bcd757fd 252 (modules '((guix build utils)))
6cbee49d
MW
253 (snippet '(begin
254 (substitute* "GNUmakefile"
255 (("/usr/bin/") ""))
256 #t))))
bcd757fd
LC
257 (build-system gnu-build-system)
258 (native-inputs
259 `(("pkg-config" ,pkg-config)))
260 (inputs
261 `(("libbsd" ,libbsd)
262 ("ncurses" ,ncurses)))
263 (arguments
264 ;; No test suite available.
265 '(#:tests? #f
266 #:make-flags (list (string-append "prefix=" %output)
bcd757fd
LC
267 "CC=gcc")
268 #:phases (modify-phases %standard-phases
a4d8b386 269 (delete 'configure) ; no configure script
217ce570 270 (add-before 'build 'correct-location-of-difftool
271 (lambda _
272 (substitute* "buffer.c"
273 (("/usr/bin/diff")
274 (which "diff")))
275 #t))
bcd757fd
LC
276 (add-before 'install 'patch-tutorial-location
277 (lambda* (#:key outputs #:allow-other-keys)
278 (substitute* "mg.1"
279 (("/usr") (assoc-ref outputs "out")))
280 #t))
281 (add-after 'install 'install-tutorial
282 (lambda* (#:key outputs #:allow-other-keys)
283 (let* ((out (assoc-ref outputs "out"))
284 (doc (string-append out "/share/doc/mg")))
285 (install-file "tutorial" doc)
286 #t))))))
c3d82885 287 (home-page "https://homepage.boetes.org/software/mg/")
bcd757fd
LC
288 (synopsis "Microscopic GNU Emacs clone")
289 (description
290 "Mg (mg) is a GNU Emacs style editor, with which it is \"broadly\"
291compatible. This is a portable version of the mg maintained by the OpenBSD
292team.")
293 (license license:public-domain)))
04918a00
EB
294
295(define-public ghostwriter
296 (package
297 (name "ghostwriter")
d2caedf0 298 (version "1.6.2")
04918a00
EB
299 (source (origin
300 (method git-fetch)
301 (uri (git-reference
302 (url "https://github.com/wereturtle/ghostwriter.git")
303 (commit (string-append "v" version))))
304 (file-name (git-file-name name version))
305 (sha256
306 (base32
d2caedf0 307 "0251563zy0q69fzfacvalpx43y15cshb0bhshyd4w37061gh1c12"))))
04918a00
EB
308 (build-system gnu-build-system)
309 (native-inputs
310 `(("pkg-config" ,pkg-config)
311 ("qttools" ,qttools))) ;for lrelease
312 (inputs
313 `(("hunspell" ,hunspell)
314 ("qtbase" ,qtbase)
315 ("qtmultimedia" ,qtmultimedia)
316 ("qtsvg" ,qtsvg)
317 ("qtwebkit" ,qtwebkit)))
318 (arguments
319 `(#:phases
320 (modify-phases %standard-phases
321 (replace 'configure
322 (lambda* (#:key outputs #:allow-other-keys)
323 (let ((out (assoc-ref outputs "out")))
324 (invoke "qmake" (string-append "PREFIX=" out)))))
325 (add-after 'configure 'create-translations
326 (lambda _
327 ;; `lrelease` will not overwrite, so delete existing .qm files
328 (for-each delete-file (find-files "translations" ".*\\.qm"))
329 (apply invoke "lrelease" (find-files "translations" ".*\\.ts"))))
330 ;; Ensure that icons are found at runtime.
331 (add-after 'install 'wrap-executable
332 (lambda* (#:key inputs outputs #:allow-other-keys)
333 (let ((out (assoc-ref outputs "out")))
334 (wrap-program (string-append out "/bin/ghostwriter")
335 `("QT_PLUGIN_PATH" ":" prefix
336 ,(map (lambda (label)
337 (string-append (assoc-ref inputs label)
338 "/lib/qt5/plugins/"))
339 '("qtsvg" "qtmultimedia"))))))))))
340 (home-page "https://wereturtle.github.io/ghostwriter/")
341 (synopsis "Write without distractions")
342 (description
343 "@code{ghostwriter} provides a relaxing, distraction-free writing
344environment with Markdown markup.")
345 (license license:gpl3+))) ;icons/* under CC-BY-SA3