1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2015, 2016, 2017, 2018, 2019 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 Ludovic Courtès <ludo@gnu.org>
7 ;;; Copyright © 2016, 2017 José Miguel Sánchez García <jmi2k@openmailbox.org>
8 ;;; Copyright © 2017, 2018, 2019, 2020 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 Brett Gilio <brettg@gnu.org>
20 ;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
22 ;;; This file is part of GNU Guix.
24 ;;; GNU Guix is free software; you can redistribute it and/or modify it
25 ;;; under the terms of the GNU General Public License as published by
26 ;;; the Free Software Foundation; either version 3 of the License, or (at
27 ;;; your option) any later version.
29 ;;; GNU Guix is distributed in the hope that it will be useful, but
30 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
31 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
32 ;;; GNU General Public License for more details.
34 ;;; You should have received a copy of the GNU General Public License
35 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
37 (define-module (gnu packages terminals)
38 #:use-module ((guix licenses) #:prefix license:)
39 #:use-module (guix build-system cmake)
40 #:use-module (guix build-system gnu)
41 #:use-module (guix build-system glib-or-gtk)
42 #:use-module (guix build-system go)
43 #:use-module (guix build-system python)
44 #:use-module (guix download)
45 #:use-module (guix git-download)
46 #:use-module (guix packages)
47 #:use-module (gnu packages)
48 #:use-module (gnu packages autotools)
49 #:use-module (gnu packages check)
50 #:use-module (gnu packages compression)
51 #:use-module (gnu packages crypto)
52 #:use-module (gnu packages docbook)
53 #:use-module (gnu packages fontutils)
54 #:use-module (gnu packages freedesktop)
55 #:use-module (gnu packages gcc)
56 #:use-module (gnu packages gettext)
57 #:use-module (gnu packages gl)
58 #:use-module (gnu packages glib)
59 #:use-module (gnu packages gnome)
60 #:use-module (gnu packages golang)
61 #:use-module (gnu packages gtk)
62 #:use-module (gnu packages image)
63 #:use-module (gnu packages libcanberra)
64 #:use-module (gnu packages libevent)
65 #:use-module (gnu packages linux)
66 #:use-module (gnu packages ncurses)
67 #:use-module (gnu packages perl)
68 #:use-module (gnu packages perl-check)
69 #:use-module (gnu packages pkg-config)
70 #:use-module (gnu packages popt)
71 #:use-module (gnu packages protobuf)
72 #:use-module (gnu packages python)
73 #:use-module (gnu packages python-web)
74 #:use-module (gnu packages python-xyz)
75 #:use-module (gnu packages qt)
76 #:use-module (gnu packages serialization)
77 #:use-module (gnu packages sphinx)
78 #:use-module (gnu packages ssh)
79 #:use-module (gnu packages textutils)
80 #:use-module (gnu packages xdisorg)
81 #:use-module (gnu packages xml)
82 #:use-module (gnu packages xorg)
83 #:use-module (srfi srfi-26))
92 (url "https://github.com/lanoxx/tilda.git")
93 (commit (string-append "tilda-" version))))
94 (file-name (git-file-name name version))
97 "154rsldqjv2m1bddisb930qicb0y35kx7bxq392n2hn68jr2pxkj"))))
98 (build-system glib-or-gtk-build-system)
100 `(("autoconf" ,autoconf)
101 ("automake" ,automake)
102 ("gettext" ,gettext-minimal)
103 ("pkg-config" ,pkg-config)))
105 `(("libconfuse" ,libconfuse)
107 (synopsis "GTK+-based drop-down terminal")
108 (description "Tilda is a terminal emulator similar to normal terminals like
109 gnome-terminal (GNOME) or Konsole (KDE), with the difference that it drops down
110 from the edge of a screen when a certain configurable hotkey is pressed. This
111 is similar to the built-in consoles in some applications. Tilda is highly
112 configurable through a graphical wizard.")
113 (home-page "https://github.com/lanoxx/tilda")
114 (license license:gpl2+)))
116 (define-public termite
124 (url (string-append "https://github.com/thestinger/"
126 (commit (string-append "v" version))
128 (file-name (string-append name "-" version "-checkout"))
131 "0hp1x6lj098m3jgna274wv5dv60lnzg22297di68g4hw9djjyd2k"))))
132 (build-system gnu-build-system)
135 (modify-phases %standard-phases
136 (add-after 'unpack 'patch-xdg-open
138 (substitute* "termite.cc"
139 (("xdg-open") (which "xdg-open")))
143 ;; This sets the destination when installing the necessary terminal
144 ;; capability data, which are not provided by 'ncurses'. See
145 ;; <https://lists.gnu.org/archive/html/bug-ncurses/2009-10/msg00031.html>.
146 #:make-flags (list "PREFIX="
147 (string-append "VERSION=v" (version))
148 (string-append "DESTDIR="
149 (assoc-ref %outputs "out")))))
153 ("xdg-utils" ,xdg-utils)
154 ("ncurses" ,ncurses)))
156 `(("pkg-config" ,pkg-config)))
158 ;; FIXME: This should only be located in 'ncurses'. Nonetheless it is
159 ;; provided for usability reasons. See <https://bugs.gnu.org/22138>.
161 (list (search-path-specification
162 (variable "TERMINFO_DIRS")
163 (files '("share/terminfo")))))
164 (home-page "https://github.com/thestinger/termite/")
165 (synopsis "Keyboard-centric, VTE-based terminal")
166 (description "Termite is a minimal terminal emulator designed for use with
167 tiling window managers. It is a modal application, similar to Vim, with an
168 insert mode and command mode where keybindings have different functions.")
170 ;; Files under util/ are under the Expat license; the rest is LGPLv2+.
171 (license license:lgpl2.0+)))
173 (define-public asciinema
181 (url "https://github.com/asciinema/asciinema")
182 (commit (string-append "v" version))))
183 (file-name (git-file-name name version))
186 "1a2pysxnp6icyd08mgf66xr6f6j0irnfxdpf3fmzcz31ix7l9kc4"))))
187 (build-system python-build-system)
190 (modify-phases %standard-phases
191 (add-before 'build 'patch-exec-paths
192 (lambda* (#:key inputs #:allow-other-keys)
193 (let ((ncurses (assoc-ref inputs "ncurses")))
194 (substitute* "asciinema/term.py"
196 (string-append "'" ncurses "/bin/tput'"))))
199 (lambda _ (invoke "nosetests" "-v"))))))
200 (inputs `(("ncurses" ,ncurses)))
203 `(("python-nose" ,python-nose)))
204 (home-page "https://asciinema.org")
205 (synopsis "Terminal session recorder")
207 "Use asciinema to record and share your terminal sessions, the right way.
208 Forget screen recording apps and blurry video. Enjoy a lightweight, purely
209 text-based approach to terminal recording.")
210 (license license:gpl3)))
212 (define-public libtsm
213 (let ((commit "f70e37982f382b03c6939dac3d5f814450bda253")
217 (version (git-version "0.0.0" revision commit))
220 ;; The freedesktop repository is no longer maintained.
222 (url (string-append "https://github.com/Aetf/" name))
224 (file-name (git-file-name name version))
227 "0mwn91i5h5d518i1s05y7hzv6bc13vzcvxszpfh77473iwg4wprx"))))
228 (build-system cmake-build-system)
230 `(#:configure-flags '("-DBUILD_TESTING=ON")))
232 `(("pkg-config" ,pkg-config)))
234 `(("libxkbcommon" ,libxkbcommon)
236 (synopsis "Xterm state machine library")
237 (description "TSM is a state machine for DEC VT100-VT520 compatible
238 terminal emulators. It tries to support all common standards while keeping
239 compatibility to existing emulators like xterm, gnome-terminal, konsole, etc.")
240 (home-page "https://www.freedesktop.org/wiki/Software/libtsm")
241 ;; Hash table implementation is lgpl2.1+ licensed.
242 ;; The wcwidth implementation in external/wcwidth.{h,c} uses a license
244 ;; UCS-4 to UTF-8 encoding is copied from "terminology" which is released
245 ;; under the bsd 2 license.
246 (license (list license:expat license:lgpl2.1+ license:isc license:bsd-2)))))
248 (define-public kmscon
249 (let ((commit "01dd0a231e2125a40ceba5f59fd945ff29bf2cdc")
253 (version (git-version "0.0.0" revision commit))
256 ;; The freedesktop repository is no longer maintained.
258 (url (string-append "https://github.com/Aetf/" name))
262 "0q62kjsvy2iwy8adfiygx2bfwlh83rphgxbis95ycspqidg9py87"))
264 (search-patches "kmscon-runtime-keymap-switch.patch"))
265 (modules '((guix build utils)))
266 (file-name (git-file-name name version))))
267 (build-system gnu-build-system)
269 `(;; The closure of MESA is huge so we'd rather avoid it.
270 #:disallowed-references (,mesa)
272 #:phases (modify-phases %standard-phases
273 ;; Use elogind instead of systemd.
274 (add-before 'configure 'remove-systemd
276 (substitute* "configure"
277 (("libsystemd-daemon libsystemd-login")
279 (substitute* "src/uterm_systemd.c"
280 (("#include <systemd/sd-login.h>")
281 "#include <elogind/sd-login.h>")
282 ;; We don't have this header.
283 (("#include <systemd/sd-daemon\\.h>")
285 ;; Replace the call to 'sd_booted' by the truth value.
289 `(("pkg-config" ,pkg-config)
290 ("autoconf" ,autoconf)
291 ("automake" ,automake)
293 ("libxslt" ,libxslt) ;to build the man page
294 ("libxml2" ,libxml2) ;for XML_CATALOG_FILES
295 ("docbook-xsl" ,docbook-xsl)))
299 ("libxkbcommon" ,libxkbcommon)
301 ;; MESA can be used for accelerated video output via OpenGLESv2, but
302 ;; it's a bit dependency that we'd rather avoid in the installation
307 (synopsis "Linux KMS-based terminal emulator")
308 (description "Kmscon is a terminal emulator based on Linux's @dfn{kernel
309 mode setting} (KMS). It can replace the in-kernel virtual terminal (VT)
310 implementation with a user-space console. Compared to the Linux console,
311 kmscon provides enhanced features including XKB-compatible internationalized
312 keyboard support, UTF-8 input/font support, hardware-accelerated rendering,
313 multi-seat support, a replacement for @command{mingetty}, and more.")
314 (home-page "https://www.freedesktop.org/wiki/Software/kmscon")
315 ;; Hash table implementation is lgpl2.1+ licensed.
316 ;; The wcwidth implementation in external/wcwidth.{h,c} uses a license
318 ;; UCS-4 to UTF-8 encoding is copied from "terminology" which is released
319 ;; under the bsd 2 license.
320 ;; Unifont-Font is from http://unifoundry.com/unifont.html and licensed
321 ;; under the terms of the GNU GPL.
322 (license (list license:expat license:lgpl2.1+ license:bsd-2
324 (supported-systems (filter (cut string-suffix? "-linux" <>)
325 %supported-systems)))))
327 (define-public libtermkey
333 (uri (string-append "http://www.leonerd.org.uk/code/libtermkey/"
334 "libtermkey-" version ".tar.gz"))
336 (base32 "0psd0kf10q5ixfima0mxz10syy7qq1ilz1npr0rz862xycvzgjyf"))))
337 (build-system gnu-build-system)
341 (string-append "PREFIX=" (assoc-ref %outputs "out")))
342 #:phases (modify-phases %standard-phases
343 (delete 'configure)) ; no configure script
344 #:test-target "test"))
345 (inputs `(("ncurses" ,ncurses)))
346 (native-inputs `(("libtool" ,libtool)
347 ("perl-test-harness" ,perl-test-harness)
348 ("pkg-config" ,pkg-config)))
349 (synopsis "Keyboard entry processing library for terminal-based programs")
351 "Libtermkey handles all the necessary logic to recognise special keys, UTF-8
352 combining, and so on, with a simple interface.")
353 (home-page "http://www.leonerd.org.uk/code/libtermkey")
354 (license license:expat)))
356 (define-public picocom
363 (url "https://github.com/npat-efault/picocom.git")
365 (file-name (git-file-name name version))
368 "1vvjydqf0ax47nvdyyl67jafw5b3sfsav00xid6qpgia1gs2r72n"))))
369 (build-system gnu-build-system)
371 `(#:make-flags '("CC=gcc")
372 #:tests? #f ; no tests
374 (modify-phases %standard-phases
375 (delete 'configure) ; no configure script
377 ;; The Makefile lacks an ‘install’ target.
378 (lambda* (#:key outputs #:allow-other-keys)
379 (let* ((out (assoc-ref outputs "out"))
380 (bin (string-append out "/bin"))
381 (man (string-append out "/share/man/man1")))
382 (install-file "picocom" bin)
383 (install-file "picocom.1" man)))))))
384 (home-page "https://github.com/npat-efault/picocom")
385 (synopsis "Minimal dumb-terminal emulator")
387 "Picocom is a minimal dumb-terminal emulation program. It was designed to
388 serve as a simple and manual modem configuration, testing, and debugging tool.
389 It also serves well as a low-tech serial communications program to allow access
390 to all types of devices that provide serial consoles.")
391 (license license:gpl2+)))
401 ;; The original beep 1.3 at <http://www.johnath.com/beep> has been
402 ;; unmaintained for some time, and vulnerable to at least two CVEs:
403 ;; https://github.com/johnath/beep/issues/11#issuecomment-454056858
404 ;; Use this maintained fork instead.
405 (url "https://github.com/spkr-beep/beep.git")
406 (commit (string-append "v" version))))
407 (file-name (git-file-name name version))
409 (base32 "0dnbvzzxvajc7pl1165wb3l74pfcqcdg12rcjcw86qqy954dx8my"))))
410 (build-system gnu-build-system)
412 `(#:tests? #f ; no tests
414 (list (string-append "prefix=" (assoc-ref %outputs "out"))
415 (string-append "pkgdocdir=$(docdir)/" ,name "-" ,version))
417 (modify-phases %standard-phases
418 (delete 'configure)))) ; no configure script
420 `(("gcc" ,gcc-8))) ; for ‘-fstack-clash-protection’
421 (synopsis "Linux command-line utility to control the PC speaker")
422 (description "beep allows the user to control the PC speaker with precision,
423 allowing different sounds to indicate different events. While it can be run
424 quite happily on the command line, its intended place of residence is within
425 scripts, notifying the user when something interesting occurs. Of course, it
426 has no notion of what's interesing, but it's very good at that notifying part.")
427 (home-page "https://github.com/spkr-beep/beep")
428 (license license:gpl2+)))
430 (define-public unibilium
438 (url "https://github.com/mauke/unibilium.git")
439 (commit (string-append "v" version))))
440 (file-name (git-file-name name version))
443 "1wa9a32wzqnxqh1jh554afj13dzjr6mw2wzqzw8d08nza9pg2ra2"))))
444 (build-system gnu-build-system)
448 (string-append "PREFIX=" (assoc-ref %outputs "out")))
450 ;; FIXME: tests require "prove"
453 (modify-phases %standard-phases
454 (delete 'configure))))
456 `(("libtool" ,libtool)
458 (home-page "https://github.com/mauke/unibilium")
459 (synopsis "Terminfo parsing library")
460 (description "Unibilium is a basic C terminfo library. It doesn't depend
461 on curses or any other library. It also doesn't use global variables, so it
462 should be thread-safe.")
463 (license license:lgpl3+)))
465 (define-public libvterm
472 (uri (string-append "http://www.leonerd.org.uk/code/libvterm/"
473 "libvterm-" version ".tar.gz"))
476 "1n5maylann2anfifjy576vzyar9q5m1kzpyiz2hca2pacxy8xf4v"))))
477 (build-system gnu-build-system)
481 (string-append "PREFIX=" (assoc-ref %outputs "out")))
484 (modify-phases %standard-phases
485 (delete 'configure))))
487 `(("libtool" ,libtool)
489 (home-page "http://www.leonerd.org.uk/code/libvterm/")
490 (synopsis "VT220/xterm/ECMA-48 terminal emulator library")
491 (description "Libvterm is an abstract C99 library which implements a VT220
492 or xterm-like terminal emulator. It doesn't use any particular graphics
493 toolkit or output system, instead it invokes callback function pointers that
494 its embedding program should provide it to draw on its behalf. It avoids
495 calling @code{malloc} during normal running state, allowing it to be used in
496 embedded kernel situations.")
497 (license license:expat)))
499 (define-public cool-retro-term
500 (let ((commit "1.1.1")
501 (revision "0")) ;not used currently
503 (name "cool-retro-term")
507 (file-name (string-append name "-" version "-checkout"))
509 (url (string-append "https://github.com/Swordfish90/" name))
513 (base32 "0wb6anchxa5jpn9c73kr4byrf2xlj8x8qzc5x7ny6saj7kbbvp75"))
514 (modules '((guix build utils)
520 '(let* ((fonts '(;"1971-ibm-3278" ; BSD 3-clause
521 "1977-apple2" ; Non-Free
522 "1977-commodore-pet" ; Non-Free
523 "1979-atari-400-800" ; Non-Free
524 ;"1981-ibm-pc ; CC-SA 4.0
525 "1982-commodore64")) ; Non-Free
526 ;"1985-ibm-pc-vga" ; CC-SA 4.0
527 ;"modern-fixedsys-excelsior" ; Redistributable
528 ;"modern-hermit" ; SIL
529 ;"modern-inconsolata"; SIL
530 ;"modern-pro-font-win-tweaked" ; X11
531 ;"modern-proggy-tiny"; X11
532 ;"modern-terminus" ; SIL
533 (name-rx (make-regexp " *name: *\"([^\"]*)\""))
534 (source-rx (make-regexp " *source: \"fonts/([^/]*)[^\"]*\""))
535 (fontname-rx (make-regexp "\"fontName\":\"([^\"]*).*"))
537 ;; Gather font names from all Fonts*.qml files.
538 ;; These will be used to remove items from the
541 (lambda (font-file names)
542 (call-with-input-file font-file
544 (let loop ((name #f) (names names))
545 (let ((line (read-line port)))
547 ((eof-object? line) (pk 'names names))
548 ((regexp-exec name-rx line)
550 (loop (match:substring m 1) names)))
551 ((regexp-exec source-rx line)
553 (let ((font (match:substring m 1)))
554 (if (member font fonts)
555 (loop #f (lset-adjoin string=?
558 (else (loop name names))))))))
559 '() (find-files "app/qml" "Font.*\\.qml"))))
560 ;; Remove the font files themselves
561 (for-each (lambda (font)
562 (delete-file-recursively
563 (string-append "app/qml/fonts/" font)))
565 ;; Remove mention of those fonts in the source
566 (substitute* "app/qml/resources.qrc"
567 (((string-append " *<file>fonts/("
568 (string-join fonts "|")
573 (let ((start-rx (make-regexp " *ListElement\\{"))
574 (end-rx (make-regexp " *\\}")))
575 (with-atomic-file-replacement file
577 (let loop ((line-buffer '())
580 (let ((line (read-line in 'concat)))
582 ((eof-object? line) #t) ;done
583 ((regexp-exec start-rx line)
584 (loop (cons line line-buffer) #t #f))
585 ((or (regexp-exec source-rx line)
586 (regexp-exec fontname-rx line))
588 (let ((font-or-name (match:substring m 1)))
589 (if (or (member font-or-name fonts)
590 (member font-or-name names))
592 (loop (cons line line-buffer)
594 ((regexp-exec end-rx line)
596 (for-each (cut display <> out)
597 (reverse line-buffer))
600 (hold? (loop (cons line line-buffer)
602 (discard? (loop line-buffer #f #t))
603 (else (display line out)
604 (loop '() #f #f)))))))))
605 '("app/qml/FontPixels.qml"
606 "app/qml/FontScanlines.qml"
608 "app/qml/ApplicationSettings.qml"))
609 ;; Final substitution for default scanline and pixel fonts
610 (substitute* "app/qml/ApplicationSettings.qml"
611 (("COMMODORE_PET") "PROGGY_TINY"))
613 (build-system gnu-build-system)
616 ("qtdeclarative" ,qtdeclarative)
617 ("qtgraphicaleffects" ,qtgraphicaleffects)
618 ("qtquickcontrols" ,qtquickcontrols)))
621 (modify-phases %standard-phases
623 (lambda* (#:key outputs #:allow-other-keys)
624 (let ((out (assoc-ref outputs "out")))
625 (substitute* '("qmltermwidget/qmltermwidget.pro")
626 (("INSTALL_DIR = \\$\\$\\[QT_INSTALL_QML\\]")
627 (string-append "INSTALL_DIR = " out "/lib/qt5/qml")))
628 (substitute* '("cool-retro-term.pro" "app/app.pro")
631 (add-after 'install 'wrap-executable
632 (lambda* (#:key inputs outputs #:allow-other-keys)
633 (let ((out (assoc-ref outputs "out"))
634 (qml "/lib/qt5/qml"))
635 (wrap-program (string-append out "/bin/cool-retro-term")
636 `("QML2_IMPORT_PATH" ":" prefix
637 (,(string-append out qml)
639 (string-append (assoc-ref inputs i) qml))
642 "qtquickcontrols")))))
644 (add-after 'install 'add-alternate-name
645 (lambda* (#:key outputs #:allow-other-keys)
646 (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
647 (symlink (string-append bin "/cool-retro-term")
648 (string-append bin "/crt"))
650 (add-after 'install 'install-man
651 (lambda* (#:key outputs #:allow-other-keys)
652 (let ((mandir (string-append (assoc-ref outputs "out")
654 (install-file "packaging/debian/cool-retro-term.1" mandir)
656 (synopsis "Terminal emulator")
658 "Cool-retro-term (crt) is a terminal emulator which mimics the look and
659 feel of the old cathode ray tube (CRT) screens. It has been designed to be
660 eye-candy, customizable, and reasonably lightweight.")
661 (home-page "https://github.com/Swordfish90/cool-retro-term")
663 license:gpl2+ ; qmltermwidget
664 license:gpl3+ ; cool-retro-term
670 (define-public sakura
676 (uri (string-append "https://launchpad.net/" name "/trunk/"
677 version "/+download/" name "-" version
681 "15gskj5yv5qs3cj4ps43735kfx2nzjlhq4dk9ghirl8lvhhxsm5m"))))
682 (build-system cmake-build-system)
684 '(#:tests? #f)) ; no check phase
686 `(("gettext" ,gettext-minimal)
687 ("perl" ,perl) ; for pod2man
688 ("pkg-config" ,pkg-config)))
692 (home-page "https://launchpad.net/sakura")
693 (synopsis "A simple but powerful libvte-based terminal emulator")
694 (description "@code{Sakura} is a terminal emulator based on GTK+ and VTE.
695 It's a terminal emulator with few dependencies, so you don't need a full GNOME
696 desktop installed to have a decent terminal emulator.")
697 (license license:gpl2)))
699 (define-public go-github.com-nsf-termbox-go
700 (let ((commit "288510b9734e30e7966ec2f22b87c5f8e67345e3")
703 (name "go-github.com-nsf-termbox-go")
704 (version (git-version "0.0.0" revision commit))
708 (url "https://github.com/nsf/termbox-go.git")
710 (file-name (git-file-name name version))
713 "0hdyisfaf8yb55h3p03p4sbq19546mp9fy28f2kn659mycmhxqk4"))))
714 (build-system go-build-system)
716 '(#:import-path "github.com/nsf/termbox-go"))
718 `(("go-github.com-mattn-go-runewidth"
719 ,go-github.com-mattn-go-runewidth)))
720 (synopsis "@code{termbox} provides a minimal API for text-based user
723 "Termbox is a library that provides a minimalistic API which allows the
724 programmer to write text-based user interfaces.")
725 (home-page "https://github.com/nsf/termbox-go")
726 (license license:expat))))
728 (define-public go-github-com-junegunn-fzf
730 (name "go-github-com-junegunn-fzf")
736 (url "https://github.com/junegunn/fzf")
738 (file-name (git-file-name name version))
741 "0pwpr4fpw56yzzkcabzzgbgwraaxmp7xzzmap7w1xsrkbj7dl2xl"))))
742 (build-system go-build-system)
744 `(#:import-path "github.com/junegunn/fzf"))
746 `(("go-github.com-mattn-go-runewidth" ,go-github.com-mattn-go-runewidth)
747 ("go-github-com-mattn-go-shellwords" ,go-github-com-mattn-go-shellwords)
748 ("go-github-com-mattn-go-isatty" ,go-github-com-mattn-go-isatty)
749 ("go-github-com-gdamore-tcell" ,go-github-com-gdamore-tcell)
750 ("go-golang-org-x-crypto" ,go-golang-org-x-crypto)))
751 (home-page "https://github.com/junegunn/fzf")
752 (synopsis "Command-line fuzzy-finder")
753 (description "This package provides an interactive command-line filter
754 usable with any list--including files, command history, processes and more.")
755 (license license:expat)))
757 (define-public go-github.com-howeyc-gopass
758 (let ((commit "bf9dde6d0d2c004a008c27aaee91170c786f6db8")
761 (name "go-github.com-howeyc-gopass")
762 (version (git-version "0.0.0" revision commit))
766 (url "https://github.com/howeyc/gopass.git")
768 (file-name (git-file-name name version))
771 "1jxzyfnqi0h1fzlsvlkn10bncic803bfhslyijcxk55mgh297g45"))))
772 (build-system go-build-system)
774 '(#:import-path "github.com/howeyc/gopass"))
776 `(("go-golang-org-x-crypto"
777 ,go-golang-org-x-crypto)))
778 (synopsis "Retrieve password from a terminal or piped input in Go")
780 "@code{gopass} is a Go package for retrieving a password from user
781 terminal or piped input.")
782 (home-page "https://github.com/howeyc/gopass")
783 (license license:isc))))
785 (define-public python-pyte
792 (uri (pypi-uri "pyte" version))
795 "1an54hvyjm8gncx8cgabz9mkpgjkdb0bkyjlkh7g7f94nr3wnfl7"))))
796 (build-system python-build-system)
799 (modify-phases %standard-phases
800 (add-after 'unpack 'remove-failing-test
801 ;; TODO: Reenable when the `captured` files required by this test
802 ;; are included in the archive.
804 (delete-file "tests/test_input_output.py")
807 `(("python-wcwidth" ,python-wcwidth)))
809 `(("python-pytest-runner" ,python-pytest-runner)
810 ("python-pytest" ,python-pytest)))
811 (home-page "https://pyte.readthedocs.io/")
812 (synopsis "Simple VTXXX-compatible terminal emulator")
813 (description "@code{pyte} is an in-memory VTxxx-compatible terminal
814 emulator. @var{VTxxx} stands for a series of video terminals, developed by
815 DEC between 1970 and 1995. The first and probably most famous one was the
816 VT100 terminal, which is now a de-facto standard for all virtual terminal
819 pyte is a fork of vt102, which was an incomplete pure Python implementation
821 (license license:lgpl3+)))
823 (define-public python2-pyte
824 (package-with-python2 python-pyte))
826 (define-public python-blessings
828 (name "python-blessings")
833 (uri (pypi-uri "blessings" version))
836 "0z8mgkbmisxs10rz88qg46l1c9a8n08k8cy2iassal2zh16qbrcq"))))
837 (build-system python-build-system)
839 ;; FIXME: Test suite is unable to detect TTY conditions.
842 `(("python-nose" ,python-nose)
843 ("python-six" ,python-six)))
844 (home-page "https://github.com/erikrose/blessings")
845 (synopsis "Python module to manage terminal color, styling, and
847 (description "Blessings is a pythonic API to manipulate terminal color,
848 styling, and positioning. It provides similar features to curses but avoids
849 some of curses’s limitations: it does not require clearing the whole screen
850 for little changes, provides a scroll-back buffer after the program exits, and
851 avoids styling altogether when the output is redirected to something other
853 (license license:expat)))
855 (define-public python2-blessings
856 (package-with-python2 python-blessings))
858 (define-public python-curtsies
860 (name "python-curtsies")
865 (uri (pypi-uri "curtsies" version))
868 "1vljmw3sy6lrqahhpyg4gk13mzcx3mwhvg8s41698ms3cpgkjipc"))))
869 (build-system python-build-system)
872 (modify-phases %standard-phases
875 (invoke "nosetests" "-v"))))))
877 `(("python-blessings" ,python-blessings)
878 ("python-wcwidth" ,python-wcwidth)))
880 `(("python-mock" ,python-mock)
881 ("python-pyte" ,python-pyte)
882 ("python-nose" ,python-nose)))
883 (home-page "https://github.com/thomasballinger/curtsies")
884 (synopsis "Library for curses-like terminal interaction with colored
886 (description "Curtsies is a Python library for interacting with the
887 terminal. It features string-like objects which carry formatting information,
888 per-line fullscreen terminal rendering, and keyboard input event reporting.")
889 (license license:expat)))
891 (define-public python2-curtsies
892 (package-with-python2 python-curtsies))
902 (url "https://github.com/tmate-io/tmate.git")
904 (file-name (git-file-name name version))
907 "0pfl9vrswzim9ydi1n652h3rax2zrmy6sqkp0r09yy3lw83h4y1r"))))
908 (build-system gnu-build-system)
910 `(("libevent" ,libevent)
913 ("ncurses" ,ncurses)))
915 `(("autoconf" ,autoconf)
916 ("automake" ,automake)
917 ("pkg-config" ,pkg-config)))
918 (home-page "https://tmate.io/")
919 (synopsis "Terminal sharing application")
920 (description "tmate is a terminal sharing application that allows you to
921 share your terminal with other users over the Internet. tmate is a fork of
923 (license license:isc)))
929 (home-page "https://sw.kovidgoyal.net/kitty/")
934 (url "https://github.com/kovidgoyal/kitty.git")
935 (commit (string-append "v" version))))
936 (file-name (git-file-name name version))
938 (base32 "1bszyddar0g1gdz67h8rd3gbrdhi6ahjg7j14cjiqxm1938z9ajf"))
939 (modules '((guix build utils)))
942 ;; patch needed as sphinx-build is used as a python script
943 ;; whereas the guix package uses a bash script launching the
945 (substitute* "docs/conf.py"
946 (("(from kitty.constants import str_version)" kitty-imp)
947 (string-append "sys.path.append(\"..\")\n" kitty-imp)))
948 (substitute* "docs/Makefile"
949 (("^SPHINXBUILD[[:space:]]+= (python3.*)$")
950 "SPHINXBUILD = sphinx-build\n"))
952 (build-system gnu-build-system)
955 ("harfbuzz" ,harfbuzz)
957 ("libcanberra" ,libcanberra)
959 ("freetype" ,freetype)
960 ("fontconfig" ,fontconfig)
961 ("pygments" ,python-pygments)
962 ("wayland" ,wayland)))
964 `(("pkg-config" ,pkg-config)
965 ("libxrandr" ,libxrandr)
967 ("libxcursor" ,libxcursor)
969 ("libxinerama" ,libxinerama)
970 ("libgl1-mesa" ,mesa)
971 ("libxkbcommon" ,libxkbcommon)
972 ("sphinx" ,python-sphinx)
973 ("ncurses" ,ncurses) ;; for tic command
974 ("wayland-protocols" ,wayland-protocols)))
976 '(#:phases (modify-phases %standard-phases
978 ;; Wayland backend requires EGL, which isn't found
979 ;; out-of-the-box for some reason. Hard-code it instead.
980 (add-after 'unpack 'hard-code-libegl
982 (let* ((mesa (assoc-ref %build-inputs "libgl1-mesa"))
983 (libegl (string-append mesa "/lib/libEGL.so.1")))
984 (substitute* "glfw/egl_context.c"
985 (("libEGL.so.1") libegl)))
989 (invoke "python3" "setup.py" "linux-package")))
992 (invoke "python3" "setup.py" "test")))
993 (add-before 'install 'rm-pycache
994 ;; created python cache __pycache__ are non deterministic
996 (let ((pycaches (find-files "linux-package/"
999 (for-each delete-file-recursively pycaches)
1003 (let* ((out (assoc-ref %outputs "out"))
1004 (obin (string-append out "/bin"))
1005 (olib (string-append out "/lib"))
1006 (oshare (string-append out "/share")))
1007 (copy-recursively "linux-package/bin" obin)
1008 (copy-recursively "linux-package/share" oshare)
1009 (copy-recursively "linux-package/lib" olib)
1011 (synopsis "Fast, featureful, GPU based terminal emulator")
1012 (description "Kitty is a fast and featureful GPU-based terminal emulator:
1014 @item Offloads rendering to the GPU for lower system load and buttery smooth
1015 scrolling. Uses threaded rendering to minimize input latency.
1016 @item Supports all modern terminal features: graphics (images), unicode,
1017 true-color, OpenType ligatures, mouse protocol, focus tracking, bracketed
1018 paste and several new terminal protocol extensions.
1019 @item Supports tiling multiple terminal windows side by side in different
1020 layouts without needing to use an extra program like tmux.
1021 @item Can be controlled from scripts or the shell prompt, even over SSH.
1022 @item Has a framework for Kittens, small terminal programs that can be used to
1023 extend kitty's functionality. For example, they are used for Unicode input,
1024 hints, and side-by-side diff.
1025 @item Supports startup sessions which allow you to specify the window/tab
1026 layout, working directories and programs to run on startup.
1027 @item Allows you to open the scrollback buffer in a separate window using
1028 arbitrary programs of your choice. This is useful for browsing the history
1029 comfortably in a pager or editor.
1031 (license license:gpl3+)))
1033 (define-public eternalterminal
1035 (name "eternalterminal")
1041 (url "https://github.com/MisterTea/EternalTerminal.git")
1042 (commit (string-append "et-v" version))))
1043 (file-name (git-file-name name version))
1045 (base32 "0jh89229bd9s82h3aj6faaybwr5xvnk8w2kgz47gq263pz021zpl"))))
1046 (build-system cmake-build-system)
1048 '(#:configure-flags '("-DBUILD_TEST=ON")
1050 (modify-phases %standard-phases
1051 (add-after 'unpack 'insert-googletests
1052 (lambda* (#:key inputs #:allow-other-keys)
1053 (let ((tests (assoc-ref inputs "googletest")))
1054 (copy-recursively tests "external/googletest"))
1056 (add-after 'install 'dont-provide-gtest-libraries
1057 (lambda* (#:key outputs #:allow-other-keys)
1058 (let ((out (assoc-ref outputs "out")))
1059 (delete-file-recursively (string-append out "/include"))
1060 (delete-file-recursively (string-append out "/lib")))
1063 `(("gflags" ,gflags)
1064 ("libsodium" ,libsodium)
1065 ("protobuf" ,protobuf)))
1067 `(("googletest" ,(package-source googletest))))
1068 (home-page "https://mistertea.github.io/EternalTerminal/")
1069 (synopsis "Remote shell that reconnects without interrupting the session")
1070 (description "@dfn{Eternal Terminal} (ET) is a remote shell that
1071 automatically reconnects without interrupting the session. ET uses SSH to
1072 initialize a secure connection. Unlike SSH sessions, which must be killed and
1073 reconnected after a network outage an ET session will survive network outages
1074 and IP roaming. ET provides the same core functionality as @command{mosh},
1075 while also supporting native scrolling and @command{tmux} control mode
1076 (@code{tmux -CC}).")
1077 (license license:asl2.0)))
1079 (define-public wterm
1087 (url "https://github.com/majestrate/wterm.git")
1088 (commit "0ae42717c08a85a6509214e881422c7fbe7ecc45")))
1091 "0g4lzmc1w6na81i6hny32xds4xfig4xzswzfijyi6p93a1226dv0"))
1092 (file-name (git-file-name name version))))
1093 (build-system gnu-build-system)
1095 `(("pkg-config" ,pkg-config)))
1097 `(("fontconfig" ,fontconfig)
1098 ("freetype" ,freetype)
1100 ("libxkbcommon" ,libxkbcommon)
1101 ("ncurses" ,ncurses)
1103 ("wayland" ,wayland)))
1107 ;; Without -j1 it fails to find file libwld.a.
1108 #:parallel-build? #f
1110 #:make-flags (list "CC=gcc"
1111 (string-append "PREFIX=" %output)
1112 (string-append "TERMINFO="
1113 (assoc-ref %outputs "out")
1116 (modify-phases %standard-phases
1118 (add-after 'unpack 'terminfo-fix
1120 (substitute* "Makefile"
1121 (("\ttic .*") "\tmkdir -p $(SHARE_PREFIX)/share/terminfo
1122 \ttic -o $(SHARE_PREFIX)/share/terminfo -s wterm.info\n"))
1124 (native-search-paths
1125 (list (search-path-specification
1126 (variable "TERMINFO_DIRS")
1127 (files '("share/terminfo")))))
1128 (home-page "https://github.com/majestrate/wterm")
1129 (synopsis "Terminal emulator for Wayland")
1130 (description "wterm is a native Wayland terminal emulator based on
1131 an st fork using wld. st is a simple terminal emulator for X originally
1133 (license license:x11)))