Commit | Line | Data |
---|---|---|
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> |
89d3869b | 4 | ;;; Copyright © 2017, 2018, 2020 Eric Bavier <bavier@posteo.net> |
0bf11648 | 5 | ;;; Copyright © 2017 Feng Shu <tumashu@163.com> |
3c986a7d | 6 | ;;; Copyright © 2017 Nikita <nikita@n0.is> |
bcd757fd | 7 | ;;; Copyright © 2014 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.org> |
f5c9e76f | 8 | ;;; Copyright © 2017–2021 Tobias Geerinckx-Rice <me@tobias.gr> |
2238211a | 9 | ;;; Copyright © 2019 Efraim Flashner <efraim@flashner.co.il> |
75a137da | 10 | ;;; Copyright © 2019 Andreas Enge <andreas@enge.fr> |
c207a8ac | 11 | ;;; Copyright © 2019, 2020, 2021 Nicolas Goaziou <mail@nicolasgoaziou.fr> |
28264388 | 12 | ;;; Copyright © 2020 Marius Bakke <mbakke@fastmail.com> |
8b95f741 | 13 | ;;; Copyright © 2020 Tom Zander <tomz@freedommail.ch> |
e530fb41 | 14 | ;;; Copyright © 2020 Mark Meyer <mark@ofosos.org> |
d5909136 | 15 | ;;; Copyright © 2020 Maxime Devos <maximedevos@telenet.be> |
fce47b75 | 16 | ;;; Copyright © 2021 aecepoglu <aecepoglu@fastmail.fm> |
b1372ad8 | 17 | ;;; Copyright © 2021 Leo Famulari <leo@famulari.name> |
681a0c75 | 18 | ;;; Copyright © 2021 Pierre Langlois <pierre.langlois@gmx.com> |
9af83d1c | 19 | ;;; Copyright © 2021 Calum Irwin <calumirwin1@gmail.com> |
a2c1dcea JMSG |
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) | |
5613ea79 | 39 | #:use-module (guix git-download) |
a2c1dcea | 40 | #:use-module (guix utils) |
fce47b75 | 41 | #:use-module (guix build-system cargo) |
28264388 | 42 | #:use-module (guix build-system cmake) |
a2c1dcea | 43 | #:use-module (guix build-system gnu) |
4f038621 | 44 | #:use-module (guix build-system glib-or-gtk) |
1fffba66 | 45 | #:use-module (guix build-system python) |
a2c1dcea JMSG |
46 | #:use-module ((guix licenses) #:prefix license:) |
47 | #:use-module (gnu packages) | |
28264388 | 48 | #:use-module (gnu packages aspell) |
3312fda0 | 49 | #:use-module (gnu packages assembly) |
2363ed01 | 50 | #:use-module (gnu packages autotools) |
7f2b9306 | 51 | #:use-module (gnu packages base) |
5613ea79 | 52 | #:use-module (gnu packages boost) |
ef64f9ca | 53 | #:use-module (gnu packages code) |
fce47b75 | 54 | #:use-module (gnu packages crates-io) |
5613ea79 | 55 | #:use-module (gnu packages documentation) |
75a137da | 56 | #:use-module (gnu packages fontutils) |
eaf5df6b | 57 | #:use-module (gnu packages freedesktop) |
5613ea79 | 58 | #:use-module (gnu packages gcc) |
2207d522 | 59 | #:use-module (gnu packages gettext) |
0bf11648 FS |
60 | #:use-module (gnu packages glib) |
61 | #:use-module (gnu packages gtk) | |
75a137da | 62 | #:use-module (gnu packages guile) |
1fffba66 | 63 | #:use-module (gnu packages haskell-xyz) |
bcd757fd | 64 | #:use-module (gnu packages libbsd) |
04918a00 | 65 | #:use-module (gnu packages libreoffice) |
28264388 | 66 | #:use-module (gnu packages llvm) |
a2c1dcea JMSG |
67 | #:use-module (gnu packages lua) |
68 | #:use-module (gnu packages ncurses) | |
2238211a | 69 | #:use-module (gnu packages pcre) |
75a137da | 70 | #:use-module (gnu packages perl) |
0bf11648 | 71 | #:use-module (gnu packages pkg-config) |
75a137da | 72 | #:use-module (gnu packages python) |
e530fb41 | 73 | #:use-module (gnu packages python-web) |
2363ed01 | 74 | #:use-module (gnu packages python-xyz) |
04918a00 | 75 | #:use-module (gnu packages qt) |
852ba10a | 76 | #:use-module (gnu packages regex) |
5613ea79 | 77 | #:use-module (gnu packages ruby) |
264ccbb3 | 78 | #:use-module (gnu packages terminals) |
a78364e9 | 79 | #:use-module (gnu packages texinfo) |
28264388 | 80 | #:use-module (gnu packages version-control) |
fb85b967 NG |
81 | #:use-module (gnu packages xml) |
82 | #:use-module (gnu packages xorg)) | |
a2c1dcea JMSG |
83 | |
84 | (define-public vis | |
85 | (package | |
86 | (name "vis") | |
b6f0c992 | 87 | (version "0.7") ; also update the vis-test input |
d198eca0 TGR |
88 | (source |
89 | (origin | |
90 | (method git-fetch) | |
91 | (uri (git-reference | |
b6f0c992 | 92 | (url "https://git.sr.ht/~martanne/vis") |
d198eca0 TGR |
93 | (commit (string-append "v" version)))) |
94 | (sha256 | |
b6f0c992 | 95 | (base32 "1g05ncsnk57kcqm9wsv6sz8b24kyzj8r5rfpa1wfwj8qkjzx3vji")) |
d198eca0 | 96 | (file-name (git-file-name name version)))) |
a2c1dcea JMSG |
97 | (build-system gnu-build-system) |
98 | (arguments | |
852ba10a | 99 | `(#:test-target "test" |
a2c1dcea JMSG |
100 | #:phases |
101 | (modify-phases %standard-phases | |
37e64053 TGR |
102 | (add-after 'unpack 'unpack-test-suite |
103 | (lambda* (#:key inputs #:allow-other-keys) | |
104 | (let ((vis-test (assoc-ref inputs "vis-test"))) | |
105 | (copy-recursively vis-test "test") | |
106 | #t))) | |
107 | (delete 'check) ; the tests need a wrapped vis | |
a2c1dcea JMSG |
108 | (add-after 'install 'wrap-binary |
109 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
110 | (let* ((out (assoc-ref outputs "out")) | |
111 | (lpeg (assoc-ref inputs "lua-lpeg")) | |
112 | (lua-version ,(version-major+minor (package-version lua))) | |
113 | (LUA_PATH (string-append lpeg "/share/lua/" | |
114 | lua-version "/?.lua")) | |
115 | (LUA_CPATH (string-append lpeg "/lib/lua/" | |
116 | lua-version "/?.so"))) | |
117 | (wrap-program (string-append out "/bin/vis") | |
118 | `("LUA_PATH" ":" prefix (,LUA_PATH)) | |
119 | `("LUA_CPATH" ":" prefix (,LUA_CPATH))) | |
37e64053 TGR |
120 | #t))) |
121 | (add-after 'wrap-binary 'check | |
122 | (assoc-ref %standard-phases 'check)) | |
123 | (add-before 'check 'set-up-tests | |
124 | (lambda* (#:key outputs #:allow-other-keys) | |
125 | (let ((out (assoc-ref outputs "out"))) | |
126 | ;; DEFAULT_COMPILER is hard-coded here. | |
127 | (substitute* "test/core/ccan-config.c" | |
128 | (("\"cc\"") | |
129 | (format #f "\"~a\"" ,(cc-for-target)))) | |
130 | ||
131 | ;; Use the ‘vis’ executable that we wrapped above. | |
132 | (install-file (string-append out "/bin/vis") ".") | |
133 | ||
134 | ;; XXX Delete 2 failing tests. TODO: make them not fail. :-) | |
135 | (for-each delete-file | |
136 | (find-files "test/vis/selections" "^complement")) | |
a2c1dcea | 137 | #t)))))) |
37e64053 TGR |
138 | (native-inputs |
139 | `(("vis-test" | |
140 | ,(origin | |
141 | (method git-fetch) | |
142 | (uri (git-reference | |
b6f0c992 | 143 | (url "https://git.sr.ht/~martanne/vis-test") |
144 | (commit "bbd2f34ff788e87a51a74069069273ad83c44f1f"))) | |
37e64053 | 145 | (sha256 |
b6f0c992 | 146 | (base32 "1jsvg2lg3xqfgi79x08kx94mc34mh62ivca10vsci6fqsk68jbd0")) |
37e64053 | 147 | (file-name (git-file-name "vis-test" version)))))) |
c695fb76 TGR |
148 | (inputs `(("lua" ,lua) |
149 | ("ncurses" ,ncurses) | |
150 | ("libtermkey" ,libtermkey) | |
151 | ("lua-lpeg" ,lua-lpeg) | |
852ba10a | 152 | ("tre" ,tre))) |
a2c1dcea JMSG |
153 | (synopsis "Vim-like text editor") |
154 | (description | |
155 | "Vis aims to be a modern, legacy free, simple yet efficient vim-like text | |
156 | editor. It extends vim's modal editing with built-in support for multiple | |
157 | cursors/selections and combines it with sam's structural regular expression | |
158 | based command language.") | |
159 | (home-page "https://github.com/martanne/vis") | |
160 | (license (list license:isc ; Main distribution. | |
161 | license:public-domain ; map.[ch] | |
162 | license:expat)))) ; lexers and libutf.[ch] | |
5613ea79 CZ |
163 | |
164 | (define-public kakoune | |
fbe8ebec TGR |
165 | (package |
166 | (name "kakoune") | |
9af83d1c | 167 | (version "2021.08.28") |
fbe8ebec TGR |
168 | (source |
169 | (origin | |
170 | (method url-fetch) | |
171 | (uri (string-append "https://github.com/mawww/kakoune/" | |
172 | "releases/download/v" version "/" | |
a1cb6928 | 173 | "kakoune-" version ".tar.bz2")) |
fbe8ebec | 174 | (sha256 |
9af83d1c | 175 | (base32 "1jvn4b9rma5jjvg3xz8nf224pbq3ry570j6qvc834wn5v3gxfvkg")))) |
fbe8ebec TGR |
176 | (build-system gnu-build-system) |
177 | (arguments | |
178 | `(#:make-flags | |
179 | (list (string-append "PREFIX=" (assoc-ref %outputs "out"))) | |
180 | #:phases | |
181 | (modify-phases %standard-phases | |
182 | (add-after 'unpack 'patch-source | |
183 | (lambda _ | |
184 | ;; kakoune uses confstr with _CS_PATH to find out where to find | |
185 | ;; a posix shell, but this doesn't work in the build | |
186 | ;; environment. This substitution just replaces that result | |
187 | ;; with the "sh" path. | |
188 | (substitute* "src/shell_manager.cc" | |
189 | (("if \\(m_shell.empty\\(\\)\\)" line) | |
190 | (string-append "m_shell = \"" (which "sh") | |
191 | "\";\n " line))) | |
192 | #t)) | |
193 | (delete 'configure) ; no configure script | |
1c63b397 | 194 | ;; kakoune requires us to be in the src/ directory to build. |
fbe8ebec TGR |
195 | (add-before 'build 'chdir |
196 | (lambda _ (chdir "src") #t))))) | |
197 | (native-inputs | |
9af83d1c | 198 | `(("gcc", gcc-10) ; See https://github.com/mawww/kakoune/issues/4318 |
199 | ("asciidoc" ,asciidoc) | |
fbe8ebec TGR |
200 | ("pkg-config" ,pkg-config) |
201 | ("ruby" ,ruby))) | |
fbe8ebec TGR |
202 | (synopsis "Vim-inspired code editor") |
203 | (description | |
204 | "Kakoune is a code editor heavily inspired by Vim, as such most of its | |
5613ea79 CZ |
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.") | |
27405497 | 209 | (home-page "https://kakoune.org/") |
fbe8ebec | 210 | (license license:unlicense))) |
f255a6db | 211 | |
fce47b75 | 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 | ||
5c3489a3 | 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") | |
7092ca77 | 283 | (synopsis "Infer parentheses for Clojure, Lisp and Scheme") |
5c3489a3 | 284 | (description |
285 | "Parinfer is a plugin for Kakoune, Vim, Neovim and Emacs that infers | |
7092ca77 | 286 | parentheses and indentation. This library can be called from other editors that |
5c3489a3 | 287 | can load dynamic libraries.") |
288 | (license license:expat))) | |
289 | ||
f255a6db EB |
290 | (define-public joe |
291 | (package | |
292 | (name "joe") | |
bc111d39 | 293 | (version "4.6") |
f255a6db EB |
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 | |
bc111d39 | 302 | "1pmr598xxxm9j9dl93kq4dv36zyw0q2dh6d7x07hf134y9hhlnj9")))) |
f255a6db EB |
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 | |
7904f18a EB |
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.") | |
f255a6db | 311 | (license license:gpl3+))) |
0bf11648 | 312 | |
28264388 MB |
313 | (define-public jucipp |
314 | (package | |
315 | (name "jucipp") | |
5a29639c | 316 | (version "1.6.3") |
28264388 MB |
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 | |
5a29639c | 328 | (base32 "1gy2xb5rm7q4zx9rl23h96b1i46fz27v25nklj50fvqp8ax2gxqy")))) |
28264388 MB |
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 | ||
28264388 MB |
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 " &"))) | |
7e9544c3 MB |
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)))))) | |
28264388 MB |
389 | (native-inputs |
390 | `(("pkg-config" ,pkg-config) | |
391 | ("xorg-server" ,xorg-server-for-tests))) | |
392 | (inputs | |
393 | `(("aspell" ,aspell) | |
394 | ("boost" ,boost) | |
ef64f9ca | 395 | ("ctags" ,universal-ctags) |
28264388 MB |
396 | ("gtkmm" ,gtkmm) |
397 | ("gtksourceviewmm" ,gtksourceviewmm) | |
0dd7f868 | 398 | ("libclang" ,clang-11) ;XXX: must be the same version as Mesas LLVM |
28264388 MB |
399 | ("libgit2" ,libgit2))) |
400 | (synopsis "Lightweight C++ IDE") | |
401 | (description | |
78d1f6dc | 402 | "juCi++ is a small @acronym{IDE, Integrated Development Environment} |
28264388 MB |
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 | ||
0bf11648 FS |
411 | (define-public leafpad |
412 | (package | |
413 | (name "leafpad") | |
414 | (version "0.8.18.1") | |
415 | (source (origin | |
416 | (method url-fetch) | |
b7fd77ef | 417 | (uri (string-append "mirror://savannah/" |
0bf11648 FS |
418 | "leafpad/leafpad-" version ".tar.gz")) |
419 | (sha256 | |
420 | (base32 | |
421 | "0b0az2wvqgvam7w0ns1j8xp2llslm1rx6h7zcsy06a7j0yp257cm")))) | |
4f038621 | 422 | (build-system glib-or-gtk-build-system) |
0bf11648 FS |
423 | (native-inputs |
424 | `(("intltool" ,intltool) | |
425 | ("pkg-config" ,pkg-config))) | |
426 | (inputs | |
427 | `(("gtk+" ,gtk+-2))) | |
dde5831c | 428 | (home-page "http://tarot.freeshell.org/leafpad/") |
0bf11648 FS |
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+))) | |
3312fda0 | 435 | |
b1372ad8 LF |
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 | ||
3312fda0 | 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. | |
6cbee49d MW |
482 | (snippet '(begin |
483 | (delete-file-recursively "bin") | |
484 | #t)))) | |
3312fda0 | 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+))) | |
bcd757fd LC |
505 | |
506 | (define-public mg | |
507 | (package | |
508 | (name "mg") | |
3e5e10d5 | 509 | (version "20210609") |
bcd757fd | 510 | (source (origin |
a4d8b386 TGR |
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)) | |
bcd757fd LC |
516 | (sha256 |
517 | (base32 | |
3e5e10d5 | 518 | "04c2vqxg31mk15cfrhzrivykis8fmf0m1d8h1qdjdmlfxd4qwaqf")) |
bcd757fd | 519 | (modules '((guix build utils))) |
6cbee49d MW |
520 | (snippet '(begin |
521 | (substitute* "GNUmakefile" | |
3e5e10d5 | 522 | (("/usr/bin/") "")))))) |
bcd757fd LC |
523 | (build-system gnu-build-system) |
524 | (native-inputs | |
525 | `(("pkg-config" ,pkg-config))) | |
526 | (inputs | |
7f2b9306 TGR |
527 | `(("diffutils" ,diffutils) |
528 | ("libbsd" ,libbsd) | |
bcd757fd LC |
529 | ("ncurses" ,ncurses))) |
530 | (arguments | |
531 | ;; No test suite available. | |
681a0c75 | 532 | `(#:tests? #f |
bcd757fd | 533 | #:make-flags (list (string-append "prefix=" %output) |
5d2e3b6b TGR |
534 | (string-append "CC=" ,(cc-for-target)) |
535 | (string-append "PKG_CONFIG=" ,(pkg-config-for-target))) | |
bcd757fd | 536 | #:phases (modify-phases %standard-phases |
a4d8b386 | 537 | (delete 'configure) ; no configure script |
7f2b9306 TGR |
538 | (add-before 'build 'correct-location-of-diff |
539 | (lambda* (#:key inputs #:allow-other-keys) | |
217ce570 | 540 | (substitute* "buffer.c" |
541 | (("/usr/bin/diff") | |
7f2b9306 TGR |
542 | (string-append (assoc-ref inputs "diffutils") |
543 | "/bin/diff"))))) | |
bcd757fd LC |
544 | (add-before 'install 'patch-tutorial-location |
545 | (lambda* (#:key outputs #:allow-other-keys) | |
546 | (substitute* "mg.1" | |
681a0c75 | 547 | (("/usr") (assoc-ref outputs "out"))))) |
bcd757fd LC |
548 | (add-after 'install 'install-tutorial |
549 | (lambda* (#:key outputs #:allow-other-keys) | |
550 | (let* ((out (assoc-ref outputs "out")) | |
551 | (doc (string-append out "/share/doc/mg"))) | |
681a0c75 | 552 | (install-file "tutorial" doc))))))) |
c3d82885 | 553 | (home-page "https://homepage.boetes.org/software/mg/") |
bcd757fd LC |
554 | (synopsis "Microscopic GNU Emacs clone") |
555 | (description | |
16fcca64 TGR |
556 | "Mg (@command{mg}) is a GNU Emacs style editor, with which it is |
557 | \"broadly\" compatible. This is a portable version of the mg maintained by the | |
558 | OpenBSD team.") | |
bcd757fd | 559 | (license license:public-domain))) |
04918a00 | 560 | |
3fad9a69 NG |
561 | (define-public qemacs |
562 | (package | |
563 | (name "qemacs") | |
564 | (version "0.3.3") | |
565 | (source | |
566 | (origin | |
567 | (method url-fetch) | |
568 | (uri (string-append "https://bellard.org/qemacs/" | |
569 | "qemacs-" version ".tar.gz")) | |
570 | (sha256 | |
571 | (base32 "156z4wpj49i6j388yjird5qvrph7hz0grb4r44l4jf3q8imadyrg")))) | |
572 | (build-system gnu-build-system) | |
573 | (arguments | |
574 | `(#:tests? #f ;no test | |
575 | #:phases | |
576 | (modify-phases %standard-phases | |
577 | (add-before 'build 'build-qhtml | |
578 | ;; Build fails without first creating qHTML library. | |
579 | (lambda _ (invoke "make" "-C" "libqhtml"))) | |
580 | (add-before 'install 'fix-man-pages-directory | |
581 | ;; Install in $out/share/man instead of $out/man. | |
582 | (lambda _ | |
583 | (substitute* "Makefile" | |
584 | (("/man/man1" all) (string-append "/share" all))) | |
585 | #t)) | |
586 | (add-before 'install 'create-directories | |
587 | ;; Ensure directories exist before installing files. | |
588 | (lambda* (#:key outputs #:allow-other-keys) | |
589 | (let ((out (assoc-ref outputs "out"))) | |
590 | (for-each (lambda (d) (mkdir-p (string-append out d))) | |
591 | '("/bin" "/share/man/man1" "/share/qe")) | |
592 | #t))) | |
593 | (add-after 'install 'install-extra-documentation | |
594 | ;; Install sample configuration file, Info, and HTML manual. | |
156b8f9c | 595 | (lambda* (#:key native-inputs inputs outputs #:allow-other-keys) |
3fad9a69 NG |
596 | (let* ((share (string-append (assoc-ref outputs "out") "/share")) |
597 | (doc (string-append share "/doc/" ,name "-" ,version)) | |
598 | (html (string-append share "/html")) | |
599 | (info (string-append share "/info")) | |
156b8f9c MD |
600 | (makeinfo (string-append |
601 | (assoc-ref (or native-inputs inputs) "texinfo") | |
602 | "/bin/makeinfo"))) | |
3fad9a69 NG |
603 | ;; First fix Texinfo documentation, create appropriate |
604 | ;; directories, then generate Info and HTML files there. | |
605 | (substitute* "qe-doc.texi" | |
606 | (("^M-([{}])" _ bracket) (string-append "M-@" bracket))) | |
607 | (for-each (lambda (d) (mkdir-p d)) (list html info)) | |
608 | (invoke makeinfo "qe-doc.texi" "-o" info) | |
609 | (invoke makeinfo "qe-doc.texi" "--html" "--no-split" "-o" html) | |
610 | ;; Install sample configuration file. | |
611 | (install-file "config.eg" doc) | |
612 | #t)))))) | |
613 | (native-inputs | |
614 | `(("texinfo" ,texinfo))) | |
615 | (inputs | |
616 | `(("libx11" ,libx11) | |
617 | ("libxext" ,libxext) | |
618 | ("libxv" ,libxv))) | |
619 | (home-page "https://bellard.org/qemacs/") | |
620 | (synopsis "Small but powerful text editor") | |
621 | (description "QEmacs (for Quick Emacs) is a very small but | |
622 | powerful editor. It has features that even big editors lack: | |
623 | ||
624 | @itemize | |
625 | ||
626 | @item Full screen editor with an Emacs look and feel with all Emacs | |
627 | common features: multi-buffer, multi-window, command mode, universal | |
628 | argument, keyboard macros, config file with C-like syntax, minibuffer | |
629 | with completion and history. | |
630 | ||
631 | @item Can edit files of hundreds of Megabytes without being slow by | |
632 | using a highly optimized internal representation and by mmaping the | |
633 | file. | |
634 | ||
635 | @item Full Unicode support, including multi charset handling (8859-x, | |
636 | UTF8, SJIS, EUC-JP, ...) and bidirectional editing respecting the | |
637 | Unicode bidi algorithm. Arabic and Indic scripts handling (in | |
638 | progress). | |
639 | ||
640 | @item WYSIWYG HTML/XML/CSS2 mode graphical editing. Also supports | |
641 | Lynx like rendering on VT100 terminals. | |
642 | ||
643 | @item WYSIWYG DocBook mode based on XML/CSS2 renderer. | |
644 | ||
645 | @item C mode: coloring with immediate update. Emacs like auto-indent. | |
646 | ||
647 | @item Shell mode: colorized VT100 emulation so that your shell work | |
648 | exactly as you expect. Compile mode with next/prev error. | |
649 | ||
650 | @item Input methods for most languages, including Chinese (input | |
651 | methods come from the Yudit editor). | |
652 | ||
653 | @item Hexadecimal editing mode with insertion and block commands. | |
654 | Unicode hexa editing is also supported. | |
655 | ||
656 | @item Works on any VT100 terminals without termcap. UTF8 VT100 | |
657 | support included with double width glyphs. | |
658 | ||
659 | @item X11 support. Support multiple proportional fonts at the same | |
660 | time (as XEmacs). X Input methods supported. Xft extension supported | |
661 | for anti aliased font display. | |
662 | ||
663 | @item Small! Full version (including HTML/XML/CSS2/DocBook rendering | |
664 | and all charsets): 200KB big. Basic version (without bidir/unicode | |
665 | scripts/input/X11/C/Shell/HTML/Dired): 49KB. | |
666 | @end itemize") | |
667 | (license license:lgpl2.1+))) | |
668 | ||
04918a00 EB |
669 | (define-public ghostwriter |
670 | (package | |
671 | (name "ghostwriter") | |
73e732fd | 672 | (version "2.0.2") |
04918a00 EB |
673 | (source (origin |
674 | (method git-fetch) | |
675 | (uri (git-reference | |
b0e7b699 | 676 | (url "https://github.com/wereturtle/ghostwriter") |
61361ef2 | 677 | (commit version))) |
04918a00 EB |
678 | (file-name (git-file-name name version)) |
679 | (sha256 | |
680 | (base32 | |
73e732fd | 681 | "19cf55b86yj2b5hdazbyw4iyp6xq155243aiyg4m0vhwh0h79nwh")))) |
04918a00 EB |
682 | (build-system gnu-build-system) |
683 | (native-inputs | |
684 | `(("pkg-config" ,pkg-config) | |
58ab7f29 | 685 | ("qttools" ,qttools))) ; for lrelease |
04918a00 EB |
686 | (inputs |
687 | `(("hunspell" ,hunspell) | |
ea0a5107 | 688 | ("qtbase" ,qtbase-5) |
89d3869b | 689 | ("qtdeclarative" ,qtdeclarative) |
04918a00 | 690 | ("qtmultimedia" ,qtmultimedia) |
89d3869b | 691 | ("qtquickcontrols" ,qtquickcontrols) |
04918a00 | 692 | ("qtsvg" ,qtsvg) |
89d3869b EB |
693 | ("qtwebchannel" ,qtwebchannel))) |
694 | (propagated-inputs ; To get native-search-path | |
695 | `(("qtwebengine" ,qtwebengine))) | |
04918a00 EB |
696 | (arguments |
697 | `(#:phases | |
698 | (modify-phases %standard-phases | |
699 | (replace 'configure | |
700 | (lambda* (#:key outputs #:allow-other-keys) | |
701 | (let ((out (assoc-ref outputs "out"))) | |
702 | (invoke "qmake" (string-append "PREFIX=" out))))) | |
703 | (add-after 'configure 'create-translations | |
704 | (lambda _ | |
705 | ;; `lrelease` will not overwrite, so delete existing .qm files | |
706 | (for-each delete-file (find-files "translations" ".*\\.qm")) | |
707 | (apply invoke "lrelease" (find-files "translations" ".*\\.ts")))) | |
708 | ;; Ensure that icons are found at runtime. | |
709 | (add-after 'install 'wrap-executable | |
710 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
711 | (let ((out (assoc-ref outputs "out"))) | |
712 | (wrap-program (string-append out "/bin/ghostwriter") | |
713 | `("QT_PLUGIN_PATH" ":" prefix | |
714 | ,(map (lambda (label) | |
715 | (string-append (assoc-ref inputs label) | |
716 | "/lib/qt5/plugins/")) | |
717 | '("qtsvg" "qtmultimedia")))))))))) | |
718 | (home-page "https://wereturtle.github.io/ghostwriter/") | |
719 | (synopsis "Write without distractions") | |
720 | (description | |
721 | "@code{ghostwriter} provides a relaxing, distraction-free writing | |
722 | environment with Markdown markup.") | |
58ab7f29 | 723 | (license license:gpl3+))) ; icons/* under CC-BY-SA3 |
2238211a | 724 | |
1fffba66 NG |
725 | (define-public manuskript |
726 | (package | |
727 | (name "manuskript") | |
d29c769b | 728 | (version "0.12.0") |
1fffba66 NG |
729 | (source |
730 | (origin | |
731 | (method git-fetch) | |
732 | (uri (git-reference | |
b0e7b699 | 733 | (url "https://github.com/olivierkes/manuskript") |
1fffba66 NG |
734 | (commit version))) |
735 | (file-name (git-file-name name version)) | |
736 | (sha256 | |
d29c769b | 737 | (base32 "0gfwwnpjslb0g8y3v9ha4sd8in6bpy6bhi4rn4hmfd2vmq2flpbd")))) |
1fffba66 NG |
738 | (build-system python-build-system) |
739 | (arguments | |
740 | `(#:tests? #f ;no test | |
741 | #:phases | |
742 | (modify-phases %standard-phases | |
743 | (delete 'configure) | |
744 | (delete 'build) | |
745 | (replace 'install | |
746 | (lambda* (#:key outputs #:allow-other-keys) | |
747 | (let* ((out (assoc-ref outputs "out")) | |
748 | (share (string-append out "/share/manuskript"))) | |
749 | ;; Install data. | |
750 | (mkdir-p share) | |
751 | (for-each | |
752 | (lambda (d) | |
753 | (let ((destination (string-append share "/" d))) | |
754 | (mkdir-p destination) | |
755 | (copy-recursively d destination))) | |
756 | '("bin" "i18n" "icons" "libs" "manuskript" "resources")) | |
757 | ;; Install documentation. | |
758 | (let ((doc (string-append out | |
759 | "/doc/manuskript-" ,version | |
760 | "/sample-projects"))) | |
761 | (mkdir-p doc) | |
762 | (copy-recursively "sample-projects" doc)) | |
763 | ;; Wrap executable in "$out/share/manuskript/bin" and | |
764 | ;; link to it from "$out/bin". | |
765 | (let ((bin (string-append out "/bin")) | |
766 | (executable (string-append share "/bin/manuskript"))) | |
767 | (wrap-program executable | |
768 | (list "PYTHONPATH" 'prefix (list (getenv "PYTHONPATH")))) | |
769 | (mkdir-p bin) | |
770 | (with-directory-excursion bin | |
771 | (symlink (string-append share "/bin/manuskript") | |
772 | "manuskript"))) | |
773 | ;; Install icons and create .desktop file. | |
774 | (let ((apps (string-append out "/share/applications")) | |
775 | (icons-dir (string-append out "/share/pixmaps"))) | |
776 | (install-file "icons/Manuskript/manuskript.svg" icons-dir) | |
777 | (mkdir-p apps) | |
6bf5f207 EF |
778 | (make-desktop-entry-file (string-append apps "/manuskript.desktop") |
779 | #:name "Manuskript" | |
780 | #:mime-type "application/x-manuskript-book;" | |
781 | #:exec (string-append out "/bin/manuskript %f") | |
782 | #:comment '((#f "Tool for writers") | |
783 | ("es" "Herramienta para escritores/as")) | |
784 | #:keywords "manuskript;office;write;edit;novel;text;msk" | |
785 | #:terminal #f | |
786 | #:type "Application" | |
787 | #:icon "manuskript" | |
788 | #:categories "Office;WordProcessor;")) | |
1fffba66 NG |
789 | #t)))))) |
790 | (inputs | |
5dc5a311 | 791 | `(("pandoc" ,pandoc) |
1fffba66 NG |
792 | ("python-lxml" ,python-lxml) |
793 | ("python-markdown" ,python-markdown) | |
794 | ("python-pyqt" ,python-pyqt) | |
795 | ("qtsvg" ,qtsvg))) | |
796 | (home-page "http://www.theologeek.ch/manuskript/") | |
797 | (synopsis "Tool for writers") | |
798 | (description "Manuskript provides a rich environment to help | |
799 | writers create their first draft and then further refine and edit | |
800 | their masterpiece. With Manuskript you can: | |
801 | ||
802 | @itemize | |
803 | @item Grow your premise from one sentence, to a paragraph, to a full | |
804 | summary, | |
805 | @item Create characters, | |
806 | @item Conceive plots, | |
807 | @item Construct outlines (Outline mode and/or Index cards), | |
808 | @item Write with focus (Distraction free mode), | |
809 | @item Build worlds, | |
810 | @item Track items, | |
811 | @item Edit and re-organize chapters and scenes, | |
812 | @item View Story line, | |
813 | @item Compose with fiction or non-fiction templates and writing modes, | |
814 | @item Import and export document formats such as HTML, ePub, | |
815 | OpenDocument, DocX, and more. | |
816 | @end itemize | |
817 | ||
818 | Additionally Manuskript can help in many more ways with a spell | |
819 | checker, markdown highlighter, frequency analyzer, and automatic save | |
820 | in plain text file format.") | |
821 | (license license:gpl3+))) | |
822 | ||
2238211a EF |
823 | (define-public editorconfig-core-c |
824 | (package | |
825 | (name "editorconfig-core-c") | |
624d477b | 826 | (version "0.12.5") |
2238211a EF |
827 | (source |
828 | (origin | |
829 | (method git-fetch) | |
830 | (uri (git-reference | |
b0e7b699 | 831 | (url "https://github.com/editorconfig/editorconfig-core-c") |
2238211a EF |
832 | (commit (string-append "v" version)))) |
833 | (file-name (git-file-name name version)) | |
834 | (sha256 | |
624d477b | 835 | (base32 "073sh18y0v8wm10iphaia54pkdmwylalccpn1k5i9dwyfjzgj7yg")))) |
2238211a EF |
836 | (build-system cmake-build-system) |
837 | (arguments | |
838 | '(#:phases | |
839 | (modify-phases %standard-phases | |
840 | (add-after 'unpack 'insert-tests | |
841 | (lambda* (#:key inputs #:allow-other-keys) | |
842 | (let ((tests (assoc-ref inputs "tests"))) | |
843 | (copy-recursively tests "tests")) | |
1c4b3512 TGR |
844 | #t)) |
845 | (add-after 'install 'delete-static-library | |
846 | (lambda* (#:key outputs #:allow-other-keys) | |
847 | (let* ((out (assoc-ref outputs "out")) | |
848 | (lib (string-append out "/lib"))) | |
849 | (with-directory-excursion lib | |
850 | (delete-file "libeditorconfig_static.a")) | |
851 | #t)))))) | |
2238211a | 852 | (native-inputs |
7395ea0d TGR |
853 | `(("tests" |
854 | ,(origin | |
855 | (method git-fetch) | |
856 | (uri (git-reference | |
857 | (url "https://github.com/editorconfig/editorconfig-core-test") | |
858 | ;; The tests submodule commit matching this package's version. | |
859 | (commit "48610d43b7455af12195473377f93c4ceea654f5"))) | |
860 | (file-name (git-file-name "editorconfig-core-test" version)) | |
861 | (sha256 | |
862 | (base32 "1s29p4brmcsc3xsww3gk85dg45f1kk3iykh1air3ij0hymf5dyqy")))))) | |
2238211a EF |
863 | (inputs |
864 | `(("pcre2" ,pcre2))) | |
865 | (home-page "https://editorconfig.org/") | |
866 | (synopsis "EditorConfig core library written in C") | |
867 | (description "EditorConfig makes it easy to maintain the correct coding | |
868 | style when switching between different text editors and between different | |
869 | projects. The EditorConfig project maintains a file format and plugins for | |
870 | various text editors which allow this file format to be read and used by those | |
871 | editors.") | |
872 | (license license:bsd-2))) | |
75a137da AE |
873 | |
874 | (define-public texmacs | |
875 | (package | |
876 | (name "texmacs") | |
cde7068e | 877 | (version "2.1") |
75a137da AE |
878 | (source |
879 | (origin | |
880 | (method url-fetch) | |
881 | (uri (string-append "https://www.texmacs.org/Download/ftp/tmftp/" | |
882 | "source/TeXmacs-" version "-src.tar.gz")) | |
883 | (sha256 | |
cde7068e | 884 | (base32 "1gl6k1bwrk1y7hjyl4xvlqvmk5crl4jvsk8wrfp7ynbdin6n2i48")))) |
75a137da AE |
885 | (build-system gnu-build-system) |
886 | (native-inputs | |
eaf5df6b NG |
887 | `(("pkg-config" ,pkg-config) |
888 | ("xdg-utils" ,xdg-utils))) ;for xdg-icon-resource | |
75a137da AE |
889 | (inputs |
890 | `(("freetype" ,freetype) | |
891 | ("guile" ,guile-1.8) | |
892 | ("perl" ,perl) | |
893 | ("python" ,python-wrapper) | |
ea0a5107 | 894 | ("qt" ,qtbase-5) |
7140c55d | 895 | ("qtsvg" ,qtsvg))) |
75a137da | 896 | (arguments |
ad9fd1ba | 897 | `(#:tests? #f ; no check target |
75a137da AE |
898 | #:phases |
899 | (modify-phases %standard-phases | |
eaf5df6b NG |
900 | (add-after 'unpack 'fix-icon-directory |
901 | (lambda* (#:key outputs #:allow-other-keys) | |
902 | (let ((out (assoc-ref outputs "out"))) | |
903 | (substitute* "packages/linux/icons.sh" | |
904 | (("/usr/share") | |
cde7068e | 905 | (string-append out "/share")))))) |
d5909136 MD |
906 | (add-after 'install 'install-desktop-file |
907 | (lambda* (#:key outputs #:allow-other-keys) | |
908 | ;; Install desktop file. | |
909 | (let* ((out (assoc-ref outputs "out")) | |
910 | (apps (string-append out "/share/applications")) | |
911 | (source "TeXmacs/misc/mime/texmacs.desktop")) | |
cde7068e | 912 | (install-file source apps)))) |
75a137da AE |
913 | (add-before 'configure 'gzip-flags |
914 | (lambda _ | |
915 | (substitute* "Makefile.in" | |
916 | (("^GZIP = gzip -f") "GZIP = gzip -f -n"))))))) | |
917 | (synopsis "Editing platform with special features for scientists") | |
918 | (description | |
919 | "GNU TeXmacs is a text editing platform which is specialized for | |
eaf5df6b NG |
920 | scientists. It is ideal for editing structured documents with different types |
921 | of content. It has robust support for mathematical formulas and plots. It | |
922 | can also act as an interface to external mathematical programs such as R and | |
923 | Octave. TeXmacs is completely extensible via Guile.") | |
75a137da AE |
924 | (license license:gpl3+) |
925 | (home-page "https://www.texmacs.org/tmweb/home/welcome.en.html"))) | |
c55cd98c NG |
926 | |
927 | (define-public scintilla | |
928 | (package | |
929 | (name "scintilla") | |
1172fa8c | 930 | (version "5.1.4") |
3e6cb583 NG |
931 | (source |
932 | (origin | |
933 | (method url-fetch) | |
934 | (uri (let ((v (apply string-append (string-split version #\.)))) | |
935 | (string-append "https://www.scintilla.org/scintilla" v ".tgz"))) | |
936 | (sha256 | |
1172fa8c | 937 | (base32 "0rd3scfs3dwaj85ds8yrcp1r8z0lifi7qv2464k6n1c995amr0nw")))) |
c55cd98c NG |
938 | (build-system gnu-build-system) |
939 | (arguments | |
940 | `(#:make-flags (list "GTK3=1" "CC=gcc" "-Cgtk") | |
941 | #:tests? #f ;require un-packaged Pyside | |
942 | #:phases | |
943 | (modify-phases %standard-phases | |
944 | (delete 'configure) ;no configure script | |
c55cd98c | 945 | (replace 'install |
b2dbc53e | 946 | ;; Upstream provides no install script. |
c55cd98c NG |
947 | (lambda* (#:key outputs #:allow-other-keys) |
948 | (let* ((out (assoc-ref outputs "out")) | |
949 | (lib (string-append out "/lib")) | |
950 | (include (string-append out "/include"))) | |
b2dbc53e NG |
951 | (for-each (lambda (f) (install-file f lib)) |
952 | (find-files "bin/" "\\.so$")) | |
c55cd98c | 953 | (for-each (lambda (f) (install-file f include)) |
8107e92a | 954 | (find-files "include/" ".")))))))) |
c55cd98c | 955 | (native-inputs |
9d92819d NG |
956 | `(("gcc" ,gcc-9) ;Code has C++17 requirements |
957 | ("pkg-config" ,pkg-config) | |
dee632a8 | 958 | ("python" ,python-wrapper))) |
c55cd98c NG |
959 | (inputs |
960 | `(("gtk+" ,gtk+))) | |
961 | (home-page "https://www.scintilla.org/") | |
962 | (synopsis "Code editor for GTK+") | |
963 | (description "Scintilla is a source code editing component for | |
964 | GTK+. It has the usual features found in text editing components, as | |
965 | well as some that are especially useful for editing and debugging | |
966 | source code; these include support for syntax styling, error | |
967 | indicators, code completion and call tips. Styling choices are more | |
968 | open than with many editors: Scintilla lets you use proportional | |
969 | fonts, bold and italics, multiple foreground and background colours, | |
970 | and multiple fonts.") | |
971 | (license license:hpnd))) | |
2363ed01 NG |
972 | |
973 | (define-public geany | |
974 | (package | |
975 | (name "geany") | |
fa2ef462 | 976 | (version "1.38") |
9e03ddc5 NG |
977 | (source |
978 | (origin | |
979 | (method url-fetch) | |
980 | (uri (string-append "https://download.geany.org/" | |
981 | "geany-" version ".tar.bz2")) | |
982 | (sha256 | |
fa2ef462 | 983 | (base32 "0inmmb9wra2w99pfv6p64d66s2zrhafc8drhwmga7gj89mp1gzxb")))) |
2363ed01 NG |
984 | (build-system gnu-build-system) |
985 | (native-inputs | |
986 | `(("autoconf" ,autoconf) | |
987 | ("automake" ,automake) | |
988 | ("doxygen" ,doxygen) | |
989 | ("glib" ,glib "bin") | |
990 | ("intltool" ,intltool) | |
991 | ("libtool" ,libtool) | |
992 | ("pkg-config" ,pkg-config) | |
993 | ("python-docutils" ,python-docutils))) ;for rst2html | |
994 | (inputs | |
995 | `(("gtk+" ,gtk+) | |
9e03ddc5 NG |
996 | ;; FIXME: Geany bundles a 3.X release of Scintilla. It is not |
997 | ;; currently possible to replace it with our Scintilla package. | |
998 | ;; ("scintilla" ,scintilla) | |
999 | )) | |
2363ed01 | 1000 | (arguments |
f3ed5297 NG |
1001 | `(#:imported-modules ((guix build glib-or-gtk-build-system) |
1002 | ,@%gnu-build-system-modules) | |
1003 | #:modules (((guix build glib-or-gtk-build-system) #:prefix glib-or-gtk:) | |
1004 | (guix build gnu-build-system) | |
1005 | (guix build utils)) | |
1006 | #:phases | |
2363ed01 | 1007 | (modify-phases %standard-phases |
f3ed5297 NG |
1008 | (add-after 'install 'glib-or-gtk-wrap |
1009 | (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-wrap))))) | |
2363ed01 NG |
1010 | (home-page "https://www.geany.org") |
1011 | (synopsis "Fast and lightweight IDE") | |
1012 | (description "Geany is a small and fast Integrated Development | |
1013 | Environment (IDE) that only has a few dependencies on other packages and is as | |
1014 | independent as possible from special desktop environments like KDE or GNOME. | |
1015 | ||
1016 | The basic features of Geany are: | |
1017 | @itemize | |
1018 | @item syntax highlighting | |
1019 | @item code completion | |
1020 | @item auto completion of often constructed constructs like if, for and while | |
1021 | @item auto completion of XML and HTML tags | |
1022 | @item call tips | |
1023 | @item folding | |
1024 | @item many supported filetypes like C, Java, PHP, HTML, Python, Perl, Pascal | |
1025 | @item symbol lists | |
1026 | @item embedded terminal emulation | |
1027 | @item extensibility through plugins | |
1028 | @end itemize") | |
1029 | (license license:gpl2+))) | |
2207d522 NG |
1030 | |
1031 | (define-public fe | |
1032 | (package | |
1033 | (name "fe") | |
24652f9c | 1034 | ;; Stable release is 1.9. However, this development version |
2207d522 NG |
1035 | ;; introduces support for UTF-8. |
1036 | (version "2.0") | |
1037 | (source (origin | |
1038 | (method url-fetch) | |
1039 | (uri (string-append "http://www.moria.de/~michael/fe/" | |
1040 | "fe-" version ".tar.gz")) | |
1041 | (sha256 | |
1042 | (base32 | |
24652f9c | 1043 | "10mk5wc3dsdp46b3hkjyd740gcdv6m1gvlr3p8xjxf55b3vfs0la")))) |
2207d522 NG |
1044 | (build-system gnu-build-system) |
1045 | (arguments | |
1046 | `(#:tests? #f ;no test | |
1047 | ;; Sendmail is only used to send a crash log. Disable the | |
1048 | ;; feature since it is (1) undocumented (2) not very useful. | |
1049 | #:configure-flags (list "--disable-sendmail") | |
1050 | #:phases | |
1051 | (modify-phases %standard-phases | |
1052 | (add-after 'install 'install-doc | |
1053 | (lambda* (#:key outputs #:allow-other-keys) | |
1054 | (let* ((out (assoc-ref outputs "out")) | |
1055 | (doc (string-append out "/share/doc/" ,name "-" ,version))) | |
1056 | (for-each (lambda (f) (install-file f doc)) | |
1057 | '("fe.doc" "fe.html" "fe.ps" "feref.ps" "README")) | |
1058 | #t)))))) | |
1059 | (native-inputs | |
1060 | `(("gettext" ,gettext-minimal))) | |
1061 | (inputs | |
1062 | `(("ncurses" ,ncurses))) | |
1063 | (home-page "http://www.moria.de/~michael/fe/") | |
1064 | (synopsis "Small folding editor") | |
eee98f96 | 1065 | (description "Fe is a small folding editor. It folds |
2207d522 NG |
1066 | arbitrary text regions; it is not bound to syntactic units. |
1067 | ||
1068 | Fe has no configuration or extension language and requires no setup. | |
99ce2055 | 1069 | Its user interface is emacs-like and it has menus for the very most |
2207d522 NG |
1070 | important functions to help beginners. Further there is a reference |
1071 | card. It offers: | |
1072 | ||
1073 | @itemize | |
1074 | @item Regions and Emacs-like kill ring | |
1075 | @item Incremental search | |
1076 | @item Keyboard macros | |
1077 | @item Editing binary files | |
1078 | @item Multiple windows and views | |
1079 | @item Compose function for Latin 1 characters | |
1080 | @end itemize") | |
1081 | (license license:gpl2+))) | |
a78364e9 DM |
1082 | |
1083 | (define-public ne | |
1084 | (package | |
1085 | (name "ne") | |
45066bc9 | 1086 | (version "3.3.1") |
a78364e9 DM |
1087 | (source (origin |
1088 | (method git-fetch) | |
1089 | (uri (git-reference | |
b0e7b699 | 1090 | (url "https://github.com/vigna/ne") |
a78364e9 DM |
1091 | (commit version))) |
1092 | (file-name (git-file-name name version)) | |
1093 | (sha256 | |
1094 | (base32 | |
45066bc9 | 1095 | "0sg2f6lxq6cjkpd3dvlxxns82hvq826rjnams5in97pssmknr77g")))) |
a78364e9 DM |
1096 | (build-system gnu-build-system) |
1097 | (native-inputs | |
1098 | `(("perl" ,perl) | |
1099 | ("texinfo" ,texinfo))) | |
1100 | (inputs | |
1101 | `(("ncurses" ,ncurses))) | |
1102 | (arguments | |
1103 | `(#:tests? #f | |
1104 | #:make-flags | |
1105 | (list "CC=gcc" | |
1106 | (string-append "PREFIX=" (assoc-ref %outputs "out")) | |
1107 | (string-append "LDFLAGS=-L" (assoc-ref %build-inputs "ncurses") | |
1108 | "/lib")) | |
1109 | #:phases | |
1110 | (modify-phases %standard-phases | |
45066bc9 TGR |
1111 | (add-before 'configure 'patch-early-shebang |
1112 | (lambda _ | |
1113 | (substitute* "version.pl" | |
1114 | (("/usr/bin/env .*perl") (which "perl"))))) | |
a78364e9 DM |
1115 | (replace 'configure |
1116 | (lambda _ | |
1117 | (substitute* "src/makefile" | |
45066bc9 | 1118 | (("-lcurses") "-lncurses"))))))) |
d12d52ce | 1119 | (home-page "https://ne.di.unimi.it/") |
a78364e9 DM |
1120 | (synopsis "Text editor with menu bar") |
1121 | (description "This package provides a modeless text editor with menu bar. | |
1122 | It supports syntax highlighting, regular expressions, configurable menus, | |
1123 | keybindings, autocomplete and unlimited undo. It can pipe a marked block | |
1124 | of text through any command line filter. It can also open very large binary | |
1125 | files. It was originally developed on the Amiga 3000T.") | |
1126 | (license license:gpl3+))) | |
8b95f741 T |
1127 | |
1128 | (define-public hexer | |
1129 | (package | |
1130 | (name "hexer") | |
1131 | (version "1.0.6") | |
1132 | (source | |
1133 | (origin | |
1134 | (method url-fetch) | |
1135 | (uri (string-append "https://devel.ringlet.net/files/editors/hexer/" | |
1136 | "hexer-" version ".tar.xz")) | |
1137 | (sha256 | |
1138 | (base32 "157z17z8qivdin2km2wp86x1bv1nx15frrwcz11mk0l3ab74mf76")))) | |
1139 | (build-system gnu-build-system) | |
1140 | (arguments | |
1141 | `(#:tests? #f ;no upstream tests | |
1142 | #:make-flags | |
1143 | (list "CC=gcc" | |
1144 | (string-append "PREFIX=" (assoc-ref %outputs "out")) | |
1145 | (string-append "LTERMCAP=-lncurses") | |
1146 | (string-append "LDFLAGS=-L" (assoc-ref %build-inputs "ncurses") | |
1147 | "/lib")) | |
1148 | #:phases | |
1149 | (modify-phases %standard-phases | |
1150 | (delete 'configure)))) ;no configure script | |
1151 | (inputs | |
1152 | `(("ncurses" ,ncurses))) | |
1153 | (home-page "https://devel.ringlet.net/editors/hexer/") | |
1154 | (synopsis "Multi buffer editor for binary files with vi-like interface") | |
1155 | (description "Hexer is a multi-buffer editor for binary files for Unix-like | |
1156 | systems that displays its buffer(s) as a hex dump. The user interface is kept | |
1157 | similar to vi/ex.") | |
1158 | (license license:bsd-3))) | |
e530fb41 MM |
1159 | |
1160 | (define-public virtaal | |
1161 | (package | |
1162 | (name "virtaal") | |
1163 | (version "0.7.1") | |
1164 | (source (origin | |
1165 | (method url-fetch) | |
1166 | (uri (string-append "mirror://sourceforge/translate/Virtaal/" | |
1167 | version "/virtaal-" version ".tar.bz2")) | |
1168 | (sha256 | |
1169 | (base32 | |
1170 | "0cyimjp3191qlmw6n0ipqdr9xr0cq4f6dqvz4rl9q31h6l3kywf9")))) | |
1171 | (build-system python-build-system) | |
1172 | (arguments | |
1173 | `(#:python ,python-2 | |
1174 | #:use-setuptools? #f | |
1175 | #:tests? #f ;; Failing tests | |
1176 | #:phases | |
1177 | (modify-phases %standard-phases | |
1178 | (add-before 'build 'configure | |
1179 | (lambda* (#:key outputs #:allow-other-keys) | |
1180 | ;; Set data file path to absolute store path. | |
1181 | (substitute* "virtaal/common/pan_app.py" | |
1182 | (("file_discovery\\.get_abs_data_filename.*") | |
1183 | (string-append "os.path.join('" | |
1184 | (assoc-ref outputs "out") | |
1185 | "/share', *path_parts)")))))))) | |
1186 | (inputs | |
1187 | `(("python2-lxml" ,python2-lxml) | |
1188 | ("python2-pygtk" ,python2-pygtk) | |
1189 | ("python2-simplejson" ,python2-simplejson) | |
1190 | ("python2-translate-toolkit" ,python2-translate-toolkit) | |
1191 | ("python2-pycurl" ,python2-pycurl))) | |
1192 | (synopsis "Graphical translation tool") | |
1193 | (description "Virtaal is a powerful yet simple translation tool with an | |
1194 | uncluttered user interface. It supports a multitude of translation formats | |
1195 | provided by the Translate Toolkit, including XLIFF and PO.") | |
1196 | (home-page "https://virtaal.translatehouse.org/") | |
1197 | (license license:gpl2+))) |