gnu: emacspeak: Fix Tclx and espeak server loading.
[jackhill/guix/guix.git] / gnu / packages / terminals.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020, 2021 Efraim Flashner <efraim@flashner.co.il>
3 ;;; Copyright © 2016 Mckinley Olsen <mck.olsen@gmail.com>
4 ;;; Copyright © 2016, 2017, 2019 Alex Griffin <a@ajgrf.com>
5 ;;; Copyright © 2016 David Craven <david@craven.ch>
6 ;;; Copyright © 2016, 2017, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
7 ;;; Copyright © 2016, 2017 José Miguel Sánchez García <jmi2k@openmailbox.org>
8 ;;; Copyright © 2017–2021 Tobias Geerinckx-Rice <me@tobias.gr>
9 ;;; Copyright © 2017 Kei Kebreau <kkebreau@posteo.net>
10 ;;; Copyright © 2017, 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
11 ;;; Copyright © 2017 Petter <petter@mykolab.ch>
12 ;;; Copyright © 2018 Hartmut Goebel <h.goebel@crazy-compilers.com>
13 ;;; Copyright © 2018 Arun Isaac <arunisaac@systemreboot.net>
14 ;;; Copyright © 2018 Gabriel Hondet <gabrielhondet@gmail.com>
15 ;;; Copyright © 2019 Rutger Helling <rhelling@mykolab.com>
16 ;;; Copyright © 2018, 2019 Eric Bavier <bavier@member.fsf.org>
17 ;;; Copyright © 2019 Julien Lepiller <julien@lepiller.eu>
18 ;;; Copyright © 2019 Pierre Langlois <pierre.langlois@gmx.com>
19 ;;; Copyright © 2019, 2020 Brett Gilio <brettg@gnu.org>
20 ;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
21 ;;; Copyright © 2020 Valentin Ignatev <valentignatev@gmail.com>
22 ;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de>
23 ;;; Copyright © 2020, 2021 Marius Bakke <marius@gnu.org>
24 ;;; Copyright © 2020, 2021 Nicolas Goaziou <mail@nicolasgoaziou.fr>
25 ;;; Copyright © 2020 Leo Famulari <leo@famulari.name>
26 ;;; Copyright © 2021 Ekaitz Zarraga <ekaitz@elenq.tech>
27 ;;;
28 ;;; This file is part of GNU Guix.
29 ;;;
30 ;;; GNU Guix is free software; you can redistribute it and/or modify it
31 ;;; under the terms of the GNU General Public License as published by
32 ;;; the Free Software Foundation; either version 3 of the License, or (at
33 ;;; your option) any later version.
34 ;;;
35 ;;; GNU Guix is distributed in the hope that it will be useful, but
36 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
37 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
38 ;;; GNU General Public License for more details.
39 ;;;
40 ;;; You should have received a copy of the GNU General Public License
41 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
42
43 (define-module (gnu packages terminals)
44 #:use-module ((guix licenses) #:prefix license:)
45 #:use-module (guix build-system cargo)
46 #:use-module (guix build-system cmake)
47 #:use-module (guix build-system gnu)
48 #:use-module (guix build-system glib-or-gtk)
49 #:use-module (guix build-system go)
50 #:use-module (guix build-system meson)
51 #:use-module (guix build-system python)
52 #:use-module (guix download)
53 #:use-module (guix git-download)
54 #:use-module (guix packages)
55 #:use-module (guix utils)
56 #:use-module (gnu packages)
57 #:use-module (gnu packages autotools)
58 #:use-module (gnu packages build-tools) ;for meson-0.55
59 #:use-module (gnu packages check)
60 #:use-module (gnu packages cmake)
61 #:use-module (gnu packages compression)
62 #:use-module (gnu packages crates-io)
63 #:use-module (gnu packages crates-graphics)
64 #:use-module (gnu packages crypto)
65 #:use-module (gnu packages docbook)
66 #:use-module (gnu packages fontutils)
67 #:use-module (gnu packages freedesktop)
68 #:use-module (gnu packages gettext)
69 #:use-module (gnu packages ghostscript)
70 #:use-module (gnu packages gl)
71 #:use-module (gnu packages glib)
72 #:use-module (gnu packages gnome)
73 #:use-module (gnu packages golang)
74 #:use-module (gnu packages gtk)
75 #:use-module (gnu packages image)
76 #:use-module (gnu packages libcanberra)
77 #:use-module (gnu packages libevent)
78 #:use-module (gnu packages linux)
79 #:use-module (gnu packages man)
80 #:use-module (gnu packages ncurses)
81 #:use-module (gnu packages perl)
82 #:use-module (gnu packages perl-check)
83 #:use-module (gnu packages pkg-config)
84 #:use-module (gnu packages popt)
85 #:use-module (gnu packages protobuf)
86 #:use-module (gnu packages python)
87 #:use-module (gnu packages python-web)
88 #:use-module (gnu packages python-xyz)
89 #:use-module (gnu packages qt)
90 #:use-module (gnu packages serialization)
91 #:use-module (gnu packages sphinx)
92 #:use-module (gnu packages ssh)
93 #:use-module (gnu packages textutils)
94 #:use-module (gnu packages xdisorg)
95 #:use-module (gnu packages xml)
96 #:use-module (gnu packages xorg)
97 #:use-module (srfi srfi-26))
98
99 (define-public tilda
100 (package
101 (name "tilda")
102 (version "1.5.4")
103 (source (origin
104 (method git-fetch)
105 (uri (git-reference
106 (url "https://github.com/lanoxx/tilda")
107 (commit (string-append "tilda-" version))))
108 (file-name (git-file-name name version))
109 (sha256
110 (base32
111 "0q2i9ny8sh7zjzgvkx8vcvk593wcvchjc4xq4nrlqdd377r7cg5q"))))
112 (build-system glib-or-gtk-build-system)
113 (arguments
114 `(#:phases
115 (modify-phases %standard-phases
116 (add-after 'unpack 'make-po-writable
117 (lambda _
118 (for-each make-file-writable (find-files "po" "."))
119 #t)))))
120 (native-inputs
121 `(("autoconf" ,autoconf)
122 ("automake" ,automake)
123 ("gettext" ,gettext-minimal)
124 ("pkg-config" ,pkg-config)))
125 (inputs
126 `(("libconfuse" ,libconfuse)
127 ("vte" ,vte)))
128 (synopsis "GTK+-based drop-down terminal")
129 (description "Tilda is a terminal emulator similar to normal terminals like
130 gnome-terminal (GNOME) or Konsole (KDE), with the difference that it drops down
131 from the edge of a screen when a certain configurable hotkey is pressed. This
132 is similar to the built-in consoles in some applications. Tilda is highly
133 configurable through a graphical wizard.")
134 (home-page "https://github.com/lanoxx/tilda")
135 (license license:gpl2+)))
136
137 (define-public termite
138 (package
139 (name "termite")
140 (version "15")
141 (source
142 (origin
143 (method git-fetch)
144 (uri (git-reference
145 (url (string-append "https://github.com/thestinger/"
146 name ".git"))
147 (commit (string-append "v" version))
148 (recursive? #t)))
149 (file-name (string-append name "-" version "-checkout"))
150 (sha256
151 (base32
152 "0hp1x6lj098m3jgna274wv5dv60lnzg22297di68g4hw9djjyd2k"))))
153 (build-system gnu-build-system)
154 (arguments
155 `(#:phases
156 (modify-phases %standard-phases
157 (add-after 'unpack 'patch-xdg-open
158 (lambda _
159 (substitute* "termite.cc"
160 (("xdg-open") (which "xdg-open")))
161 #t))
162 (delete 'configure))
163 #:tests? #f
164 ;; This sets the destination when installing the necessary terminal
165 ;; capability data, which are not provided by 'ncurses'. See
166 ;; <https://lists.gnu.org/archive/html/bug-ncurses/2009-10/msg00031.html>.
167 #:make-flags (list "PREFIX="
168 (string-append "VERSION=v" (version))
169 (string-append "DESTDIR="
170 (assoc-ref %outputs "out")))))
171 (inputs
172 `(("vte" ,vte-ng)
173 ("gtk+" ,gtk+)
174 ("xdg-utils" ,xdg-utils)
175 ("ncurses" ,ncurses)))
176 (native-inputs
177 `(("pkg-config" ,pkg-config)))
178
179 ;; FIXME: This should only be located in 'ncurses'. Nonetheless it is
180 ;; provided for usability reasons. See <https://bugs.gnu.org/22138>.
181 (native-search-paths
182 (list (search-path-specification
183 (variable "TERMINFO_DIRS")
184 (files '("share/terminfo")))))
185 (home-page "https://github.com/thestinger/termite/")
186 (synopsis "Keyboard-centric, VTE-based terminal")
187 (description "Termite is a minimal terminal emulator designed for use with
188 tiling window managers. It is a modal application, similar to Vim, with an
189 insert mode and command mode where keybindings have different functions.")
190
191 ;; Files under util/ are under the Expat license; the rest is LGPLv2+.
192 (license license:lgpl2.0+)))
193
194 (define-public asciinema
195 (package
196 (name "asciinema")
197 (version "2.0.2")
198 (source
199 (origin
200 (method git-fetch)
201 (uri (git-reference
202 (url "https://github.com/asciinema/asciinema")
203 (commit (string-append "v" version))))
204 (file-name (git-file-name name version))
205 (sha256
206 (base32
207 "1a2pysxnp6icyd08mgf66xr6f6j0irnfxdpf3fmzcz31ix7l9kc4"))))
208 (build-system python-build-system)
209 (arguments
210 `(#:phases
211 (modify-phases %standard-phases
212 (add-before 'build 'patch-exec-paths
213 (lambda* (#:key inputs #:allow-other-keys)
214 (let ((ncurses (assoc-ref inputs "ncurses")))
215 (substitute* "asciinema/term.py"
216 (("'tput'")
217 (string-append "'" ncurses "/bin/tput'"))))
218 #t))
219 (replace 'check
220 (lambda _ (invoke "nosetests" "-v"))))))
221 (inputs `(("ncurses" ,ncurses)))
222 (native-inputs
223 ;; For tests.
224 `(("python-nose" ,python-nose)))
225 (home-page "https://asciinema.org")
226 (synopsis "Terminal session recorder")
227 (description
228 "Use asciinema to record and share your terminal sessions, the right way.
229 Forget screen recording apps and blurry video. Enjoy a lightweight, purely
230 text-based approach to terminal recording.")
231 (license license:gpl3)))
232
233 (define-public libtsm
234 (let ((commit "f70e37982f382b03c6939dac3d5f814450bda253")
235 (revision "1"))
236 (package
237 (name "libtsm")
238 (version (git-version "0.0.0" revision commit))
239 (source
240 (origin
241 (method git-fetch)
242 ;; The freedesktop repository is no longer maintained.
243 (uri (git-reference
244 (url (string-append "https://github.com/Aetf/" name))
245 (commit commit)))
246 (file-name (git-file-name name version))
247 (sha256
248 (base32 "0mwn91i5h5d518i1s05y7hzv6bc13vzcvxszpfh77473iwg4wprx"))
249 (modules '((guix build utils)))
250 (snippet
251 '(begin
252 ;; Remove a bundled copy of libxkbcommon's xkbcommon-keysyms.h.
253 (delete-file-recursively "external/xkbcommon")
254 #t))))
255 (build-system cmake-build-system)
256 (arguments
257 `(#:configure-flags '("-DBUILD_TESTING=ON")))
258 (native-inputs
259 `(("check" ,check)
260 ("libxkbcommon" ,libxkbcommon) ; for xkbcommon-keysyms.h
261 ("pkg-config" ,pkg-config)))
262 (synopsis "Xterm state machine library")
263 (description "TSM is a state machine for DEC VT100-VT520 compatible
264 terminal emulators. It tries to support all common standards while keeping
265 compatibility to existing emulators like xterm, gnome-terminal, konsole, etc.")
266 (home-page "https://www.freedesktop.org/wiki/Software/libtsm")
267 ;; Hash table implementation is lgpl2.1+ licensed.
268 ;; The wcwidth implementation in external/wcwidth.{h,c} uses a license
269 ;; derived from ISC.
270 ;; UCS-4 to UTF-8 encoding is copied from "terminology" which is released
271 ;; under the bsd 2 license.
272 (license (list license:expat license:lgpl2.1+ license:isc license:bsd-2)))))
273
274 (define-public kmscon
275 (let ((commit "01dd0a231e2125a40ceba5f59fd945ff29bf2cdc")
276 (revision "1"))
277 (package
278 (name "kmscon")
279 (version (git-version "0.0.0" revision commit))
280 (source (origin
281 (method git-fetch)
282 ;; The freedesktop repository is no longer maintained.
283 (uri (git-reference
284 (url (string-append "https://github.com/Aetf/" name))
285 (commit commit)))
286 (sha256
287 (base32
288 "0q62kjsvy2iwy8adfiygx2bfwlh83rphgxbis95ycspqidg9py87"))
289 (patches
290 (search-patches "kmscon-runtime-keymap-switch.patch"))
291 (modules '((guix build utils)))
292 (file-name (git-file-name name version))))
293 (build-system gnu-build-system)
294 (arguments
295 `(;; The closure of MESA is huge so we'd rather avoid it.
296 #:disallowed-references (,mesa)
297
298 #:phases (modify-phases %standard-phases
299 ;; Use elogind instead of systemd.
300 (add-before 'configure 'remove-systemd
301 (lambda _
302 (substitute* "configure"
303 (("libsystemd-daemon libsystemd-login")
304 "libelogind"))
305 (substitute* "src/uterm_systemd.c"
306 (("#include <systemd/sd-login.h>")
307 "#include <elogind/sd-login.h>")
308 ;; We don't have this header.
309 (("#include <systemd/sd-daemon\\.h>")
310 "")
311 ;; Replace the call to 'sd_booted' by the truth value.
312 (("sd_booted\\(\\)")
313 "1")))))))
314 (native-inputs
315 `(("pkg-config" ,pkg-config)
316 ("autoconf" ,autoconf)
317 ("automake" ,automake)
318 ("libtool" ,libtool)
319 ("libxslt" ,libxslt) ;to build the man page
320 ("libxml2" ,libxml2) ;for XML_CATALOG_FILES
321 ("docbook-xsl" ,docbook-xsl)))
322 (inputs
323 `(("libdrm" ,libdrm)
324 ("libtsm" ,libtsm)
325 ("libxkbcommon" ,libxkbcommon)
326 ("logind" ,elogind)
327 ;; MESA can be used for accelerated video output via OpenGLESv2, but
328 ;; it's a bit dependency that we'd rather avoid in the installation
329 ;; image.
330 ;; ("mesa" ,mesa)
331 ("pango" ,pango)
332 ("udev" ,eudev)))
333 (synopsis "Linux KMS-based terminal emulator")
334 (description "Kmscon is a terminal emulator based on Linux's @dfn{kernel
335 mode setting} (KMS). It can replace the in-kernel virtual terminal (VT)
336 implementation with a user-space console. Compared to the Linux console,
337 kmscon provides enhanced features including XKB-compatible internationalized
338 keyboard support, UTF-8 input/font support, hardware-accelerated rendering,
339 multi-seat support, a replacement for @command{mingetty}, and more.")
340 (home-page "https://www.freedesktop.org/wiki/Software/kmscon")
341 ;; Hash table implementation is lgpl2.1+ licensed.
342 ;; The wcwidth implementation in external/wcwidth.{h,c} uses a license
343 ;; derived from ISC.
344 ;; UCS-4 to UTF-8 encoding is copied from "terminology" which is released
345 ;; under the bsd 2 license.
346 ;; Unifont-Font is from http://unifoundry.com/unifont.html and licensed
347 ;; under the terms of the GNU GPL.
348 (license (list license:expat license:lgpl2.1+ license:bsd-2
349 license:gpl2+))
350 (supported-systems (filter (cut string-suffix? "-linux" <>)
351 %supported-systems)))))
352
353 (define-public libtermkey
354 (package
355 (name "libtermkey")
356 (version "0.22")
357 (source (origin
358 (method url-fetch)
359 (uri (string-append "http://www.leonerd.org.uk/code/libtermkey/"
360 "libtermkey-" version ".tar.gz"))
361 (sha256
362 (base32 "002606rrxh5f6l6jrikl0dyxsknscdamq10av21xm0xa98ybsib9"))))
363 (build-system gnu-build-system)
364 (arguments
365 `(#:make-flags (list
366 (string-append "CC=" ,(cc-for-target))
367 (string-append "PREFIX=" (assoc-ref %outputs "out")))
368 #:phases
369 (modify-phases %standard-phases
370 (delete 'configure) ; no configure script
371 (add-before 'check 'patch-failing-test
372 ;; XXX This undoes an upstream change in version 0.22 which ‘ensures
373 ;; that the hooked function can invent TI strings for new terminal
374 ;; types’. That fails in the build environment. Why?
375 (lambda _
376 (substitute* "t/40ti-override.c"
377 (("vt750") "vt100")))))
378 #:test-target "test"))
379 (inputs `(("ncurses" ,ncurses)))
380 (native-inputs `(("libtool" ,libtool)
381 ("perl-test-harness" ,perl-test-harness)
382 ("pkg-config" ,pkg-config)))
383 (synopsis "Keyboard entry processing library for terminal-based programs")
384 (description
385 "Libtermkey handles all the necessary logic to recognise special keys, UTF-8
386 combining, and so on, with a simple interface.")
387 (home-page "http://www.leonerd.org.uk/code/libtermkey")
388 (license license:expat)))
389
390 (define-public picocom
391 (package
392 (name "picocom")
393 (version "3.1")
394 (source (origin
395 (method git-fetch)
396 (uri (git-reference
397 (url "https://github.com/npat-efault/picocom")
398 (commit version)))
399 (file-name (git-file-name name version))
400 (sha256
401 (base32
402 "1vvjydqf0ax47nvdyyl67jafw5b3sfsav00xid6qpgia1gs2r72n"))))
403 (build-system gnu-build-system)
404 (arguments
405 `(#:make-flags (list (string-append "CC=" ,(cc-for-target)))
406 #:tests? #f ; no tests
407 #:phases
408 (modify-phases %standard-phases
409 (delete 'configure) ; no configure script
410 (replace 'install
411 ;; The Makefile lacks an ‘install’ target.
412 (lambda* (#:key outputs #:allow-other-keys)
413 (let* ((out (assoc-ref outputs "out"))
414 (bin (string-append out "/bin"))
415 (man (string-append out "/share/man/man1")))
416 (install-file "picocom" bin)
417 (install-file "picocom.1" man)))))))
418 (home-page "https://github.com/npat-efault/picocom")
419 (synopsis "Minimal dumb-terminal emulator")
420 (description
421 "Picocom is a minimal dumb-terminal emulation program. It was designed to
422 serve as a simple and manual modem configuration, testing, and debugging tool.
423 It also serves well as a low-tech serial communications program to allow access
424 to all types of devices that provide serial consoles.")
425 (license license:gpl2+)))
426
427 (define-public beep
428 (package
429 (name "beep")
430 (version "1.4.9")
431 (source
432 (origin
433 (method git-fetch)
434 (uri (git-reference
435 ;; The original beep 1.3 at <http://www.johnath.com/beep> has been
436 ;; unmaintained for some time, and vulnerable to at least two CVEs:
437 ;; https://github.com/johnath/beep/issues/11#issuecomment-454056858
438 ;; Use this maintained fork instead.
439 (url "https://github.com/spkr-beep/beep")
440 (commit (string-append "v" version))))
441 (file-name (git-file-name name version))
442 (sha256
443 (base32 "0jmvqk6g5n0wzj9znw42njxq3mzw1769f4db99b83927hf4aidi4"))))
444 (build-system gnu-build-system)
445 (arguments
446 `(#:tests? #f ; no tests
447 #:make-flags
448 (list (string-append "prefix=" (assoc-ref %outputs "out"))
449 (string-append "pkgdocdir=$(docdir)/" ,name "-" ,version))
450 #:phases
451 (modify-phases %standard-phases
452 (delete 'configure)))) ; no configure script
453 (synopsis "Linux command-line utility to control the PC speaker")
454 (description "beep allows the user to control the PC speaker with precision,
455 allowing different sounds to indicate different events. While it can be run
456 quite happily on the command line, its intended place of residence is within
457 scripts, notifying the user when something interesting occurs. Of course, it
458 has no notion of what's interesting, but it's very good at that notifying part.")
459 (home-page "https://github.com/spkr-beep/beep")
460 (license license:gpl2+)))
461
462 (define-public unibilium
463 (package
464 (name "unibilium")
465 (version "2.0.0")
466 (source
467 (origin
468 (method git-fetch)
469 (uri (git-reference
470 (url "https://github.com/mauke/unibilium")
471 (commit (string-append "v" version))))
472 (file-name (git-file-name name version))
473 (sha256
474 (base32
475 "1wa9a32wzqnxqh1jh554afj13dzjr6mw2wzqzw8d08nza9pg2ra2"))))
476 (build-system gnu-build-system)
477 (arguments
478 `(#:make-flags
479 (list "CC=gcc"
480 (string-append "PREFIX=" (assoc-ref %outputs "out")))
481 #:test-target "test"
482 ;; FIXME: tests require "prove"
483 #:tests? #f
484 #:phases
485 (modify-phases %standard-phases
486 (delete 'configure))))
487 (native-inputs
488 `(("libtool" ,libtool)
489 ("perl" ,perl)))
490 (home-page "https://github.com/mauke/unibilium")
491 (synopsis "Terminfo parsing library")
492 (description "Unibilium is a basic C terminfo library. It doesn't depend
493 on curses or any other library. It also doesn't use global variables, so it
494 should be thread-safe.")
495 (license license:lgpl3+)))
496
497 (define-public libvterm
498 (package
499 (name "libvterm")
500 (version "0.1.4")
501 (source
502 (origin
503 (method url-fetch)
504 (uri (string-append "http://www.leonerd.org.uk/code/libvterm/"
505 "libvterm-" version ".tar.gz"))
506 (sha256
507 (base32
508 "1pfkhbbihd2kvaza707vl2nvk7bxaawmb37wf9v6d72mjng38w5w"))))
509 (build-system gnu-build-system)
510 (arguments
511 `(#:make-flags
512 (list "CC=gcc"
513 (string-append "PREFIX=" (assoc-ref %outputs "out")))
514 #:test-target "test"
515 #:phases
516 (modify-phases %standard-phases
517 (delete 'configure))))
518 (native-inputs
519 `(("libtool" ,libtool)
520 ("perl" ,perl)))
521 (home-page "http://www.leonerd.org.uk/code/libvterm/")
522 (synopsis "VT220/xterm/ECMA-48 terminal emulator library")
523 (description "Libvterm is an abstract C99 library which implements a VT220
524 or xterm-like terminal emulator. It doesn't use any particular graphics
525 toolkit or output system, instead it invokes callback function pointers that
526 its embedding program should provide it to draw on its behalf. It avoids
527 calling @code{malloc} during normal running state, allowing it to be used in
528 embedded kernel situations.")
529 (license license:expat)))
530
531 (define-public cool-retro-term
532 (let ((commit "1.1.1")
533 (revision "0")) ;not used currently
534 (package
535 (name "cool-retro-term")
536 (version "1.1.1")
537 (source (origin
538 (method git-fetch)
539 (file-name (string-append name "-" version "-checkout"))
540 (uri (git-reference
541 (url (string-append "https://github.com/Swordfish90/" name))
542 (commit commit)
543 (recursive? #t)))
544 (sha256
545 (base32 "0wb6anchxa5jpn9c73kr4byrf2xlj8x8qzc5x7ny6saj7kbbvp75"))
546 (modules '((guix build utils)
547 (srfi srfi-1)
548 (srfi srfi-26)
549 (ice-9 rdelim)
550 (ice-9 regex)))
551 (snippet
552 '(let* ((fonts '(;"1971-ibm-3278" ; BSD 3-clause
553 "1977-apple2" ; Non-Free
554 "1977-commodore-pet" ; Non-Free
555 "1979-atari-400-800" ; Non-Free
556 ;"1981-ibm-pc ; CC-SA 4.0
557 "1982-commodore64")) ; Non-Free
558 ;"1985-ibm-pc-vga" ; CC-SA 4.0
559 ;"modern-fixedsys-excelsior" ; Redistributable
560 ;"modern-hermit" ; SIL
561 ;"modern-inconsolata"; SIL
562 ;"modern-pro-font-win-tweaked" ; X11
563 ;"modern-proggy-tiny"; X11
564 ;"modern-terminus" ; SIL
565 (name-rx (make-regexp " *name: *\"([^\"]*)\""))
566 (source-rx (make-regexp " *source: \"fonts/([^/]*)[^\"]*\""))
567 (fontname-rx (make-regexp "\"fontName\":\"([^\"]*).*"))
568 (names
569 ;; Gather font names from all Fonts*.qml files.
570 ;; These will be used to remove items from the
571 ;; default profiles.
572 (fold
573 (lambda (font-file names)
574 (call-with-input-file font-file
575 (lambda (port)
576 (let loop ((name #f) (names names))
577 (let ((line (read-line port)))
578 (cond
579 ((eof-object? line) (pk 'names names))
580 ((regexp-exec name-rx line)
581 => (lambda (m)
582 (loop (match:substring m 1) names)))
583 ((regexp-exec source-rx line)
584 => (lambda (m)
585 (let ((font (match:substring m 1)))
586 (if (member font fonts)
587 (loop #f (lset-adjoin string=?
588 names name))
589 (loop #f names)))))
590 (else (loop name names))))))))
591 '() (find-files "app/qml" "Font.*\\.qml"))))
592 ;; Remove the font files themselves
593 (for-each (lambda (font)
594 (delete-file-recursively
595 (string-append "app/qml/fonts/" font)))
596 fonts)
597 ;; Remove mention of those fonts in the source
598 (substitute* "app/qml/resources.qrc"
599 (((string-append " *<file>fonts/("
600 (string-join fonts "|")
601 ").*"))
602 ""))
603 (for-each
604 (lambda (file)
605 (let ((start-rx (make-regexp " *ListElement\\{"))
606 (end-rx (make-regexp " *\\}")))
607 (with-atomic-file-replacement file
608 (lambda (in out)
609 (let loop ((line-buffer '())
610 (hold? #f)
611 (discard? #f))
612 (let ((line (read-line in 'concat)))
613 (cond
614 ((eof-object? line) #t) ;done
615 ((regexp-exec start-rx line)
616 (loop (cons line line-buffer) #t #f))
617 ((or (regexp-exec source-rx line)
618 (regexp-exec fontname-rx line))
619 => (lambda (m)
620 (let ((font-or-name (match:substring m 1)))
621 (if (or (member font-or-name fonts)
622 (member font-or-name names))
623 (loop '() #f #t)
624 (loop (cons line line-buffer)
625 hold? #f)))))
626 ((regexp-exec end-rx line)
627 (unless discard?
628 (for-each (cut display <> out)
629 (reverse line-buffer))
630 (display line out))
631 (loop '() #f #f))
632 (hold? (loop (cons line line-buffer)
633 hold? discard?))
634 (discard? (loop line-buffer #f #t))
635 (else (display line out)
636 (loop '() #f #f)))))))))
637 '("app/qml/FontPixels.qml"
638 "app/qml/FontScanlines.qml"
639 "app/qml/Fonts.qml"
640 "app/qml/ApplicationSettings.qml"))
641 ;; Final substitution for default scanline and pixel fonts
642 (substitute* "app/qml/ApplicationSettings.qml"
643 (("COMMODORE_PET") "PROGGY_TINY"))
644 #t))))
645 (build-system gnu-build-system)
646 (inputs
647 `(("qtbase" ,qtbase)
648 ("qtdeclarative" ,qtdeclarative)
649 ("qtgraphicaleffects" ,qtgraphicaleffects)
650 ("qtquickcontrols" ,qtquickcontrols)))
651 (arguments
652 `(#:phases
653 (modify-phases %standard-phases
654 (replace 'configure
655 (lambda* (#:key outputs #:allow-other-keys)
656 (let ((out (assoc-ref outputs "out")))
657 (substitute* '("qmltermwidget/qmltermwidget.pro")
658 (("INSTALL_DIR = \\$\\$\\[QT_INSTALL_QML\\]")
659 (string-append "INSTALL_DIR = " out "/lib/qt5/qml")))
660 (substitute* '("cool-retro-term.pro" "app/app.pro")
661 (("/usr") out))
662 (invoke "qmake"))))
663 (add-after 'install 'wrap-executable
664 (lambda* (#:key inputs outputs #:allow-other-keys)
665 (let ((out (assoc-ref outputs "out"))
666 (qml "/lib/qt5/qml"))
667 (wrap-program (string-append out "/bin/cool-retro-term")
668 `("QML2_IMPORT_PATH" ":" prefix
669 (,(string-append out qml)
670 ,@(map (lambda (i)
671 (string-append (assoc-ref inputs i) qml))
672 '("qtdeclarative"
673 "qtgraphicaleffects"
674 "qtquickcontrols")))))
675 #t)))
676 (add-after 'install 'add-alternate-name
677 (lambda* (#:key outputs #:allow-other-keys)
678 (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
679 (symlink (string-append bin "/cool-retro-term")
680 (string-append bin "/crt"))
681 #t)))
682 (add-after 'install 'install-man
683 (lambda* (#:key outputs #:allow-other-keys)
684 (let ((mandir (string-append (assoc-ref outputs "out")
685 "/share/man/man1")))
686 (install-file "packaging/debian/cool-retro-term.1" mandir)
687 #t))))))
688 (synopsis "Terminal emulator")
689 (description
690 "Cool-retro-term (crt) is a terminal emulator which mimics the look and
691 feel of the old cathode ray tube (CRT) screens. It has been designed to be
692 eye-candy, customizable, and reasonably lightweight.")
693 (home-page "https://github.com/Swordfish90/cool-retro-term")
694 (license (list
695 license:gpl2+ ; qmltermwidget
696 license:gpl3+ ; cool-retro-term
697 ;; Fonts
698 license:silofl1.1
699 license:x11
700 license:bsd-3)))))
701
702 (define-public foot
703 (package
704 (name "foot")
705 (version "1.6.3")
706 (home-page "https://codeberg.org/dnkl/foot")
707 (source (origin
708 (method git-fetch)
709 (uri (git-reference (url home-page) (commit version)))
710 (file-name (git-file-name name version))
711 (sha256
712 (base32
713 "0rm7w29wf3gipf69qf7s42qw8857z74gsigrpz9g6vvd1x58f03m"))))
714 (build-system meson-build-system)
715 (arguments
716 `(#:meson ,meson-0.55
717 ;; Using a "release" build is recommended both for performance, and
718 ;; also to address a GCC 10 issue when doing PGO builds.
719 #:build-type "release"
720 ;; Enable LTO as recommended by INSTALL.md.
721 #:configure-flags '("-Db_lto=true")))
722 (native-inputs
723 `(("ncurses" ,ncurses) ;for 'tic'
724 ("pkg-config" ,pkg-config)
725 ("scdoc" ,scdoc)
726 ("wayland-protocols" ,wayland-protocols)))
727 (inputs
728 `(("fcft" ,fcft)
729 ("libxkbcommon" ,libxkbcommon)
730 ("wayland" ,wayland)))
731 (synopsis "Wayland-native terminal emulator")
732 (description
733 "@command{foot} is a terminal emulator for systems using the Wayland
734 display server. It is designed to be fast, lightweight, and independent of
735 desktop environments. It can be used as a standalone terminal and also has
736 a server/client mode.")
737 (license license:expat)))
738
739 (define-public sakura
740 (package
741 (name "sakura")
742 (version "3.7.1")
743 (source (origin
744 (method url-fetch)
745 (uri (string-append "https://launchpad.net/sakura/trunk/"
746 version "/+download/sakura-" version
747 ".tar.bz2"))
748 (sha256
749 (base32
750 "12wjmckf03qbnm8cb7qma0980anzajn3l92rj2yr8hhafl74x6kj"))))
751 (build-system cmake-build-system)
752 (arguments
753 '(#:tests? #f)) ; no check phase
754 (native-inputs
755 `(("gettext" ,gettext-minimal)
756 ("perl" ,perl) ; for pod2man
757 ("pkg-config" ,pkg-config)))
758 (inputs
759 `(("libxft" ,libxft)
760 ("vte" ,vte)))
761 (home-page "https://launchpad.net/sakura")
762 (synopsis "A simple but powerful libvte-based terminal emulator")
763 (description "@code{Sakura} is a terminal emulator based on GTK+ and VTE.
764 It's a terminal emulator with few dependencies, so you don't need a full GNOME
765 desktop installed to have a decent terminal emulator.")
766 (license license:gpl2)))
767
768 (define-public go-github.com-nsf-termbox-go
769 (let ((commit "288510b9734e30e7966ec2f22b87c5f8e67345e3")
770 (revision "1"))
771 (package
772 (name "go-github.com-nsf-termbox-go")
773 (version (git-version "0.0.0" revision commit))
774 (source (origin
775 (method git-fetch)
776 (uri (git-reference
777 (url "https://github.com/nsf/termbox-go")
778 (commit commit)))
779 (file-name (git-file-name name version))
780 (sha256
781 (base32
782 "0hdyisfaf8yb55h3p03p4sbq19546mp9fy28f2kn659mycmhxqk4"))))
783 (build-system go-build-system)
784 (arguments
785 '(#:import-path "github.com/nsf/termbox-go"))
786 (propagated-inputs
787 `(("go-github.com-mattn-go-runewidth"
788 ,go-github.com-mattn-go-runewidth)))
789 (synopsis "@code{termbox} provides a minimal API for text-based user
790 interfaces")
791 (description
792 "Termbox is a library that provides a minimalistic API which allows the
793 programmer to write text-based user interfaces.")
794 (home-page "https://github.com/nsf/termbox-go")
795 (license license:expat))))
796
797 (define-public go-github-com-junegunn-fzf
798 (package
799 (name "go-github-com-junegunn-fzf")
800 (version "0.25.0")
801 (source
802 (origin
803 (method git-fetch)
804 (uri (git-reference
805 (url "https://github.com/junegunn/fzf")
806 (commit version)))
807 (file-name (git-file-name name version))
808 (sha256
809 (base32
810 "1j5bfxl4w8w3n89p051y8dhxg0py9l98v7r2gkr63bg4lj32faz8"))))
811 (build-system go-build-system)
812 (arguments
813 `(#:import-path "github.com/junegunn/fzf"))
814 (inputs
815 `(("go-github.com-mattn-go-runewidth" ,go-github.com-mattn-go-runewidth)
816 ("go-github-com-mattn-go-shellwords" ,go-github-com-mattn-go-shellwords)
817 ("go-github-com-mattn-go-isatty" ,go-github-com-mattn-go-isatty)
818 ("go-github-com-gdamore-tcell" ,go-github-com-gdamore-tcell)
819 ("go-github-com-saracen-walker" ,go-github-com-saracen-walker)
820 ("go-golang.org-x-sync-errgroup" ,go-golang.org-x-sync-errgroup)
821 ("go-golang-org-x-crypto" ,go-golang-org-x-crypto)))
822 (home-page "https://github.com/junegunn/fzf")
823 (synopsis "Command-line fuzzy-finder")
824 (description "This package provides an interactive command-line filter
825 usable with any list--including files, command history, processes and more.")
826 (license license:expat)))
827
828 (define-public fzf
829 (package
830 (inherit go-github-com-junegunn-fzf)
831 (name "fzf")
832 (arguments
833 (ensure-keyword-arguments
834 (package-arguments go-github-com-junegunn-fzf)
835 `(#:phases
836 (modify-phases %standard-phases
837 (add-after 'install 'copy-binaries
838 (lambda* (#:key outputs #:allow-other-keys)
839 (let ((out (assoc-ref outputs "out")))
840 (with-directory-excursion "src/github.com/junegunn/fzf"
841 (install-file "bin/fzf-tmux"
842 (string-append out "/bin"))))))
843 (add-after 'copy-binaries 'wrap-programs
844 (lambda* (#:key outputs inputs #:allow-other-keys)
845 (let ((out (assoc-ref outputs "out"))
846 (ncurses (assoc-ref inputs "ncurses")))
847 (wrap-program (string-append out "/bin/fzf-tmux")
848 `("PATH" ":" prefix (,(string-append ncurses "/bin")))))))
849 (add-after 'install 'install-completions
850 (lambda* (#:key outputs #:allow-other-keys)
851 (let* ((out (assoc-ref outputs "out"))
852 (bash-completion (string-append out "/etc/bash_completion.d"))
853 (zsh-completion (string-append out "/share/zsh/site-functions")))
854 (with-directory-excursion "src/github.com/junegunn/fzf"
855 (mkdir-p bash-completion)
856 (copy-file "shell/completion.bash"
857 (string-append bash-completion "/fzf"))
858 (mkdir-p zsh-completion)
859 (copy-file "shell/completion.zsh"
860 (string-append zsh-completion "/_fzf"))))))))))
861 (inputs
862 `(,@(package-inputs go-github-com-junegunn-fzf)
863 ("ncurses" ,ncurses)))))
864
865 (define-public go-github.com-howeyc-gopass
866 (let ((commit "bf9dde6d0d2c004a008c27aaee91170c786f6db8")
867 (revision "0"))
868 (package
869 (name "go-github.com-howeyc-gopass")
870 (version (git-version "0.0.0" revision commit))
871 (source (origin
872 (method git-fetch)
873 (uri (git-reference
874 (url "https://github.com/howeyc/gopass")
875 (commit commit)))
876 (file-name (git-file-name name version))
877 (sha256
878 (base32
879 "1jxzyfnqi0h1fzlsvlkn10bncic803bfhslyijcxk55mgh297g45"))))
880 (build-system go-build-system)
881 (arguments
882 '(#:import-path "github.com/howeyc/gopass"))
883 (propagated-inputs
884 `(("go-golang-org-x-crypto"
885 ,go-golang-org-x-crypto)))
886 (synopsis "Retrieve password from a terminal or piped input in Go")
887 (description
888 "@code{gopass} is a Go package for retrieving a password from user
889 terminal or piped input.")
890 (home-page "https://github.com/howeyc/gopass")
891 (license license:isc))))
892
893 (define-public python-pyte
894 (package
895 (name "python-pyte")
896 (version "0.7.0")
897 (source
898 (origin
899 (method url-fetch)
900 (uri (pypi-uri "pyte" version))
901 (sha256
902 (base32
903 "1an54hvyjm8gncx8cgabz9mkpgjkdb0bkyjlkh7g7f94nr3wnfl7"))))
904 (build-system python-build-system)
905 (arguments
906 '(#:phases
907 (modify-phases %standard-phases
908 (add-after 'unpack 'remove-failing-test
909 ;; TODO: Reenable when the `captured` files required by this test
910 ;; are included in the archive.
911 (lambda _
912 (delete-file "tests/test_input_output.py")
913 #t)))))
914 (propagated-inputs
915 `(("python-wcwidth" ,python-wcwidth)))
916 (native-inputs
917 `(("python-pytest-runner" ,python-pytest-runner)
918 ("python-pytest" ,python-pytest)))
919 (home-page "https://pyte.readthedocs.io/")
920 (synopsis "Simple VTXXX-compatible terminal emulator")
921 (description "@code{pyte} is an in-memory VTxxx-compatible terminal
922 emulator. @var{VTxxx} stands for a series of video terminals, developed by
923 DEC between 1970 and 1995. The first and probably most famous one was the
924 VT100 terminal, which is now a de-facto standard for all virtual terminal
925 emulators.
926
927 pyte is a fork of vt102, which was an incomplete pure Python implementation
928 of VT100 terminal.")
929 (license license:lgpl3+)))
930
931 (define-public python2-pyte
932 (package-with-python2 python-pyte))
933
934 (define-public python-blessings
935 (package
936 (name "python-blessings")
937 (version "1.7")
938 (source
939 (origin
940 (method url-fetch)
941 (uri (pypi-uri "blessings" version))
942 (sha256
943 (base32
944 "0z8mgkbmisxs10rz88qg46l1c9a8n08k8cy2iassal2zh16qbrcq"))))
945 (build-system python-build-system)
946 (arguments
947 ;; FIXME: Test suite is unable to detect TTY conditions.
948 `(#:tests? #f))
949 (native-inputs
950 `(("python-nose" ,python-nose)
951 ("python-six" ,python-six)))
952 (home-page "https://github.com/erikrose/blessings")
953 (synopsis "Python module to manage terminal color, styling, and
954 positioning")
955 (description "Blessings is a pythonic API to manipulate terminal color,
956 styling, and positioning. It provides similar features to curses but avoids
957 some of curses’s limitations: it does not require clearing the whole screen
958 for little changes, provides a scroll-back buffer after the program exits, and
959 avoids styling altogether when the output is redirected to something other
960 than a terminal.")
961 (license license:expat)))
962
963 (define-public python2-blessings
964 (package-with-python2 python-blessings))
965
966 (define-public python-curtsies
967 (package
968 (name "python-curtsies")
969 (version "0.3.4")
970 (source
971 (origin
972 (method url-fetch)
973 (uri (pypi-uri "curtsies" version))
974 (sha256
975 (base32
976 "019bpf5wmng4f6ic2ykg893ypfihpfvzi6dhblcagfwbincl79ac"))))
977 (build-system python-build-system)
978 (arguments
979 `(#:phases
980 (modify-phases %standard-phases
981 (replace 'check
982 (lambda _
983 (invoke "nosetests" "-v"))))))
984 (propagated-inputs
985 `(("python-blessings" ,python-blessings)
986 ("python-wcwidth" ,python-wcwidth)))
987 (native-inputs
988 `(("python-mock" ,python-mock)
989 ("python-pyte" ,python-pyte)
990 ("python-nose" ,python-nose)))
991 (home-page "https://github.com/bpython/curtsies")
992 (synopsis "Library for curses-like terminal interaction with colored
993 strings")
994 (description "Curtsies is a Python library for interacting with the
995 terminal. It features string-like objects which carry formatting information,
996 per-line fullscreen terminal rendering, and keyboard input event reporting.")
997 (license license:expat)))
998
999 (define-public tmate
1000 (package
1001 (name "tmate")
1002 (version "2.4.0")
1003 (source
1004 (origin
1005 (method git-fetch)
1006 (uri (git-reference
1007 (url "https://github.com/tmate-io/tmate")
1008 (commit version)))
1009 (file-name (git-file-name name version))
1010 (sha256
1011 (base32
1012 "0x5c31yq7ansmiy20a0qf59wagba9v3pq97mlkxrqxn4n1gcc6vi"))))
1013 (build-system gnu-build-system)
1014 (inputs
1015 `(("libevent" ,libevent)
1016 ("libssh" ,libssh)
1017 ("msgpack" ,msgpack)
1018 ("ncurses" ,ncurses)))
1019 (native-inputs
1020 `(("autoconf" ,autoconf)
1021 ("automake" ,automake)
1022 ("pkg-config" ,pkg-config)))
1023 (home-page "https://tmate.io/")
1024 (synopsis "Terminal sharing application")
1025 (description "tmate is a terminal sharing application that allows you to
1026 share your terminal with other users over the Internet. tmate is a fork of
1027 tmux.")
1028 (license license:isc)))
1029
1030 (define-public kitty
1031 (package
1032 (name "kitty")
1033 (version "0.20.1")
1034 (home-page "https://sw.kovidgoyal.net/kitty/")
1035 (source
1036 (origin
1037 (method git-fetch)
1038 (uri (git-reference
1039 (url "https://github.com/kovidgoyal/kitty")
1040 (commit (string-append "v" version))))
1041 (file-name (git-file-name name version))
1042 (sha256
1043 (base32 "0ncal16x3mz24f4l2lk50khzv3xacynk2pf3cklbvm2n7j69qca1"))
1044 (modules '((guix build utils)))
1045 (snippet
1046 '(begin
1047 ;; patch needed as sphinx-build is used as a python script
1048 ;; whereas the guix package uses a bash script launching the
1049 ;; python script
1050 (substitute* "docs/conf.py"
1051 (("(from kitty.constants import str_version)" kitty-imp)
1052 (string-append "sys.path.append(\"..\")\n" kitty-imp)))
1053 (substitute* "docs/Makefile"
1054 (("^SPHINXBUILD[[:space:]]+= (python3.*)$")
1055 "SPHINXBUILD = sphinx-build\n"))
1056 #t))))
1057 (build-system gnu-build-system)
1058 (native-inputs
1059 `(("libdbus" ,dbus)
1060 ("libgl1-mesa" ,mesa)
1061 ("libxcursor" ,libxcursor)
1062 ("libxi" ,libxi)
1063 ("libxinerama" ,libxinerama)
1064 ("libxkbcommon" ,libxkbcommon)
1065 ("libxrandr" ,libxrandr)
1066 ("ncurses" ,ncurses) ;; for tic command
1067 ("pkg-config" ,pkg-config)
1068 ("sphinx" ,python-sphinx)
1069 ("wayland-protocols" ,wayland-protocols)))
1070 (inputs
1071 `(("fontconfig" ,fontconfig)
1072 ("freetype" ,freetype)
1073 ("harfbuzz" ,harfbuzz)
1074 ("lcms" ,lcms)
1075 ("libcanberra" ,libcanberra)
1076 ("libpng" ,libpng)
1077 ("pygments" ,python-pygments)
1078 ("python" ,python-wrapper)
1079 ("wayland" ,wayland)
1080 ("zlib" ,zlib)))
1081 (arguments
1082 '(#:phases (modify-phases %standard-phases
1083 (delete 'configure) ;no configure script
1084 (replace 'build
1085 (lambda* (#:key inputs #:allow-other-keys)
1086 ;; The "kitty" sub-directory must be writable prior to
1087 ;; configuration (e.g., un-setting updates).
1088 (for-each make-file-writable (find-files "kitty"))
1089
1090 (invoke "python3" "setup.py" "linux-package"
1091 ;; Do not phone home.
1092 "--update-check-interval=0"
1093 ;; Wayland backend requires EGL, which isn't
1094 ;; found out-of-the-box for some reason.
1095 (string-append "--egl-library="
1096 (assoc-ref inputs "libgl1-mesa")
1097 "/lib/libEGL.so.1"))))
1098 (replace 'check
1099 (lambda _
1100 ;; Fix "cannot find kitty executable" error when running
1101 ;; tests.
1102 (setenv "PATH" (string-append "linux-package/bin:"
1103 (getenv "PATH")))
1104 (invoke "python3" "test.py")))
1105 (add-before 'install 'rm-pycache
1106 ;; created python cache __pycache__ are non deterministic
1107 (lambda _
1108 (let ((pycaches (find-files "linux-package/"
1109 "__pycache__"
1110 #:directories? #t)))
1111 (for-each delete-file-recursively pycaches)
1112 #t)))
1113 (replace 'install
1114 (lambda _
1115 (let* ((out (assoc-ref %outputs "out"))
1116 (obin (string-append out "/bin"))
1117 (olib (string-append out "/lib"))
1118 (oshare (string-append out "/share")))
1119 (copy-recursively "linux-package/bin" obin)
1120 (copy-recursively "linux-package/share" oshare)
1121 (copy-recursively "linux-package/lib" olib)
1122 #t))))))
1123 (synopsis "Fast, featureful, GPU based terminal emulator")
1124 (description "Kitty is a fast and featureful GPU-based terminal emulator:
1125 @itemize
1126 @item Offloads rendering to the GPU for lower system load and buttery smooth
1127 scrolling. Uses threaded rendering to minimize input latency.
1128 @item Supports all modern terminal features: graphics (images), unicode,
1129 true-color, OpenType ligatures, mouse protocol, focus tracking, bracketed
1130 paste and several new terminal protocol extensions.
1131 @item Supports tiling multiple terminal windows side by side in different
1132 layouts without needing to use an extra program like tmux.
1133 @item Can be controlled from scripts or the shell prompt, even over SSH.
1134 @item Has a framework for Kittens, small terminal programs that can be used to
1135 extend kitty's functionality. For example, they are used for Unicode input,
1136 hints, and side-by-side diff.
1137 @item Supports startup sessions which allow you to specify the window/tab
1138 layout, working directories and programs to run on startup.
1139 @item Allows you to open the scrollback buffer in a separate window using
1140 arbitrary programs of your choice. This is useful for browsing the history
1141 comfortably in a pager or editor.
1142 @end itemize")
1143 (license license:gpl3+)))
1144
1145 (define-public eternalterminal
1146 (package
1147 (name "eternalterminal")
1148 (version "6.0.13")
1149 (source
1150 (origin
1151 (method git-fetch)
1152 (uri (git-reference
1153 (url "https://github.com/MisterTea/EternalTerminal")
1154 (commit (string-append "et-v" version))))
1155 (file-name (git-file-name name version))
1156 (sha256
1157 (base32 "0sb1hypg2276y8c2a5vivrkcxp70swddvhnd9h273if3kv6j879r"))))
1158 (build-system cmake-build-system)
1159 (arguments
1160 '(#:configure-flags '("-DBUILD_TEST=ON")
1161 #:phases
1162 (modify-phases %standard-phases
1163 (add-after 'unpack 'insert-googletests
1164 (lambda* (#:key inputs #:allow-other-keys)
1165 (let ((tests (assoc-ref inputs "googletest")))
1166 (copy-recursively tests "external/googletest"))
1167 #t)))))
1168 (inputs
1169 `(("gflags" ,gflags)
1170 ("libsodium" ,libsodium)
1171 ("protobuf" ,protobuf)))
1172 (native-inputs
1173 `(("googletest" ,(package-source googletest))))
1174 (home-page "https://mistertea.github.io/EternalTerminal/")
1175 (synopsis "Remote shell that reconnects without interrupting the session")
1176 (description "@dfn{Eternal Terminal} (ET) is a remote shell that
1177 automatically reconnects without interrupting the session. ET uses SSH to
1178 initialize a secure connection. Unlike SSH sessions, which must be killed and
1179 reconnected after a network outage an ET session will survive network outages
1180 and IP roaming. ET provides the same core functionality as @command{mosh},
1181 while also supporting native scrolling and @command{tmux} control mode
1182 (@code{tmux -CC}).")
1183 (license license:asl2.0)))
1184
1185 (define-public et
1186 (deprecated-package "et" eternalterminal))
1187
1188 (define-public wterm
1189 (package
1190 (name "wterm")
1191 (version "0.7")
1192 (source
1193 (origin
1194 (method git-fetch)
1195 (uri (git-reference
1196 (url "https://github.com/majestrate/wterm")
1197 (commit "0ae42717c08a85a6509214e881422c7fbe7ecc45")))
1198 (sha256
1199 (base32
1200 "0g4lzmc1w6na81i6hny32xds4xfig4xzswzfijyi6p93a1226dv0"))
1201 (file-name (git-file-name name version))))
1202 (build-system gnu-build-system)
1203 (native-inputs
1204 `(("pkg-config" ,pkg-config)))
1205 (inputs
1206 `(("fontconfig" ,fontconfig)
1207 ("freetype" ,freetype)
1208 ("libdrm" ,libdrm)
1209 ("libxkbcommon" ,libxkbcommon)
1210 ("ncurses" ,ncurses)
1211 ("pixman" ,pixman)
1212 ("wayland" ,wayland)))
1213 (arguments
1214 '(#:tests? #f
1215
1216 ;; Without -j1 it fails to find file libwld.a.
1217 #:parallel-build? #f
1218
1219 #:make-flags (list "CC=gcc"
1220 (string-append "PREFIX=" %output)
1221 (string-append "TERMINFO="
1222 (assoc-ref %outputs "out")
1223 "/share/terminfo"))
1224 #:phases
1225 (modify-phases %standard-phases
1226 (delete 'configure)
1227 (add-after 'unpack 'terminfo-fix
1228 (lambda _
1229 (substitute* "Makefile"
1230 (("\ttic .*") "\tmkdir -p $(SHARE_PREFIX)/share/terminfo
1231 \ttic -o $(SHARE_PREFIX)/share/terminfo -s wterm.info\n"))
1232 #t)))))
1233 (native-search-paths
1234 (list (search-path-specification
1235 (variable "TERMINFO_DIRS")
1236 (files '("share/terminfo")))))
1237 (home-page "https://github.com/majestrate/wterm")
1238 (synopsis "Terminal emulator for Wayland")
1239 (description "wterm is a native Wayland terminal emulator based on
1240 an st fork using wld. st is a simple terminal emulator for X originally
1241 made by suckless.")
1242 (license license:x11)))
1243
1244 (define-public alacritty
1245 (package
1246 (name "alacritty")
1247 (version "0.7.1")
1248 (source
1249 (origin
1250 ;; XXX: The crate at "crates.io" has limited contents. In particular,
1251 ;; it does not contain "extra" directory with completions, icon, etc.
1252 (method git-fetch)
1253 (uri (git-reference
1254 (url "https://github.com/jwilm/alacritty")
1255 (commit (string-append "v" version))))
1256 (file-name (git-file-name name version))
1257 (sha256
1258 (base32 "1b9hy3ya72hhpl8nkayc7dy4f97xp75np48dm5na5pgyv8b45agi"))))
1259 (build-system cargo-build-system)
1260 (arguments
1261 `(#:install-source? #f ; virtual manifest
1262 #:cargo-test-flags '("--release" "--" "--skip=config_read_eof")
1263 #:cargo-inputs
1264 (("rust-alacritty-config-derive" ,rust-alacritty-config-derive-0.1)
1265 ("rust-alacritty-terminal" ,rust-alacritty-terminal-0.12)
1266 ("rust-clap" ,rust-clap-2)
1267 ("rust-cocoa" ,rust-cocoa-0.24)
1268 ("rust-copypasta" ,rust-copypasta-0.7)
1269 ("rust-crossfont" ,rust-crossfont-0.2)
1270 ("rust-embed-resource" ,rust-embed-resource-1)
1271 ("rust-fnv" ,rust-fnv-1)
1272 ("rust-gl-generator" ,rust-gl-generator-0.14)
1273 ;; XXX: Adjust `add-absolute-library-references' phase when updating
1274 ;; glutin input.
1275 ("rust-glutin" ,rust-glutin-0.26)
1276 ("rust-log" ,rust-log-0.4)
1277 ("rust-notify" ,rust-notify-4)
1278 ("rust-objc" ,rust-objc-0.2)
1279 ("rust-parking-lot" ,rust-parking-lot-0.11)
1280 ("rust-png" ,rust-png-0.16)
1281 ("rust-raw-window-handle" ,rust-raw-window-handle-0.3)
1282 ("rust-serde" ,rust-serde-1)
1283 ("rust-serde-json" ,rust-serde-json-1)
1284 ("rust-serde-yaml" ,rust-serde-yaml-0.8)
1285 ("rust-time" ,rust-time-0.1)
1286 ("rust-urlocator" ,rust-urlocator-0.1)
1287 ("rust-x11-dl" ,rust-x11-dl-2)
1288 ("rust-xdg" ,rust-xdg-2))
1289 #:phases
1290 (modify-phases %standard-phases
1291 (add-after 'configure 'add-absolute-library-references
1292 (lambda* (#:key inputs cargo-inputs vendor-dir #:allow-other-keys)
1293 (let* ((glutin-name ,(package-name rust-glutin-0.26))
1294 (glutin-version ,(package-version rust-glutin-0.26))
1295 (glutin-api (string-append glutin-name "-" glutin-version
1296 ".tar.gz/src/api/"))
1297 (smithay-client-toolkit-name
1298 ,(package-name rust-smithay-client-toolkit-0.12))
1299 (smithay-client-toolkit-version
1300 ,(package-version rust-smithay-client-toolkit-0.12))
1301 (smithay-client-toolkit-src
1302 (string-append smithay-client-toolkit-name "-"
1303 smithay-client-toolkit-version ".tar.gz/src"))
1304 (libxkbcommon (assoc-ref inputs "libxkbcommon"))
1305 (mesa (assoc-ref inputs "mesa")))
1306 ;; Fix dlopen()ing some libraries on pure Wayland (no $DISPLAY):
1307 ;; Failed to initialize any backend! Wayland status: NoWaylandLib
1308 ;; XXX We patch transitive dependencies that aren't even direct
1309 ;; inputs to this package, because of the way Guix's Rust build
1310 ;; system currently works. <http://issues.guix.gnu.org/46399>
1311 ;; might fix this and allow patching them directly.
1312 (substitute* (string-append vendor-dir "/"
1313 smithay-client-toolkit-src
1314 "/seat/keyboard/ffi.rs")
1315 (("libxkbcommon\\.so")
1316 (string-append libxkbcommon "/lib/libxkbcommon.so")))
1317
1318 ;; Mesa is needed everywhere.
1319 (substitute*
1320 (string-append vendor-dir "/" glutin-api "glx/mod.rs")
1321 (("libGL.so") (string-append mesa "/lib/libGL.so")))
1322 (substitute*
1323 (string-append vendor-dir "/" glutin-api "egl/mod.rs")
1324 (("libEGL.so") (string-append mesa "/lib/libEGL.so")))
1325 #t)))
1326 (replace 'install
1327 ;; Upstream install script only takes care of executable.
1328 (lambda* (#:key inputs outputs #:allow-other-keys)
1329 (let* ((out (assoc-ref outputs "out"))
1330 (bin (string-append out "/bin"))
1331 (share (string-append out "/share"))
1332 (icons (string-append share "/icons/hicolor/scalable/apps"))
1333 (tic (string-append (assoc-ref inputs "ncurses") "/bin/tic"))
1334 (man (string-append share "/man/man1"))
1335 (alacritty-bin "target/release/alacritty"))
1336 ;; Install the executable.
1337 (install-file alacritty-bin bin)
1338 ;; Install man pages.
1339 (mkdir-p man)
1340 (copy-file "extra/alacritty.man"
1341 (string-append man "/alacritty.1"))
1342 ;; Install desktop file.
1343 (install-file "extra/linux/Alacritty.desktop"
1344 (string-append share "/applications"))
1345 ;; Install icon.
1346 (mkdir-p icons)
1347 (copy-file "extra/logo/alacritty-term.svg"
1348 (string-append icons "/Alacritty.svg"))
1349 ;; Install terminfo.
1350 (mkdir-p (string-append share "/terminfo"))
1351 ;; We don't compile alacritty-common entry because
1352 ;; it's being used only for inheritance.
1353 (invoke tic "-x" "-e" "alacritty,alacritty-direct"
1354 "-o" (string-append share "/terminfo/")
1355 "extra/alacritty.info")
1356 ;; Install completions.
1357 (install-file "extra/completions/alacritty.bash"
1358 (string-append out "/etc/bash_completion.d"))
1359 (install-file "extra/completions/_alacritty"
1360 (string-append share "/zsh/site-functions"))
1361 (install-file "extra/completions/alacritty.fish"
1362 (string-append share "/fish/vendor_completions.d"))
1363 #t))))))
1364 (native-inputs
1365 `(("cmake" ,cmake)
1366 ("ncurses" ,ncurses)
1367 ("pkg-config" ,pkg-config)
1368 ("python3" ,python)))
1369 (inputs
1370 `(("expat" ,expat)
1371 ("fontconfig" ,fontconfig)
1372 ("freetype" ,freetype)
1373 ("libx11" ,libx11)
1374 ("libxcb" ,libxcb)
1375 ("libxcursor" ,libxcursor)
1376 ("libxi" ,libxi)
1377 ("libxkbcommon" ,libxkbcommon)
1378 ("libxrandr" ,libxrandr)
1379 ("libxxf86vm" ,libxxf86vm)
1380 ("mesa" ,mesa)
1381 ("rust-bitflags" ,rust-bitflags-1)
1382 ("rust-dirs" ,rust-dirs-2)
1383 ("rust-libc" ,rust-libc-0.2)
1384 ("rust-unicode-width" ,rust-unicode-width-0.1)
1385 ("rust-wayland-client" ,rust-wayland-client-0.28)
1386 ("rust-winapi" ,rust-winapi-0.3)
1387 ("wayland" ,wayland)))
1388 (native-search-paths
1389 ;; FIXME: This should only be located in 'ncurses'. Nonetheless it is
1390 ;; provided for usability reasons. See <https://bugs.gnu.org/22138>.
1391 (list (search-path-specification
1392 (variable "TERMINFO_DIRS")
1393 (files '("share/terminfo")))))
1394 (home-page "https://github.com/alacritty/alacritty")
1395 (synopsis "GPU-accelerated terminal emulator")
1396 (description
1397 "Alacritty is a GPU-accelerated terminal emulator with a strong focus on
1398 simplicity and performance. With such a strong focus on performance, included
1399 features are carefully considered and you can always expect Alacritty to be
1400 blazingly fast. By making sane choices for defaults, Alacritty requires no
1401 additional setup. However, it does allow configuration of many aspects of the
1402 terminal. Note that you need support for OpenGL 3.2 or higher.")
1403 (license license:asl2.0)))
1404
1405 (define-public bootterm
1406 (package
1407 (name "bootterm")
1408 (version "0.4")
1409 (source (origin
1410 (method git-fetch)
1411 (uri (git-reference
1412 (url "https://github.com/wtarreau/bootterm")
1413 (commit (string-append "v" version))))
1414 (file-name (git-file-name name version))
1415 (sha256
1416 (base32
1417 "1k3jacld98za41dbpr10sjms77hrw91sb10m0cnwv3h7aifiwmrs"))))
1418 (build-system gnu-build-system)
1419 (arguments
1420 `(#:tests? #f ; no test suite
1421 #:make-flags (list (string-append "CC=" ,(cc-for-target))
1422 (string-append "PREFIX=" (assoc-ref %outputs "out")))
1423 #:phases
1424 (modify-phases %standard-phases
1425 ;; No ./configure script
1426 (delete 'configure)
1427 (add-after 'install 'install-doc
1428 (lambda* (#:key outputs #:allow-other-keys)
1429 (let* ((out (assoc-ref outputs "out"))
1430 (doc (string-append out "/share/doc/" ,name "-" ,version)))
1431 (install-file "README.md" doc)
1432 #t))))))
1433 (home-page "https://github.com/wtarreau/bootterm")
1434 (synopsis "Serial terminal")
1435 (description "Bootterm is a terminal designed to ease connection to
1436 ephemeral serial ports. It features automatic port detection, port enumeration,
1437 support for non-standard baud rates, the ability to wait for ports to appear,
1438 and the ability to read and write via stdin and stdout.")
1439 (license license:expat)))