gnu: moka-icon-theme: Add faba-icon-theme as propagated input.
[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>
7904f18a 4;;; Copyright © 2017 Eric Bavier <bavier@member.fsf.org>
0bf11648 5;;; Copyright © 2017 Feng Shu <tumashu@163.com>
1a5a8afe 6;;; Copyright © 2017 ng0 <ng0@infotropique.org>
bcd757fd 7;;; Copyright © 2014 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.org>
a2c1dcea
JMSG
8;;;
9;;; This file is part of GNU Guix.
10;;;
11;;; GNU Guix is free software; you can redistribute it and/or modify it
12;;; under the terms of the GNU General Public License as published by
13;;; the Free Software Foundation; either version 3 of the License, or (at
14;;; your option) any later version.
15;;;
16;;; GNU Guix is distributed in the hope that it will be useful, but
17;;; WITHOUT ANY WARRANTY; without even the implied warranty of
18;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19;;; GNU General Public License for more details.
20;;;
21;;; You should have received a copy of the GNU General Public License
22;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
23
24(define-module (gnu packages text-editors)
25 #:use-module (guix packages)
26 #:use-module (guix download)
5613ea79 27 #:use-module (guix git-download)
a2c1dcea
JMSG
28 #:use-module (guix utils)
29 #:use-module (guix build-system gnu)
4f038621 30 #:use-module (guix build-system glib-or-gtk)
a2c1dcea
JMSG
31 #:use-module ((guix licenses) #:prefix license:)
32 #:use-module (gnu packages)
3312fda0 33 #:use-module (gnu packages assembly)
5613ea79
CZ
34 #:use-module (gnu packages boost)
35 #:use-module (gnu packages documentation)
36 #:use-module (gnu packages gcc)
0bf11648
FS
37 #:use-module (gnu packages glib)
38 #:use-module (gnu packages gtk)
bcd757fd 39 #:use-module (gnu packages libbsd)
a2c1dcea
JMSG
40 #:use-module (gnu packages lua)
41 #:use-module (gnu packages ncurses)
0bf11648 42 #:use-module (gnu packages pkg-config)
5613ea79 43 #:use-module (gnu packages ruby)
264ccbb3 44 #:use-module (gnu packages terminals)
5613ea79 45 #:use-module (gnu packages xml))
a2c1dcea
JMSG
46
47(define-public vis
48 (package
49 (name "vis")
7eaa8cf2 50 (version "0.3")
a2c1dcea
JMSG
51 (source (origin
52 (method url-fetch)
53 (uri (string-append "https://github.com/martanne/"
54 name "/archive/v" version ".tar.gz"))
55 (file-name (string-append name "-" version ".tar.gz"))
56 (sha256
7eaa8cf2 57 (base32 "0xvhkj4j8pcmpnsx7f93d6n2f068xnl7wacfs97vr0agxwrfvn5y"))))
a2c1dcea
JMSG
58 (build-system gnu-build-system)
59 (arguments
7eaa8cf2 60 `(#:tests? #f ; No tests.
a2c1dcea
JMSG
61 #:phases
62 (modify-phases %standard-phases
63 (add-after 'install 'wrap-binary
64 (lambda* (#:key inputs outputs #:allow-other-keys)
65 (let* ((out (assoc-ref outputs "out"))
66 (lpeg (assoc-ref inputs "lua-lpeg"))
67 (lua-version ,(version-major+minor (package-version lua)))
68 (LUA_PATH (string-append lpeg "/share/lua/"
69 lua-version "/?.lua"))
70 (LUA_CPATH (string-append lpeg "/lib/lua/"
71 lua-version "/?.so")))
72 (wrap-program (string-append out "/bin/vis")
73 `("LUA_PATH" ":" prefix (,LUA_PATH))
74 `("LUA_CPATH" ":" prefix (,LUA_CPATH)))
75 #t))))))
76 (native-search-paths
77 (list (search-path-specification
78 (variable "VIS_PATH")
79 (files '("share/vis")))))
80 (inputs `(("lua", lua)
81 ("ncurses", ncurses)
82 ("libtermkey", libtermkey)
83 ("lua-lpeg", lua-lpeg)))
84 (synopsis "Vim-like text editor")
85 (description
86 "Vis aims to be a modern, legacy free, simple yet efficient vim-like text
87editor. It extends vim's modal editing with built-in support for multiple
88cursors/selections and combines it with sam's structural regular expression
89based command language.")
90 (home-page "https://github.com/martanne/vis")
91 (license (list license:isc ; Main distribution.
92 license:public-domain ; map.[ch]
93 license:expat)))) ; lexers and libutf.[ch]
5613ea79
CZ
94
95(define-public kakoune
96 (let ((commit "125c8b7e80995732e0d8c87b82040025748f1b4f")
97 (revision "1"))
98 (package
99 (name "kakoune")
100 (version (string-append "0.0.0-" revision "." (string-take commit 7)))
101 (source
102 (origin
103 (file-name (string-append "kakoune-" version "-checkout"))
104 (method git-fetch)
105 (uri (git-reference
106 (url "https://github.com/mawww/kakoune.git")
107 (commit commit)))
108 (sha256
109 (base32
c7f7a5ba 110 "19qs99l8r9p1vi5pxxx9an22fvi7xx40qw3jh2cnh2mbacawvdyb"))))
5613ea79
CZ
111 (build-system gnu-build-system)
112 (arguments
c7f7a5ba 113 `(#:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out")))
5613ea79
CZ
114 #:phases
115 (modify-phases %standard-phases
116 (add-after 'unpack 'patch-source
117 (lambda _
118 ;; kakoune uses confstr with _CS_PATH to find out where to find
119 ;; a posix shell, but this doesn't work in the build
120 ;; environment. This substitution just replaces that result
121 ;; with the "sh" path.
122 (substitute* "src/shell_manager.cc"
123 (("if \\(m_shell.empty\\(\\)\\)" line)
124 (string-append "m_shell = \"" (which "sh")
125 "\";\n " line)))
5613ea79
CZ
126 #t))
127 (delete 'configure)
128 ;; kakoune requires us to be in the src/ directory to build
129 (add-before 'build 'chdir
130 (lambda _ (chdir "src") #t))
131 (add-before 'check 'fix-test-permissions
132 (lambda _
133 ;; Out git downloader doesn't give us write permissions, but
134 ;; without them the tests fail.
135 (zero? (system* "chmod" "-R" "u+w" "../test")))))))
c7f7a5ba 136 (native-inputs `(("asciidoc" ,asciidoc)
5613ea79 137 ("ruby" ,ruby)))
c7f7a5ba 138 (inputs `(("ncurses" ,ncurses)
5613ea79
CZ
139 ("boost" ,boost)))
140 (synopsis "Vim-inspired code editor")
141 (description
142 "Kakoune is a code editor heavily inspired by Vim, as such most of its
143commands are similar to Vi's ones, and it shares Vi's \"keystrokes as a text
144editing language\" model. Kakoune has a strong focus on interactivity, most
145commands provide immediate and incremental results, while still being
146competitive (as in keystroke count) with Vim.")
147 (home-page "http://kakoune.org/")
148 (license license:unlicense))))
f255a6db
EB
149
150(define-public joe
151 (package
152 (name "joe")
153 (version "4.4")
154 (source
155 (origin
156 (method url-fetch)
157 (uri (string-append "https://sourceforge.net/projects/joe-editor/"
158 "files/JOE sources/joe-" version "/"
159 "joe-" version ".tar.gz"))
160 (sha256
161 (base32
162 "0y898r1xlrv75m00y598rvwwsricabplyh80wawsqafapcl4hw55"))))
163 (build-system gnu-build-system)
164 (inputs `(("ncurses" ,ncurses)))
165 (home-page "http://joe-editor.sourceforge.net/")
166 (synopsis "Console screen editor")
167 (description
7904f18a
EB
168 "JOE is a powerful console screen editor with a \"mode-less\" user
169interface similar to many user-friendly editors. JOE has some of the key
170bindings and many of the powerful features of GNU Emacs.")
f255a6db 171 (license license:gpl3+)))
0bf11648
FS
172
173(define-public leafpad
174 (package
175 (name "leafpad")
176 (version "0.8.18.1")
177 (source (origin
178 (method url-fetch)
179 (uri (string-append "https://download.savannah.gnu.org/releases/"
180 "leafpad/leafpad-" version ".tar.gz"))
181 (sha256
182 (base32
183 "0b0az2wvqgvam7w0ns1j8xp2llslm1rx6h7zcsy06a7j0yp257cm"))))
4f038621 184 (build-system glib-or-gtk-build-system)
0bf11648
FS
185 (native-inputs
186 `(("intltool" ,intltool)
187 ("pkg-config" ,pkg-config)))
188 (inputs
189 `(("gtk+" ,gtk+-2)))
dde5831c 190 (home-page "http://tarot.freeshell.org/leafpad/")
0bf11648
FS
191 (synopsis "GTK+ based text editor")
192 (description "Leafpad is a GTK+ text editor that emphasizes simplicity. As
193development focuses on keeping weight down to a minimum, only the most essential
194features are implemented in the editor. Leafpad is simple to use, is easily
195compiled, requires few libraries, and starts up quickly. ")
196 (license license:gpl2+)))
3312fda0 197
198(define-public e3
199 (package
200 (name "e3")
201 (version "2.82")
202 (source (origin
203 (method url-fetch)
204 (uri (string-append "https://sites.google.com/site/e3editor/Home/"
205 "e3-" version ".tgz"))
206 (sha256
207 (base32
208 "0919kadkas020maqq37852isnzp053q2fnws2zh3mz81d1jiviak"))
209 (modules '((guix build utils)))
210
211 ;; Remove pre-built binaries.
212 (snippet '(delete-file-recursively "bin"))))
213 (build-system gnu-build-system)
214 (arguments
215 `(#:tests? #f
216 #:make-flags (list (string-append "PREFIX="
217 (assoc-ref %outputs "out")))
218 #:phases (modify-phases %standard-phases
219 (delete 'configure))))
220 (native-inputs
221 `(("nasm" ,nasm)))
222 (home-page "https://sites.google.com/site/e3editor/")
223 (synopsis "Tiny text editor written in assembly")
224 (description
225 "e3 is a micro text editor with an executable code size between 3800 and
22635000 bytes. Except for ``syntax highlighting'', the e3 binary supports all
227of the basic functions one expects plus built in arithmetic calculations.
228UTF-8 coding of unicode characters is supported as well. e3 can use
229Wordstar-, EMACS-, Pico, Nedit or vi-like key bindings. e3 can be used on
23016, 32, and 64-bit CPUs.")
231 (supported-systems '("x86_64-linux" "i686-linux"))
232 (license license:gpl2+)))
bcd757fd
LC
233
234(define-public mg
235 (package
236 (name "mg")
1a5a8afe 237 (version "20170401")
bcd757fd
LC
238 (source (origin
239 (method url-fetch)
bcd1544d 240 (uri (string-append "https://homepage.boetes.org/software/mg/mg-"
bcd757fd
LC
241 version ".tar.gz"))
242 (sha256
243 (base32
1a5a8afe 244 "1arasswgdadbb265rahq3867r9s54jva6k4m3p5n0f8mgjqhhdha"))
bcd757fd
LC
245 (modules '((guix build utils)))
246 (snippet
247 '(begin
248 (substitute* "GNUmakefile"
249 (("/usr/bin/") ""))))))
250 (build-system gnu-build-system)
251 (native-inputs
252 `(("pkg-config" ,pkg-config)))
253 (inputs
254 `(("libbsd" ,libbsd)
255 ("ncurses" ,ncurses)))
256 (arguments
257 ;; No test suite available.
258 '(#:tests? #f
259 #:make-flags (list (string-append "prefix=" %output)
260 "CURSES_LIBS=-lncurses"
261 "CC=gcc")
262 #:phases (modify-phases %standard-phases
263 (delete 'configure)
217ce570 264 (add-before 'build 'correct-location-of-difftool
265 (lambda _
266 (substitute* "buffer.c"
267 (("/usr/bin/diff")
268 (which "diff")))
269 #t))
bcd757fd
LC
270 (add-before 'install 'patch-tutorial-location
271 (lambda* (#:key outputs #:allow-other-keys)
272 (substitute* "mg.1"
273 (("/usr") (assoc-ref outputs "out")))
274 #t))
275 (add-after 'install 'install-tutorial
276 (lambda* (#:key outputs #:allow-other-keys)
277 (let* ((out (assoc-ref outputs "out"))
278 (doc (string-append out "/share/doc/mg")))
279 (install-file "tutorial" doc)
280 #t))))))
281 (home-page "http://homepage.boetes.org/software/mg/")
282 (synopsis "Microscopic GNU Emacs clone")
283 (description
284 "Mg (mg) is a GNU Emacs style editor, with which it is \"broadly\"
285compatible. This is a portable version of the mg maintained by the OpenBSD
286team.")
287 (license license:public-domain)))