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 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 Tobias Geerinckx-Rice <me@tobias.gr>
9 ;;; Copyright © 2017 Kei Kebreau <kkebreau@posteo.net>
10 ;;; Copyright © 2017, 2018 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>
18 ;;; This file is part of GNU Guix.
20 ;;; GNU Guix is free software; you can redistribute it and/or modify it
21 ;;; under the terms of the GNU General Public License as published by
22 ;;; the Free Software Foundation; either version 3 of the License, or (at
23 ;;; your option) any later version.
25 ;;; GNU Guix is distributed in the hope that it will be useful, but
26 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
27 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
28 ;;; GNU General Public License for more details.
30 ;;; You should have received a copy of the GNU General Public License
31 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
33 (define-module (gnu packages terminals)
34 #:use-module ((guix licenses) #:prefix license:)
35 #:use-module (guix build-system cmake)
36 #:use-module (guix build-system gnu)
37 #:use-module (guix build-system glib-or-gtk)
38 #:use-module (guix build-system go)
39 #:use-module (guix build-system python)
40 #:use-module (guix download)
41 #:use-module (guix git-download)
42 #:use-module (guix packages)
43 #:use-module (gnu packages)
44 #:use-module (gnu packages autotools)
45 #:use-module (gnu packages check)
46 #:use-module (gnu packages compression)
47 #:use-module (gnu packages crypto)
48 #:use-module (gnu packages docbook)
49 #:use-module (gnu packages fontutils)
50 #:use-module (gnu packages freedesktop)
51 #:use-module (gnu packages gcc)
52 #:use-module (gnu packages gettext)
53 #:use-module (gnu packages gl)
54 #:use-module (gnu packages glib)
55 #:use-module (gnu packages gnome)
56 #:use-module (gnu packages gtk)
57 #:use-module (gnu packages image)
58 #:use-module (gnu packages libevent)
59 #:use-module (gnu packages linux)
60 #:use-module (gnu packages ncurses)
61 #:use-module (gnu packages perl)
62 #:use-module (gnu packages perl-check)
63 #:use-module (gnu packages pkg-config)
64 #:use-module (gnu packages popt)
65 #:use-module (gnu packages protobuf)
66 #:use-module (gnu packages python)
67 #:use-module (gnu packages python-web)
68 #:use-module (gnu packages python-xyz)
69 #:use-module (gnu packages qt)
70 #:use-module (gnu packages serialization)
71 #:use-module (gnu packages ssh)
72 #:use-module (gnu packages textutils)
73 #:use-module (gnu packages xdisorg)
74 #:use-module (gnu packages xml)
75 #:use-module (gnu packages xorg)
76 #:use-module (srfi srfi-26))
85 (url "https://github.com/lanoxx/tilda.git")
86 (commit (string-append "tilda-" version))))
87 (file-name (git-file-name name version))
90 "154rsldqjv2m1bddisb930qicb0y35kx7bxq392n2hn68jr2pxkj"))))
91 (build-system glib-or-gtk-build-system)
93 '(#:phases (modify-phases %standard-phases
96 (setenv "NOCONFIGURE" "true")
97 (invoke "sh" "autogen.sh"))))))
99 `(("autoconf" ,autoconf)
100 ("automake" ,automake)
101 ("gettext" ,gettext-minimal)
102 ("pkg-config" ,pkg-config)))
104 `(("libconfuse" ,libconfuse)
106 (synopsis "GTK+-based drop-down terminal")
107 (description "Tilda is a terminal emulator similar to normal terminals like
108 gnome-terminal (GNOME) or Konsole (KDE), with the difference that it drops down
109 from the edge of a screen when a certain configurable hotkey is pressed. This
110 is similar to the built-in consoles in some applications. Tilda is highly
111 configurable through a graphical wizard.")
112 (home-page "https://github.com/lanoxx/tilda")
113 (license license:gpl2+)))
115 (define-public termite
123 (url (string-append "https://github.com/thestinger/"
125 (commit (string-append "v" version))
127 (file-name (string-append name "-" version "-checkout"))
130 "0hp1x6lj098m3jgna274wv5dv60lnzg22297di68g4hw9djjyd2k"))))
131 (build-system gnu-build-system)
134 (modify-phases %standard-phases
137 ;; This sets the destination when installing the necessary terminal
138 ;; capability data, which are not provided by 'ncurses'. See
139 ;; <https://lists.gnu.org/archive/html/bug-ncurses/2009-10/msg00031.html>.
140 #:make-flags (list "PREFIX="
141 (string-append "VERSION=v" (version))
142 (string-append "DESTDIR="
143 (assoc-ref %outputs "out")))))
147 ("ncurses" ,ncurses)))
149 `(("pkg-config" ,pkg-config)))
151 ;; FIXME: This should only be located in 'ncurses'. Nonetheless it is
152 ;; provided for usability reasons. See <https://bugs.gnu.org/22138>.
154 (list (search-path-specification
155 (variable "TERMINFO_DIRS")
156 (files '("share/terminfo")))))
157 (home-page "https://github.com/thestinger/termite/")
158 (synopsis "Keyboard-centric, VTE-based terminal")
159 (description "Termite is a minimal terminal emulator designed for use with
160 tiling window managers. It is a modal application, similar to Vim, with an
161 insert mode and command mode where keybindings have different functions.")
163 ;; Files under util/ are under the Expat license; the rest is LGPLv2+.
164 (license license:lgpl2.0+)))
166 (define-public asciinema
173 (uri (pypi-uri "asciinema" version))
176 "1jrf8c8711gkdilmvyv3d37kp8xfvdc5cqighw5k92a6g9z4acgv"))))
177 (build-system python-build-system)
180 (modify-phases %standard-phases
181 (add-before 'build 'patch-exec-paths
182 (lambda* (#:key inputs #:allow-other-keys)
183 (let ((ncurses (assoc-ref inputs "ncurses")))
184 (substitute* "asciinema/recorder.py"
186 (string-append "'" ncurses "/bin/tput'"))))
188 (inputs `(("ncurses" ,ncurses)))
191 `(("python-requests" ,python-requests)))
192 (home-page "https://asciinema.org")
193 (synopsis "Terminal session recorder")
195 "Use asciinema to record and share your terminal sessions, the right way.
196 Forget screen recording apps and blurry video. Enjoy a lightweight, purely
197 text-based approach to terminal recording.")
198 (license license:gpl3)))
200 (define-public libtsm
201 (let ((commit "f70e37982f382b03c6939dac3d5f814450bda253")
205 (version (git-version "0.0.0" revision commit))
208 ;; The freedesktop repository is no longer maintained.
210 (url (string-append "https://github.com/Aetf/" name))
214 "0mwn91i5h5d518i1s05y7hzv6bc13vzcvxszpfh77473iwg4wprx"))))
215 (build-system cmake-build-system)
217 `(#:configure-flags '("-DBUILD_TESTING=ON")))
219 `(("pkg-config" ,pkg-config)))
221 `(("libxkbcommon" ,libxkbcommon)
223 (synopsis "Xterm state machine library")
224 (description "TSM is a state machine for DEC VT100-VT520 compatible
225 terminal emulators. It tries to support all common standards while keeping
226 compatibility to existing emulators like xterm, gnome-terminal, konsole, etc.")
227 (home-page "https://www.freedesktop.org/wiki/Software/libtsm")
228 ;; Hash table implementation is lgpl2.1+ licensed.
229 ;; The wcwidth implementation in external/wcwidth.{h,c} uses a license
231 ;; UCS-4 to UTF-8 encoding is copied from "terminology" which is released
232 ;; under the bsd 2 license.
233 (license (list license:expat license:lgpl2.1+ license:isc license:bsd-2)))))
235 (define-public kmscon
236 (let ((commit "01dd0a231e2125a40ceba5f59fd945ff29bf2cdc")
240 (version (git-version "0.0.0" revision commit))
243 ;; The freedesktop repository is no longer maintained.
245 (url (string-append "https://github.com/Aetf/" name))
249 "0q62kjsvy2iwy8adfiygx2bfwlh83rphgxbis95ycspqidg9py87"))
251 (search-patches "kmscon-runtime-keymap-switch.patch"))
252 (modules '((guix build utils)))
253 (file-name (git-file-name name version))))
254 (build-system gnu-build-system)
256 `(;; The closure of MESA is huge so we'd rather avoid it.
257 #:disallowed-references (,mesa)
259 #:phases (modify-phases %standard-phases
262 (setenv "NOCONFIGURE" "indeed")
263 (invoke "sh" "autogen.sh")))
264 ;; Use elogind instead of systemd.
265 (add-before 'configure 'remove-systemd
267 (substitute* "configure"
268 (("libsystemd-daemon libsystemd-login")
270 (substitute* "src/uterm_systemd.c"
271 (("#include <systemd/sd-login.h>")
272 "#include <elogind/sd-login.h>")
273 ;; We don't have this header.
274 (("#include <systemd/sd-daemon\\.h>")
276 ;; Replace the call to 'sd_booted' by the truth value.
280 `(("pkg-config" ,pkg-config)
281 ("autoconf" ,autoconf)
282 ("automake" ,automake)
284 ("libxslt" ,libxslt) ;to build the man page
285 ("libxml2" ,libxml2) ;for XML_CATALOG_FILES
286 ("docbook-xsl" ,docbook-xsl)))
290 ("libxkbcommon" ,libxkbcommon)
292 ;; MESA can be used for accelerated video output via OpenGLESv2, but
293 ;; it's a bit dependency that we'd rather avoid in the installation
298 (synopsis "Linux KMS-based terminal emulator")
299 (description "Kmscon is a terminal emulator based on Linux's @dfn{kernel
300 mode setting} (KMS). It can replace the in-kernel virtual terminal (VT)
301 implementation with a user-space console. Compared to the Linux console,
302 kmscon provides enhanced features including XKB-compatible internationalized
303 keyboard support, UTF-8 input/font support, hardware-accelerated rendering,
304 multi-seat support, a replacement for @command{mingetty}, and more.")
305 (home-page "https://www.freedesktop.org/wiki/Software/kmscon")
306 ;; Hash table implementation is lgpl2.1+ licensed.
307 ;; The wcwidth implementation in external/wcwidth.{h,c} uses a license
309 ;; UCS-4 to UTF-8 encoding is copied from "terminology" which is released
310 ;; under the bsd 2 license.
311 ;; Unifont-Font is from http://unifoundry.com/unifont.html and licensed
312 ;; under the terms of the GNU GPL.
313 (license (list license:expat license:lgpl2.1+ license:bsd-2
315 (supported-systems (filter (cut string-suffix? "-linux" <>)
316 %supported-systems)))))
318 (define-public libtermkey
324 (uri (string-append "http://www.leonerd.org.uk/code/libtermkey/"
325 "libtermkey-" version ".tar.gz"))
327 (base32 "0psd0kf10q5ixfima0mxz10syy7qq1ilz1npr0rz862xycvzgjyf"))))
328 (build-system gnu-build-system)
332 (string-append "PREFIX=" (assoc-ref %outputs "out")))
333 #:phases (modify-phases %standard-phases
334 (delete 'configure)) ; no configure script
335 #:test-target "test"))
336 (inputs `(("ncurses" ,ncurses)))
337 (native-inputs `(("libtool" ,libtool)
338 ("perl-test-harness" ,perl-test-harness)
339 ("pkg-config" ,pkg-config)))
340 (synopsis "Keyboard entry processing library for terminal-based programs")
342 "Libtermkey handles all the necessary logic to recognise special keys, UTF-8
343 combining, and so on, with a simple interface.")
344 (home-page "http://www.leonerd.org.uk/code/libtermkey")
345 (license license:expat)))
347 (define-public picocom
354 (url "https://github.com/npat-efault/picocom.git")
356 (file-name (git-file-name name version))
359 "1vvjydqf0ax47nvdyyl67jafw5b3sfsav00xid6qpgia1gs2r72n"))))
360 (build-system gnu-build-system)
362 `(#:make-flags '("CC=gcc")
363 #:tests? #f ; no tests
365 (modify-phases %standard-phases
366 (delete 'configure) ; no configure script
368 ;; The Makefile lacks an ‘install’ target.
369 (lambda* (#:key outputs #:allow-other-keys)
370 (let* ((out (assoc-ref outputs "out"))
371 (bin (string-append out "/bin"))
372 (man (string-append out "/share/man/man1")))
373 (install-file "picocom" bin)
374 (install-file "picocom.1" man)))))))
375 (home-page "https://github.com/npat-efault/picocom")
376 (synopsis "Minimal dumb-terminal emulator")
378 "Picocom is a minimal dumb-terminal emulation program. It was designed to
379 serve as a simple and manual modem configuration, testing, and debugging tool.
380 It also serves well as a low-tech serial communications program to allow access
381 to all types of devices that provide serial consoles.")
382 (license license:gpl2+)))
392 ;; The original beep 1.3 at <http://www.johnath.com/beep> has been
393 ;; unmaintained for some time, and vulnerable to at least two CVEs:
394 ;; https://github.com/johnath/beep/issues/11#issuecomment-454056858
395 ;; Use this maintained fork instead.
396 (url "https://github.com/spkr-beep/beep.git")
397 (commit (string-append "v" version))))
398 (file-name (git-file-name name version))
400 (base32 "1bk7g63qpiclbq20iz2x238by8s1b2iafdim7i6dq1i5n01s7lgx"))))
401 (build-system gnu-build-system)
403 `(#:tests? #f ; no tests
405 (list (string-append "prefix=" (assoc-ref %outputs "out"))
406 (string-append "pkgdocdir=$(docdir)/" ,name "-" ,version))
408 (modify-phases %standard-phases
409 (delete 'configure)))) ; no configure script
411 `(("gcc" ,gcc-8))) ; for ‘-fstack-clash-protection’
412 (synopsis "Linux command-line utility to control the PC speaker")
413 (description "beep allows the user to control the PC speaker with precision,
414 allowing different sounds to indicate different events. While it can be run
415 quite happily on the command line, its intended place of residence is within
416 scripts, notifying the user when something interesting occurs. Of course, it
417 has no notion of what's interesing, but it's very good at that notifying part.")
418 (home-page "https://github.com/spkr-beep/beep")
419 (license license:gpl2+)))
421 (define-public unibilium
429 (url "https://github.com/mauke/unibilium.git")
430 (commit (string-append "v" version))))
431 (file-name (git-file-name name version))
434 "1wa9a32wzqnxqh1jh554afj13dzjr6mw2wzqzw8d08nza9pg2ra2"))))
435 (build-system gnu-build-system)
439 (string-append "PREFIX=" (assoc-ref %outputs "out")))
441 ;; FIXME: tests require "prove"
444 (modify-phases %standard-phases
445 (delete 'configure))))
447 `(("libtool" ,libtool)
449 (home-page "https://github.com/mauke/unibilium")
450 (synopsis "Terminfo parsing library")
451 (description "Unibilium is a basic C terminfo library. It doesn't depend
452 on curses or any other library. It also doesn't use global variables, so it
453 should be thread-safe.")
454 (license license:lgpl3+)))
456 (define-public libvterm
463 (uri (string-append "http://www.leonerd.org.uk/code/libvterm/"
464 "libvterm-" version ".tar.gz"))
467 "1s56c8p1qz6frkcri0hg4qyydv2wcccj6n2xmz1dwcdqn38ldsmb"))))
468 (build-system gnu-build-system)
472 (string-append "PREFIX=" (assoc-ref %outputs "out")))
475 (modify-phases %standard-phases
476 (delete 'configure))))
478 `(("libtool" ,libtool)
480 (home-page "http://www.leonerd.org.uk/code/libvterm/")
481 (synopsis "VT220/xterm/ECMA-48 terminal emulator library")
482 (description "Libvterm is an abstract C99 library which implements a VT220
483 or xterm-like terminal emulator. It doesn't use any particular graphics
484 toolkit or output system, instead it invokes callback function pointers that
485 its embedding program should provide it to draw on its behalf. It avoids
486 calling @code{malloc} during normal running state, allowing it to be used in
487 embedded kernel situations.")
488 (license license:expat)))
490 (define-public cool-retro-term
491 (let ((commit "1.1.1")
492 (revision "0")) ;not used currently
494 (name "cool-retro-term")
498 (file-name (string-append name "-" version "-checkout"))
500 (url (string-append "https://github.com/Swordfish90/" name))
504 (base32 "0wb6anchxa5jpn9c73kr4byrf2xlj8x8qzc5x7ny6saj7kbbvp75"))
505 (modules '((guix build utils)
511 '(let* ((fonts '(;"1971-ibm-3278" ; BSD 3-clause
512 "1977-apple2" ; Non-Free
513 "1977-commodore-pet" ; Non-Free
514 "1979-atari-400-800" ; Non-Free
515 ;"1981-ibm-pc ; CC-SA 4.0
516 "1982-commodore64")) ; Non-Free
517 ;"1985-ibm-pc-vga" ; CC-SA 4.0
518 ;"modern-fixedsys-excelsior" ; Redistributable
519 ;"modern-hermit" ; SIL
520 ;"modern-inconsolata"; SIL
521 ;"modern-pro-font-win-tweaked" ; X11
522 ;"modern-proggy-tiny"; X11
523 ;"modern-terminus" ; SIL
524 (name-rx (make-regexp " *name: *\"([^\"]*)\""))
525 (source-rx (make-regexp " *source: \"fonts/([^/]*)[^\"]*\""))
526 (fontname-rx (make-regexp "\"fontName\":\"([^\"]*).*"))
528 ;; Gather font names from all Fonts*.qml files.
529 ;; These will be used to remove items from the
532 (lambda (font-file names)
533 (call-with-input-file font-file
535 (let loop ((name #f) (names names))
536 (let ((line (read-line port)))
538 ((eof-object? line) (pk 'names names))
539 ((regexp-exec name-rx line)
541 (loop (match:substring m 1) names)))
542 ((regexp-exec source-rx line)
544 (let ((font (match:substring m 1)))
545 (if (member font fonts)
546 (loop #f (lset-adjoin string=?
549 (else (loop name names))))))))
550 '() (find-files "app/qml" "Font.*\\.qml"))))
551 ;; Remove the font files themselves
552 (for-each (lambda (font)
553 (delete-file-recursively
554 (string-append "app/qml/fonts/" font)))
556 ;; Remove mention of those fonts in the source
557 (substitute* "app/qml/resources.qrc"
558 (((string-append " *<file>fonts/("
559 (string-join fonts "|")
564 (let ((start-rx (make-regexp " *ListElement\\{"))
565 (end-rx (make-regexp " *\\}")))
566 (with-atomic-file-replacement file
568 (let loop ((line-buffer '())
571 (let ((line (read-line in 'concat)))
573 ((eof-object? line) #t) ;done
574 ((regexp-exec start-rx line)
575 (loop (cons line line-buffer) #t #f))
576 ((or (regexp-exec source-rx line)
577 (regexp-exec fontname-rx line))
579 (let ((font-or-name (match:substring m 1)))
580 (if (or (member font-or-name fonts)
581 (member font-or-name names))
583 (loop (cons line line-buffer)
585 ((regexp-exec end-rx line)
587 (for-each (cut display <> out)
588 (reverse line-buffer))
591 (hold? (loop (cons line line-buffer)
593 (discard? (loop line-buffer #f #t))
594 (else (display line out)
595 (loop '() #f #f)))))))))
596 '("app/qml/FontPixels.qml"
597 "app/qml/FontScanlines.qml"
599 "app/qml/ApplicationSettings.qml"))
600 ;; Final substitution for default scanline and pixel fonts
601 (substitute* "app/qml/ApplicationSettings.qml"
602 (("COMMODORE_PET") "PROGGY_TINY"))
604 (build-system gnu-build-system)
607 ("qtdeclarative" ,qtdeclarative)
608 ("qtgraphicaleffects" ,qtgraphicaleffects)
609 ("qtquickcontrols" ,qtquickcontrols)))
612 (modify-phases %standard-phases
614 (lambda* (#:key outputs #:allow-other-keys)
615 (let ((out (assoc-ref outputs "out")))
616 (substitute* '("qmltermwidget/qmltermwidget.pro")
617 (("INSTALL_DIR = \\$\\$\\[QT_INSTALL_QML\\]")
618 (string-append "INSTALL_DIR = " out "/lib/qt5/qml")))
619 (substitute* '("cool-retro-term.pro" "app/app.pro")
622 (add-after 'install 'wrap-executable
623 (lambda* (#:key inputs outputs #:allow-other-keys)
624 (let ((out (assoc-ref outputs "out"))
625 (qml "/lib/qt5/qml"))
626 (wrap-program (string-append out "/bin/cool-retro-term")
627 `("QML2_IMPORT_PATH" ":" prefix
628 (,(string-append out qml)
630 (string-append (assoc-ref inputs i) qml))
633 "qtquickcontrols")))))
635 (add-after 'install 'add-alternate-name
636 (lambda* (#:key outputs #:allow-other-keys)
637 (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
638 (symlink (string-append bin "/cool-retro-term")
639 (string-append bin "/crt"))
641 (add-after 'install 'install-man
642 (lambda* (#:key outputs #:allow-other-keys)
643 (let ((mandir (string-append (assoc-ref outputs "out")
645 (install-file "packaging/debian/cool-retro-term.1" mandir)
647 (synopsis "Terminal emulator")
649 "Cool-retro-term (crt) is a terminal emulator which mimics the look and
650 feel of the old cathode ray tube (CRT) screens. It has been designed to be
651 eye-candy, customizable, and reasonably lightweight.")
652 (home-page "https://github.com/Swordfish90/cool-retro-term")
654 license:gpl2+ ; qmltermwidget
655 license:gpl3+ ; cool-retro-term
661 (define-public sakura
667 (uri (string-append "https://launchpad.net/" name "/trunk/"
668 version "/+download/" name "-" version
672 "1q463qm41ym7jb3kbzjz7b6x549vmgkb70arpkhsf86yxly1y5m1"))))
673 (build-system cmake-build-system)
675 '(#:tests? #f)) ; no check phase
677 `(("gettext" ,gettext-minimal)
678 ("perl" ,perl) ; for pod2man
679 ("pkg-config" ,pkg-config)))
683 (home-page "https://launchpad.net/sakura")
684 (synopsis "A simple but powerful libvte-based terminal emulator")
685 (description "@code{Sakura} is a terminal emulator based on GTK+ and VTE.
686 It's a terminal emulator with few dependencies, so you don't need a full GNOME
687 desktop installed to have a decent terminal emulator.")
688 (license license:gpl2)))
690 (define-public go-github.com-nsf-termbox-go
691 (let ((commit "4ed959e0540971545eddb8c75514973d670cf739")
694 (name "go-github.com-nsf-termbox-go")
695 (version (git-version "0.0.0" revision commit))
699 (url "https://github.com/nsf/termbox-go.git")
701 (file-name (git-file-name name version))
704 "1vx64i1mg660if3wwm81p4b7lzxfb3qbr39i7misdyld3fc486p9"))))
705 (build-system go-build-system)
707 '(#:import-path "github.com/nsf/termbox-go"))
709 `(("go-github.com-mattn-go-runewidth"
710 ,go-github.com-mattn-go-runewidth)))
711 (synopsis "@code{termbox} provides a minimal API for text-based user
714 "Termbox is a library that provides a minimalistic API which allows the
715 programmer to write text-based user interfaces.")
716 (home-page "https://github.com/nsf/termbox-go")
717 (license license:expat))))
719 (define-public go-golang.org-x-crypto-ssh-terminal
720 (let ((commit "c78caca803c95773f48a844d3dcab04b9bc4d6dd")
723 (name "go-golang.org-x-crypto-ssh-terminal")
724 (version (git-version "0.0.0" revision commit))
728 (url "https://go.googlesource.com/crypto")
730 (file-name (git-file-name name version))
733 "0vxlfxr9y681yn2cfh6dbqmq35vvq4f45ay0mm31ffkny9cms0y4"))))
734 (build-system go-build-system)
736 '(#:import-path "golang.org/x/crypto/ssh/terminal"
737 #:unpack-path "golang.org/x/crypto"
739 (modify-phases %standard-phases
740 (add-before 'reset-gzip-timestamps 'make-gzip-archive-writable
741 (lambda* (#:key outputs #:allow-other-keys)
743 (make-file-writable file))
745 (string-append (assoc-ref outputs "out")
746 "/src/golang.org/x/crypto/ed25519/testdata")
749 (synopsis "Support functions for dealing with terminals in Go")
750 (description "@code{terminal} provides support functions for dealing
751 with terminals in Go.")
752 (home-page "https://go.googlesource.com/crypto/")
753 (license license:bsd-3))))
755 (define-public go-github.com-howeyc-gopass
756 (let ((commit "bf9dde6d0d2c004a008c27aaee91170c786f6db8")
759 (name "go-github.com-howeyc-gopass")
760 (version (git-version "0.0.0" revision commit))
764 (url "https://github.com/howeyc/gopass.git")
766 (file-name (git-file-name name version))
769 "1jxzyfnqi0h1fzlsvlkn10bncic803bfhslyijcxk55mgh297g45"))))
770 (build-system go-build-system)
772 '(#:import-path "github.com/howeyc/gopass"))
774 `(("go-golang.org-x-crypto-ssh-terminal"
775 ,go-golang.org-x-crypto-ssh-terminal)))
776 (synopsis "Retrieve password from a terminal or piped input in Go")
778 "@code{gopass} is a Go package for retrieving a password from user
779 terminal or piped input.")
780 (home-page "https://github.com/howeyc/gopass")
781 (license license:isc))))
783 (define-public python-pyte
790 (uri (pypi-uri "pyte" version))
793 "1an54hvyjm8gncx8cgabz9mkpgjkdb0bkyjlkh7g7f94nr3wnfl7"))))
794 (build-system python-build-system)
797 (modify-phases %standard-phases
798 (add-after 'unpack 'remove-failing-test
799 ;; TODO: Reenable when the `captured` files required by this test
800 ;; are included in the archive.
802 (delete-file "tests/test_input_output.py")
805 `(("python-wcwidth" ,python-wcwidth)))
807 `(("python-pytest-runner" ,python-pytest-runner)
808 ("python-pytest" ,python-pytest)))
809 (home-page "https://pyte.readthedocs.io/")
810 (synopsis "Simple VTXXX-compatible terminal emulator")
811 (description "@code{pyte} is an in-memory VTxxx-compatible terminal
812 emulator. @var{VTxxx} stands for a series of video terminals, developed by
813 DEC between 1970 and 1995. The first and probably most famous one was the
814 VT100 terminal, which is now a de-facto standard for all virtual terminal
817 pyte is a fork of vt102, which was an incomplete pure Python implementation
819 (license license:lgpl3+)))
821 (define-public python2-pyte
822 (package-with-python2 python-pyte))
824 (define-public python-blessings
826 (name "python-blessings")
831 (uri (pypi-uri "blessings" version))
834 "1smngy65p8mi62lgm04icasx22v976szhs2aq95y2ljmi1srb4bl"))))
835 (build-system python-build-system)
837 ;; TODO: For py3, 2to2 is used to convert the code, but test-suite fails
840 `(("python-nose" ,python-nose)))
841 (home-page "https://github.com/erikrose/blessings")
842 (synopsis "Python module to manage terminal color, styling, and
844 (description "Blessings is a pythonic API to manipulate terminal color,
845 styling, and positioning. It provides similar features to curses but avoids
846 some of curses’s limitations: it does not require clearing the whole screen
847 for little changes, provides a scroll-back buffer after the program exits, and
848 avoids styling altogether when the output is redirected to something other
850 (license license:expat)))
852 (define-public python2-blessings
853 (package-with-python2 python-blessings))
855 (define-public python-curtsies
857 (name "python-curtsies")
862 (uri (pypi-uri "curtsies" version))
865 "1vljmw3sy6lrqahhpyg4gk13mzcx3mwhvg8s41698ms3cpgkjipc"))))
866 (build-system python-build-system)
869 (modify-phases %standard-phases
872 (invoke "nosetests" "-v"))))))
874 `(("python-blessings" ,python-blessings)
875 ("python-wcwidth" ,python-wcwidth)))
877 `(("python-mock" ,python-mock)
878 ("python-pyte" ,python-pyte)
879 ("python-nose" ,python-nose)))
880 (home-page "https://github.com/thomasballinger/curtsies")
881 (synopsis "Library for curses-like terminal interaction with colored
883 (description "Curtsies is a Python library for interacting with the
884 terminal. It features string-like objects which carry formatting information,
885 per-line fullscreen terminal rendering, and keyboard input event reporting.")
886 (license license:expat)))
888 (define-public python2-curtsies
889 (package-with-python2 python-curtsies))
899 (url "https://github.com/tmate-io/tmate.git")
901 (file-name (git-file-name name version))
904 "0pfl9vrswzim9ydi1n652h3rax2zrmy6sqkp0r09yy3lw83h4y1r"))))
905 (build-system gnu-build-system)
907 `(("libevent" ,libevent)
910 ("ncurses" ,ncurses)))
912 `(("autoconf" ,autoconf)
913 ("automake" ,automake)
914 ("pkg-config" ,pkg-config)))
915 (home-page "https://tmate.io/")
916 (synopsis "Terminal sharing application")
917 (description "tmate is a terminal sharing application that allows you to
918 share your terminal with other users over the Internet. tmate is a fork of
920 (license license:isc)))
926 (home-page "https://sw.kovidgoyal.net/kitty/")
931 (url "https://github.com/kovidgoyal/kitty.git")
932 (commit (string-append "v" version))))
933 (file-name (git-file-name name version))
936 "1y0vd75j8g61jdj8miml79w5ri3pqli5rv9iq6zdrxvzfa4b2rmb"))
937 (modules '((guix build utils)))
940 ;; patch needed as sphinx-build is used as a python script
941 ;; whereas the guix package uses a bash script launching the
943 (substitute* "docs/conf.py"
944 (("(from kitty.constants import str_version)" kitty-imp)
945 (string-append "sys.path.append(\"..\")\n" kitty-imp)))
946 (substitute* "docs/Makefile"
947 (("^SPHINXBUILD[[:space:]]+= (python3.*)$")
948 "SPHINXBUILD = sphinx-build\n"))
950 (build-system gnu-build-system)
953 ("harfbuzz" ,harfbuzz)
956 ("freetype" ,freetype)
957 ("fontconfig" ,fontconfig)
958 ("pygments" ,python-pygments)
959 ("wayland" ,wayland)))
961 `(("pkg-config" ,pkg-config)
962 ("libxrandr" ,libxrandr)
964 ("libxcursor" ,libxcursor)
966 ("libxinerama" ,libxinerama)
967 ("libgl1-mesa" ,mesa)
968 ("libxkbcommon" ,libxkbcommon)
969 ("sphinx" ,python-sphinx)
970 ("ncurses" ,ncurses) ;; for tic command
971 ("wayland-protocols" ,wayland-protocols)))
973 '(#:phases (modify-phases %standard-phases
975 ;; Wayland backend requires EGL, which isn't found
976 ;; out-of-the-box for some reason. Hard-code it instead.
977 (add-after 'unpack 'hard-code-libegl
979 (let* ((mesa (assoc-ref %build-inputs "libgl1-mesa"))
980 (libegl (string-append mesa "/lib/libEGL.so.1")))
981 (substitute* "glfw/egl_context.c"
982 (("libEGL.so.1") libegl)))
986 (invoke "python3" "setup.py" "linux-package")))
989 (invoke "python3" "setup.py" "test")))
990 (add-before 'install 'rm-pycache
991 ;; created python cache __pycache__ are non deterministic
993 (let ((pycaches (find-files "linux-package/"
996 (for-each delete-file-recursively pycaches)
1000 (let* ((out (assoc-ref %outputs "out"))
1001 (obin (string-append out "/bin"))
1002 (olib (string-append out "/lib"))
1003 (oshare (string-append out "/share")))
1004 (copy-recursively "linux-package/bin" obin)
1005 (copy-recursively "linux-package/share" oshare)
1006 (copy-recursively "linux-package/lib" olib)
1008 (synopsis "Fast, featureful, GPU based terminal emulator")
1009 (description "Kitty is a fast and featureful GPU-based terminal emulator:
1011 @item Offloads rendering to the GPU for lower system load and buttery smooth
1012 scrolling. Uses threaded rendering to minimize input latency.
1013 @item Supports all modern terminal features: graphics (images), unicode,
1014 true-color, OpenType ligatures, mouse protocol, focus tracking, bracketed
1015 paste and several new terminal protocol extensions.
1016 @item Supports tiling multiple terminal windows side by side in different
1017 layouts without needing to use an extra program like tmux.
1018 @item Can be controlled from scripts or the shell prompt, even over SSH.
1019 @item Has a framework for Kittens, small terminal programs that can be used to
1020 extend kitty's functionality. For example, they are used for Unicode input,
1021 hints, and side-by-side diff.
1022 @item Supports startup sessions which allow you to specify the window/tab
1023 layout, working directories and programs to run on startup.
1024 @item Allows you to open the scrollback buffer in a separate window using
1025 arbitrary programs of your choice. This is useful for browsing the history
1026 comfortably in a pager or editor.
1028 (license license:gpl3+)))
1030 (define-public eternalterminal
1032 (name "eternalterminal")
1038 (url "https://github.com/MisterTea/EternalTerminal.git")
1039 (commit (string-append "et-v" version))))
1040 (file-name (git-file-name name version))
1043 "07ynkcnk3z6wafdlnzdxcd308cw1rzabxyq47ybj79lyji3wsgk7"))))
1044 (build-system cmake-build-system)
1046 '(#:configure-flags '("-DBUILD_TEST=ON")
1048 (modify-phases %standard-phases
1049 (add-after 'unpack 'insert-googletests
1050 (lambda* (#:key inputs #:allow-other-keys)
1051 (let ((tests (assoc-ref inputs "googletest")))
1052 (copy-recursively tests "external/googletest"))
1054 (add-after 'install 'dont-provide-gtest-libraries
1055 (lambda* (#:key outputs #:allow-other-keys)
1056 (let ((out (assoc-ref outputs "out")))
1057 (delete-file-recursively (string-append out "/include"))
1058 (delete-file-recursively (string-append out "/lib")))
1061 `(("gflags" ,gflags)
1062 ("libsodium" ,libsodium)
1063 ("protobuf" ,protobuf)))
1065 `(("googletest" ,(package-source googletest))))
1066 (home-page "https://mistertea.github.io/EternalTerminal/")
1067 (synopsis "Remote shell that reconnects without interrupting the session")
1068 (description "@dfn{Eternal Terminal} (ET) is a remote shell that
1069 automatically reconnects without interrupting the session. ET uses SSH to
1070 initialize a secure connection. Unlike SSH sessions, which must be killed and
1071 reconnected after a network outage an ET session will survive network outages
1072 and IP roaming. ET provides the same core functionality as @command{mosh},
1073 while also supporting native scrolling and @command{tmux} control mode
1074 (@code{tmux -CC}).")
1075 (license license:asl2.0)))