Merge branch 'staging' into core-updates
[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>
47956fa0 6;;; Copyright © 2017 ng0 <ng0@n0.is>
bcd757fd 7;;; Copyright © 2014 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.org>
77100119 8;;; Copyright © 2017, 2018, 2019, 2020 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>
1fffba66 11;;; Copyright © 2019, 2020 Nicolas Goaziou <mail@nicolasgoaziou.fr>
a2c1dcea
JMSG
12;;;
13;;; This file is part of GNU Guix.
14;;;
15;;; GNU Guix is free software; you can redistribute it and/or modify it
16;;; under the terms of the GNU General Public License as published by
17;;; the Free Software Foundation; either version 3 of the License, or (at
18;;; your option) any later version.
19;;;
20;;; GNU Guix is distributed in the hope that it will be useful, but
21;;; WITHOUT ANY WARRANTY; without even the implied warranty of
22;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23;;; GNU General Public License for more details.
24;;;
25;;; You should have received a copy of the GNU General Public License
26;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
27
28(define-module (gnu packages text-editors)
29 #:use-module (guix packages)
30 #:use-module (guix download)
5613ea79 31 #:use-module (guix git-download)
a2c1dcea
JMSG
32 #:use-module (guix utils)
33 #:use-module (guix build-system gnu)
2238211a 34 #:use-module (guix build-system cmake)
4f038621 35 #:use-module (guix build-system glib-or-gtk)
1fffba66 36 #:use-module (guix build-system python)
a2c1dcea
JMSG
37 #:use-module ((guix licenses) #:prefix license:)
38 #:use-module (gnu packages)
3312fda0 39 #:use-module (gnu packages assembly)
2363ed01 40 #:use-module (gnu packages autotools)
5613ea79
CZ
41 #:use-module (gnu packages boost)
42 #:use-module (gnu packages documentation)
75a137da 43 #:use-module (gnu packages fontutils)
5613ea79 44 #:use-module (gnu packages gcc)
2207d522 45 #:use-module (gnu packages gettext)
0bf11648
FS
46 #:use-module (gnu packages glib)
47 #:use-module (gnu packages gtk)
75a137da 48 #:use-module (gnu packages guile)
1fffba66 49 #:use-module (gnu packages haskell-xyz)
bcd757fd 50 #:use-module (gnu packages libbsd)
04918a00 51 #:use-module (gnu packages libreoffice)
a2c1dcea
JMSG
52 #:use-module (gnu packages lua)
53 #:use-module (gnu packages ncurses)
2238211a 54 #:use-module (gnu packages pcre)
75a137da 55 #:use-module (gnu packages perl)
0bf11648 56 #:use-module (gnu packages pkg-config)
75a137da 57 #:use-module (gnu packages python)
2363ed01 58 #:use-module (gnu packages python-xyz)
04918a00 59 #:use-module (gnu packages qt)
852ba10a 60 #:use-module (gnu packages regex)
5613ea79 61 #:use-module (gnu packages ruby)
264ccbb3 62 #:use-module (gnu packages terminals)
5613ea79 63 #:use-module (gnu packages xml))
a2c1dcea
JMSG
64
65(define-public vis
66 (package
67 (name "vis")
dadc8610 68 (version "0.5")
a2c1dcea
JMSG
69 (source (origin
70 (method url-fetch)
7ec38295
EF
71 (uri (string-append "https://github.com/martanne/vis/releases"
72 "/download/v" version
73 "/vis-v" version ".tar.gz"))
a2c1dcea 74 (sha256
852ba10a 75 (base32
7ec38295 76 "0aw35n8xk7ir84ckvczc6yshj9ynishrlz0qlv4yc1afbra1gxmn"))))
a2c1dcea
JMSG
77 (build-system gnu-build-system)
78 (arguments
852ba10a
TGR
79 `(#:test-target "test"
80 #:tests? #f ; no releases; snapshots are missing tests
a2c1dcea
JMSG
81 #:phases
82 (modify-phases %standard-phases
83 (add-after 'install 'wrap-binary
84 (lambda* (#:key inputs outputs #:allow-other-keys)
85 (let* ((out (assoc-ref outputs "out"))
86 (lpeg (assoc-ref inputs "lua-lpeg"))
87 (lua-version ,(version-major+minor (package-version lua)))
88 (LUA_PATH (string-append lpeg "/share/lua/"
89 lua-version "/?.lua"))
90 (LUA_CPATH (string-append lpeg "/lib/lua/"
91 lua-version "/?.so")))
92 (wrap-program (string-append out "/bin/vis")
93 `("LUA_PATH" ":" prefix (,LUA_PATH))
94 `("LUA_CPATH" ":" prefix (,LUA_CPATH)))
95 #t))))))
96 (native-search-paths
97 (list (search-path-specification
98 (variable "VIS_PATH")
99 (files '("share/vis")))))
c695fb76
TGR
100 (inputs `(("lua" ,lua)
101 ("ncurses" ,ncurses)
102 ("libtermkey" ,libtermkey)
103 ("lua-lpeg" ,lua-lpeg)
852ba10a 104 ("tre" ,tre)))
a2c1dcea
JMSG
105 (synopsis "Vim-like text editor")
106 (description
107 "Vis aims to be a modern, legacy free, simple yet efficient vim-like text
108editor. It extends vim's modal editing with built-in support for multiple
109cursors/selections and combines it with sam's structural regular expression
110based command language.")
111 (home-page "https://github.com/martanne/vis")
112 (license (list license:isc ; Main distribution.
113 license:public-domain ; map.[ch]
114 license:expat)))) ; lexers and libutf.[ch]
5613ea79
CZ
115
116(define-public kakoune
fbe8ebec
TGR
117 (package
118 (name "kakoune")
be0a613c 119 (version "2019.12.10")
fbe8ebec
TGR
120 (source
121 (origin
122 (method url-fetch)
123 (uri (string-append "https://github.com/mawww/kakoune/"
124 "releases/download/v" version "/"
a1cb6928 125 "kakoune-" version ".tar.bz2"))
fbe8ebec 126 (sha256
be0a613c 127 (base32 "1y1gzax2dl7flh676k0rl1vacv10j7p5krkmb67b0afbrql8vbb6"))))
fbe8ebec
TGR
128 (build-system gnu-build-system)
129 (arguments
130 `(#:make-flags
131 (list (string-append "PREFIX=" (assoc-ref %outputs "out")))
132 #:phases
133 (modify-phases %standard-phases
134 (add-after 'unpack 'patch-source
135 (lambda _
136 ;; kakoune uses confstr with _CS_PATH to find out where to find
137 ;; a posix shell, but this doesn't work in the build
138 ;; environment. This substitution just replaces that result
139 ;; with the "sh" path.
140 (substitute* "src/shell_manager.cc"
141 (("if \\(m_shell.empty\\(\\)\\)" line)
142 (string-append "m_shell = \"" (which "sh")
143 "\";\n " line)))
144 #t))
145 (delete 'configure) ; no configure script
146 ;; kakoune requires us to be in the src/ directory to build
147 (add-before 'build 'chdir
148 (lambda _ (chdir "src") #t)))))
149 (native-inputs
150 `(("asciidoc" ,asciidoc)
151 ("pkg-config" ,pkg-config)
152 ("ruby" ,ruby)))
153 (inputs
73eacca8 154 `(("ncurses" ,ncurses)))
fbe8ebec
TGR
155 (synopsis "Vim-inspired code editor")
156 (description
157 "Kakoune is a code editor heavily inspired by Vim, as such most of its
5613ea79
CZ
158commands are similar to Vi's ones, and it shares Vi's \"keystrokes as a text
159editing language\" model. Kakoune has a strong focus on interactivity, most
160commands provide immediate and incremental results, while still being
161competitive (as in keystroke count) with Vim.")
27405497 162 (home-page "https://kakoune.org/")
fbe8ebec 163 (license license:unlicense)))
f255a6db
EB
164
165(define-public joe
166 (package
167 (name "joe")
bc111d39 168 (version "4.6")
f255a6db
EB
169 (source
170 (origin
171 (method url-fetch)
172 (uri (string-append "https://sourceforge.net/projects/joe-editor/"
173 "files/JOE sources/joe-" version "/"
174 "joe-" version ".tar.gz"))
175 (sha256
176 (base32
bc111d39 177 "1pmr598xxxm9j9dl93kq4dv36zyw0q2dh6d7x07hf134y9hhlnj9"))))
f255a6db
EB
178 (build-system gnu-build-system)
179 (inputs `(("ncurses" ,ncurses)))
180 (home-page "http://joe-editor.sourceforge.net/")
181 (synopsis "Console screen editor")
182 (description
7904f18a
EB
183 "JOE is a powerful console screen editor with a \"mode-less\" user
184interface similar to many user-friendly editors. JOE has some of the key
185bindings and many of the powerful features of GNU Emacs.")
f255a6db 186 (license license:gpl3+)))
0bf11648
FS
187
188(define-public leafpad
189 (package
190 (name "leafpad")
191 (version "0.8.18.1")
192 (source (origin
193 (method url-fetch)
b7fd77ef 194 (uri (string-append "mirror://savannah/"
0bf11648
FS
195 "leafpad/leafpad-" version ".tar.gz"))
196 (sha256
197 (base32
198 "0b0az2wvqgvam7w0ns1j8xp2llslm1rx6h7zcsy06a7j0yp257cm"))))
4f038621 199 (build-system glib-or-gtk-build-system)
0bf11648
FS
200 (native-inputs
201 `(("intltool" ,intltool)
202 ("pkg-config" ,pkg-config)))
203 (inputs
204 `(("gtk+" ,gtk+-2)))
dde5831c 205 (home-page "http://tarot.freeshell.org/leafpad/")
0bf11648
FS
206 (synopsis "GTK+ based text editor")
207 (description "Leafpad is a GTK+ text editor that emphasizes simplicity. As
208development focuses on keeping weight down to a minimum, only the most essential
209features are implemented in the editor. Leafpad is simple to use, is easily
210compiled, requires few libraries, and starts up quickly. ")
211 (license license:gpl2+)))
3312fda0 212
213(define-public e3
214 (package
215 (name "e3")
216 (version "2.82")
217 (source (origin
218 (method url-fetch)
219 (uri (string-append "https://sites.google.com/site/e3editor/Home/"
220 "e3-" version ".tgz"))
221 (sha256
222 (base32
223 "0919kadkas020maqq37852isnzp053q2fnws2zh3mz81d1jiviak"))
224 (modules '((guix build utils)))
225
226 ;; Remove pre-built binaries.
6cbee49d
MW
227 (snippet '(begin
228 (delete-file-recursively "bin")
229 #t))))
3312fda0 230 (build-system gnu-build-system)
231 (arguments
232 `(#:tests? #f
233 #:make-flags (list (string-append "PREFIX="
234 (assoc-ref %outputs "out")))
235 #:phases (modify-phases %standard-phases
236 (delete 'configure))))
237 (native-inputs
238 `(("nasm" ,nasm)))
239 (home-page "https://sites.google.com/site/e3editor/")
240 (synopsis "Tiny text editor written in assembly")
241 (description
242 "e3 is a micro text editor with an executable code size between 3800 and
24335000 bytes. Except for ``syntax highlighting'', the e3 binary supports all
244of the basic functions one expects plus built in arithmetic calculations.
245UTF-8 coding of unicode characters is supported as well. e3 can use
246Wordstar-, EMACS-, Pico, Nedit or vi-like key bindings. e3 can be used on
24716, 32, and 64-bit CPUs.")
248 (supported-systems '("x86_64-linux" "i686-linux"))
249 (license license:gpl2+)))
bcd757fd
LC
250
251(define-public mg
252 (package
253 (name "mg")
77100119 254 (version "20180927")
bcd757fd 255 (source (origin
a4d8b386
TGR
256 (method git-fetch)
257 (uri (git-reference
258 (url "https://github.com/hboetes/mg")
259 (commit version)))
260 (file-name (git-file-name name version))
bcd757fd
LC
261 (sha256
262 (base32
77100119 263 "14vrm8lvwksf697sqks7xfd1xaqjlqjc9afjk33sksq5p27wr203"))
bcd757fd 264 (modules '((guix build utils)))
6cbee49d
MW
265 (snippet '(begin
266 (substitute* "GNUmakefile"
267 (("/usr/bin/") ""))
268 #t))))
bcd757fd
LC
269 (build-system gnu-build-system)
270 (native-inputs
271 `(("pkg-config" ,pkg-config)))
272 (inputs
273 `(("libbsd" ,libbsd)
274 ("ncurses" ,ncurses)))
275 (arguments
276 ;; No test suite available.
277 '(#:tests? #f
278 #:make-flags (list (string-append "prefix=" %output)
bcd757fd
LC
279 "CC=gcc")
280 #:phases (modify-phases %standard-phases
a4d8b386 281 (delete 'configure) ; no configure script
217ce570 282 (add-before 'build 'correct-location-of-difftool
283 (lambda _
284 (substitute* "buffer.c"
285 (("/usr/bin/diff")
286 (which "diff")))
287 #t))
bcd757fd
LC
288 (add-before 'install 'patch-tutorial-location
289 (lambda* (#:key outputs #:allow-other-keys)
290 (substitute* "mg.1"
291 (("/usr") (assoc-ref outputs "out")))
292 #t))
293 (add-after 'install 'install-tutorial
294 (lambda* (#:key outputs #:allow-other-keys)
295 (let* ((out (assoc-ref outputs "out"))
296 (doc (string-append out "/share/doc/mg")))
297 (install-file "tutorial" doc)
298 #t))))))
c3d82885 299 (home-page "https://homepage.boetes.org/software/mg/")
bcd757fd
LC
300 (synopsis "Microscopic GNU Emacs clone")
301 (description
16fcca64
TGR
302 "Mg (@command{mg}) is a GNU Emacs style editor, with which it is
303\"broadly\" compatible. This is a portable version of the mg maintained by the
304OpenBSD team.")
bcd757fd 305 (license license:public-domain)))
04918a00
EB
306
307(define-public ghostwriter
308 (package
309 (name "ghostwriter")
58ab7f29 310 (version "1.7.4")
04918a00
EB
311 (source (origin
312 (method git-fetch)
313 (uri (git-reference
314 (url "https://github.com/wereturtle/ghostwriter.git")
315 (commit (string-append "v" version))))
316 (file-name (git-file-name name version))
317 (sha256
318 (base32
58ab7f29 319 "1pqlr08z5syqcq5p282asxwzrrm7c1w94baxyb467swh8yp3fj5m"))))
04918a00
EB
320 (build-system gnu-build-system)
321 (native-inputs
322 `(("pkg-config" ,pkg-config)
58ab7f29 323 ("qttools" ,qttools))) ; for lrelease
04918a00
EB
324 (inputs
325 `(("hunspell" ,hunspell)
326 ("qtbase" ,qtbase)
327 ("qtmultimedia" ,qtmultimedia)
328 ("qtsvg" ,qtsvg)
329 ("qtwebkit" ,qtwebkit)))
330 (arguments
331 `(#:phases
332 (modify-phases %standard-phases
333 (replace 'configure
334 (lambda* (#:key outputs #:allow-other-keys)
335 (let ((out (assoc-ref outputs "out")))
336 (invoke "qmake" (string-append "PREFIX=" out)))))
337 (add-after 'configure 'create-translations
338 (lambda _
339 ;; `lrelease` will not overwrite, so delete existing .qm files
340 (for-each delete-file (find-files "translations" ".*\\.qm"))
341 (apply invoke "lrelease" (find-files "translations" ".*\\.ts"))))
342 ;; Ensure that icons are found at runtime.
343 (add-after 'install 'wrap-executable
344 (lambda* (#:key inputs outputs #:allow-other-keys)
345 (let ((out (assoc-ref outputs "out")))
346 (wrap-program (string-append out "/bin/ghostwriter")
347 `("QT_PLUGIN_PATH" ":" prefix
348 ,(map (lambda (label)
349 (string-append (assoc-ref inputs label)
350 "/lib/qt5/plugins/"))
351 '("qtsvg" "qtmultimedia"))))))))))
352 (home-page "https://wereturtle.github.io/ghostwriter/")
353 (synopsis "Write without distractions")
354 (description
355 "@code{ghostwriter} provides a relaxing, distraction-free writing
356environment with Markdown markup.")
58ab7f29 357 (license license:gpl3+))) ; icons/* under CC-BY-SA3
2238211a 358
1fffba66
NG
359(define-public manuskript
360 (package
361 (name "manuskript")
362 (version "0.10.0")
363 (source
364 (origin
365 (method git-fetch)
366 (uri (git-reference
367 (url "https://github.com/olivierkes/manuskript.git")
368 (commit version)))
369 (file-name (git-file-name name version))
370 (sha256
371 (base32 "0q413vym7hzjpyg3krj5y63hwpncdifjkyswqmr76zg5yqnklnh3"))))
372 (build-system python-build-system)
373 (arguments
374 `(#:tests? #f ;no test
375 #:phases
376 (modify-phases %standard-phases
377 (delete 'configure)
378 (delete 'build)
379 (replace 'install
380 (lambda* (#:key outputs #:allow-other-keys)
381 (let* ((out (assoc-ref outputs "out"))
382 (share (string-append out "/share/manuskript")))
383 ;; Install data.
384 (mkdir-p share)
385 (for-each
386 (lambda (d)
387 (let ((destination (string-append share "/" d)))
388 (mkdir-p destination)
389 (copy-recursively d destination)))
390 '("bin" "i18n" "icons" "libs" "manuskript" "resources"))
391 ;; Install documentation.
392 (let ((doc (string-append out
393 "/doc/manuskript-" ,version
394 "/sample-projects")))
395 (mkdir-p doc)
396 (copy-recursively "sample-projects" doc))
397 ;; Wrap executable in "$out/share/manuskript/bin" and
398 ;; link to it from "$out/bin".
399 (let ((bin (string-append out "/bin"))
400 (executable (string-append share "/bin/manuskript")))
401 (wrap-program executable
402 (list "PYTHONPATH" 'prefix (list (getenv "PYTHONPATH"))))
403 (mkdir-p bin)
404 (with-directory-excursion bin
405 (symlink (string-append share "/bin/manuskript")
406 "manuskript")))
407 ;; Install icons and create .desktop file.
408 (let ((apps (string-append out "/share/applications"))
409 (icons-dir (string-append out "/share/pixmaps")))
410 (install-file "icons/Manuskript/manuskript.svg" icons-dir)
411 (mkdir-p apps)
412 (with-output-to-file (string-append apps "/manuskript.desktop")
413 (lambda _
414 (format #t
415 "[Desktop Entry]~@
416 Name=Manuskript~@
417 MimeType=application/x-manuskript-book;~@
418 Exec=~a/bin/manuskript %f~@
419 Comment=Tool for writers~@
420 Comment[es]=Herramienta para escritores/as~@
421 Keywords=manuskript;office;write;edit;novel;text;msk~@
422 Terminal=false~@
423 Type=Application~@
424 Icon=manuskript~@
425 Categories=Office;WordProcessor;~%"
426 out))))
427 #t))))))
428 (inputs
429 `(("ghc-pandoc" ,ghc-pandoc)
430 ("python-lxml" ,python-lxml)
431 ("python-markdown" ,python-markdown)
432 ("python-pyqt" ,python-pyqt)
433 ("qtsvg" ,qtsvg)))
434 (home-page "http://www.theologeek.ch/manuskript/")
435 (synopsis "Tool for writers")
436 (description "Manuskript provides a rich environment to help
437writers create their first draft and then further refine and edit
438their masterpiece. With Manuskript you can:
439
440@itemize
441@item Grow your premise from one sentence, to a paragraph, to a full
442summary,
443@item Create characters,
444@item Conceive plots,
445@item Construct outlines (Outline mode and/or Index cards),
446@item Write with focus (Distraction free mode),
447@item Build worlds,
448@item Track items,
449@item Edit and re-organize chapters and scenes,
450@item View Story line,
451@item Compose with fiction or non-fiction templates and writing modes,
452@item Import and export document formats such as HTML, ePub,
453OpenDocument, DocX, and more.
454@end itemize
455
456Additionally Manuskript can help in many more ways with a spell
457checker, markdown highlighter, frequency analyzer, and automatic save
458in plain text file format.")
459 (license license:gpl3+)))
460
2238211a
EF
461(define-public editorconfig-core-c
462 (package
463 (name "editorconfig-core-c")
464 (version "0.12.3")
465 (source
466 (origin
467 (method git-fetch)
468 (uri (git-reference
469 (url "https://github.com/editorconfig/editorconfig-core-c.git")
470 (commit (string-append "v" version))))
471 (file-name (git-file-name name version))
472 (sha256
473 (base32
474 "0jkc69r4jwn4rih6h6cqvgljjc3ff49cxj8286mi515aczr48cm1"))))
475 (build-system cmake-build-system)
476 (arguments
477 '(#:phases
478 (modify-phases %standard-phases
479 (add-after 'unpack 'insert-tests
480 (lambda* (#:key inputs #:allow-other-keys)
481 (let ((tests (assoc-ref inputs "tests")))
482 (copy-recursively tests "tests"))
483 #t)))))
484 (native-inputs
485 `(("tests" ,(origin
486 (method git-fetch)
487 (uri (git-reference
488 (url "https://github.com/editorconfig/editorconfig-core-test")
489 (commit "6ea1d8ece62cac9cf72c79dce4879b046abe1fe7"))) ; matches version
490 (file-name (git-file-name "editorconfig-core-test" version))
491 (sha256
492 (base32
493 "1sf6910idnd4bgzbj8w8f9ldsbkaqa0lh6syymwy3hfqda63acj7"))))))
494 (inputs
495 `(("pcre2" ,pcre2)))
496 (home-page "https://editorconfig.org/")
497 (synopsis "EditorConfig core library written in C")
498 (description "EditorConfig makes it easy to maintain the correct coding
499style when switching between different text editors and between different
500projects. The EditorConfig project maintains a file format and plugins for
501various text editors which allow this file format to be read and used by those
502editors.")
503 (license license:bsd-2)))
75a137da
AE
504
505(define-public texmacs
506 (package
507 (name "texmacs")
ad9fd1ba 508 (version "1.99.11")
75a137da
AE
509 (source
510 (origin
511 (method url-fetch)
512 (uri (string-append "https://www.texmacs.org/Download/ftp/tmftp/"
513 "source/TeXmacs-" version "-src.tar.gz"))
514 (sha256
ad9fd1ba 515 (base32 "12bp0f34izzqimz49lfpgf4lyz3h45s9xbmk8v6zsawdjki76alg"))
75a137da
AE
516 (modules '((guix build utils)))
517 (snippet
518 '(begin
519 (delete-file-recursively "3rdparty")
520 #t))))
521 (build-system gnu-build-system)
522 (native-inputs
523 `(("pkg-config" ,pkg-config)))
524 (inputs
525 `(("freetype" ,freetype)
526 ("guile" ,guile-1.8)
527 ("perl" ,perl)
528 ("python" ,python-wrapper)
529 ("qt" ,qt-4)))
530 (arguments
ad9fd1ba 531 `(#:tests? #f ; no check target
75a137da
AE
532 #:phases
533 (modify-phases %standard-phases
534 (add-before 'configure 'gzip-flags
535 (lambda _
536 (substitute* "Makefile.in"
537 (("^GZIP = gzip -f") "GZIP = gzip -f -n")))))))
538 (synopsis "Editing platform with special features for scientists")
539 (description
540 "GNU TeXmacs is a text editing platform which is specialized for
541scientists. It is ideal for editing structured documents with different
542types of content. It has robust support for mathematical formulas and plots.
543 It can also act as an interface to external mathematical programs such as R
544and Octave. TeXmacs is completely extensible via Guile.")
545 (license license:gpl3+)
546 (home-page "https://www.texmacs.org/tmweb/home/welcome.en.html")))
c55cd98c
NG
547
548(define-public scintilla
549 (package
550 (name "scintilla")
ddc291d7 551 (version "4.2.2")
c55cd98c
NG
552 (source (origin
553 (method url-fetch)
554 (uri (let ((v (apply string-append (string-split version #\.))))
555 (string-append
556 "https://www.scintilla.org/scintilla" v ".tgz")))
557 (sha256
558 (base32
ddc291d7 559 "01gq31ggvasw4sy9xs544h7v1dmxrlxs5bzxpasqb9yi3ps3nl0f"))))
c55cd98c
NG
560 (build-system gnu-build-system)
561 (arguments
562 `(#:make-flags (list "GTK3=1" "CC=gcc" "-Cgtk")
563 #:tests? #f ;require un-packaged Pyside
564 #:phases
565 (modify-phases %standard-phases
566 (delete 'configure) ;no configure script
567 (add-after 'unpack 'build-shared-library
568 (lambda _
569 (substitute* "gtk/makefile"
570 (("scintilla\\.a") "libscintilla.so")
571 (("\\$\\(AR\\) \\$\\(ARFLAGS\\) \\$@ \\$\\^")
572 "$(CC) -shared $^ -o $@")
573 (("\\$\\(RANLIB\\) \\$@") ""))
574 #t))
c55cd98c
NG
575 (replace 'install
576 (lambda* (#:key outputs #:allow-other-keys)
577 (let* ((out (assoc-ref outputs "out"))
578 (lib (string-append out "/lib"))
579 (include (string-append out "/include")))
580 (install-file "bin/libscintilla.so" lib)
581 (for-each (lambda (f) (install-file f include))
582 (find-files "include/" "."))
583 #t))))))
584 (native-inputs
dee632a8
NG
585 `(("pkg-config" ,pkg-config)
586 ("python" ,python-wrapper)))
c55cd98c
NG
587 (inputs
588 `(("gtk+" ,gtk+)))
589 (home-page "https://www.scintilla.org/")
590 (synopsis "Code editor for GTK+")
591 (description "Scintilla is a source code editing component for
592GTK+. It has the usual features found in text editing components, as
593well as some that are especially useful for editing and debugging
594source code; these include support for syntax styling, error
595indicators, code completion and call tips. Styling choices are more
596open than with many editors: Scintilla lets you use proportional
597fonts, bold and italics, multiple foreground and background colours,
598and multiple fonts.")
599 (license license:hpnd)))
2363ed01
NG
600
601(define-public geany
602 (package
603 (name "geany")
40e513fe 604 (version "1.36")
2363ed01
NG
605 (source (origin
606 (method url-fetch)
607 (uri (string-append "https://download.geany.org/"
608 "geany-" version ".tar.bz2"))
609 (sha256
610 (base32
40e513fe 611 "0gnm17cr4rf3pmkf0axz4a0fxwnvp55ji0q0lzy88yqbshyxv14i"))
2363ed01
NG
612 (modules '((guix build utils)))
613 (snippet '(begin
614 (delete-file-recursively "scintilla")
615 #t))))
616 (build-system gnu-build-system)
617 (native-inputs
618 `(("autoconf" ,autoconf)
619 ("automake" ,automake)
620 ("doxygen" ,doxygen)
621 ("glib" ,glib "bin")
622 ("intltool" ,intltool)
623 ("libtool" ,libtool)
624 ("pkg-config" ,pkg-config)
625 ("python-docutils" ,python-docutils))) ;for rst2html
626 (inputs
627 `(("gtk+" ,gtk+)
628 ("scintilla" ,scintilla)))
629 (arguments
630 `(#:phases
631 (modify-phases %standard-phases
632 (add-after 'unpack 'use-scintilla-shared-library
633 (lambda* (#:key inputs #:allow-other-keys)
634 (substitute* "configure.ac"
635 (("scintilla/Makefile") "")
636 (("scintilla/include/Makefile") ""))
637 (substitute* "Makefile.am"
638 (("scintilla ") ""))
639 (substitute* "src/Makefile.am"
640 (("\\$\\(top_builddir\\)/scintilla/libscintilla.la") "")
641 (("geany_LDFLAGS =" all) (string-append all " -lscintilla")))
642 (substitute* "doc/Makefile.am"
643 (("\\$\\(INSTALL_DATA\\) \\$\\(top_srcdir\\)/scintilla/License.txt \\$\\(DOCDIR\\)/ScintillaLicense.txt") ""))
40e513fe
NG
644 (substitute* "tests/Makefile.am"
645 (("AM_LDFLAGS =" all) (string-append all " -lscintilla")))
2363ed01
NG
646 (for-each delete-file (list "autogen.sh" "configure" "Makefile.in"))
647 #t)))))
648 (home-page "https://www.geany.org")
649 (synopsis "Fast and lightweight IDE")
650 (description "Geany is a small and fast Integrated Development
651Environment (IDE) that only has a few dependencies on other packages and is as
652independent as possible from special desktop environments like KDE or GNOME.
653
654The basic features of Geany are:
655@itemize
656@item syntax highlighting
657@item code completion
658@item auto completion of often constructed constructs like if, for and while
659@item auto completion of XML and HTML tags
660@item call tips
661@item folding
662@item many supported filetypes like C, Java, PHP, HTML, Python, Perl, Pascal
663@item symbol lists
664@item embedded terminal emulation
665@item extensibility through plugins
666@end itemize")
667 (license license:gpl2+)))
2207d522
NG
668
669(define-public fe
670 (package
671 (name "fe")
672 ;; Stable release is 1.8. However, this development version
673 ;; introduces support for UTF-8.
674 (version "2.0")
675 (source (origin
676 (method url-fetch)
677 (uri (string-append "http://www.moria.de/~michael/fe/"
678 "fe-" version ".tar.gz"))
679 (sha256
680 (base32
681 "1hwws7si1752z6hp61zxznvgsb6846lp8zl1hn5ddhsbafwalwb9"))))
682 (build-system gnu-build-system)
683 (arguments
684 `(#:tests? #f ;no test
685 ;; Sendmail is only used to send a crash log. Disable the
686 ;; feature since it is (1) undocumented (2) not very useful.
687 #:configure-flags (list "--disable-sendmail")
688 #:phases
689 (modify-phases %standard-phases
690 (add-after 'install 'install-doc
691 (lambda* (#:key outputs #:allow-other-keys)
692 (let* ((out (assoc-ref outputs "out"))
693 (doc (string-append out "/share/doc/" ,name "-" ,version)))
694 (for-each (lambda (f) (install-file f doc))
695 '("fe.doc" "fe.html" "fe.ps" "feref.ps" "README"))
696 #t))))))
697 (native-inputs
698 `(("gettext" ,gettext-minimal)))
699 (inputs
700 `(("ncurses" ,ncurses)))
701 (home-page "http://www.moria.de/~michael/fe/")
702 (synopsis "Small folding editor")
703 (description "Fe is a small folding editor. It allows to fold
704arbitrary text regions; it is not bound to syntactic units.
705
706Fe has no configuration or extension language and requires no setup.
99ce2055 707Its user interface is emacs-like and it has menus for the very most
2207d522
NG
708important functions to help beginners. Further there is a reference
709card. It offers:
710
711@itemize
712@item Regions and Emacs-like kill ring
713@item Incremental search
714@item Keyboard macros
715@item Editing binary files
716@item Multiple windows and views
717@item Compose function for Latin 1 characters
718@end itemize")
719 (license license:gpl2+)))