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 "0dmz9rpc2fdvcwhcmjnhb48ixn403gxpq03g334d1hgjw2hsyx7x"))))
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 (build-system gnu-build-system)
255 `(;; The closure of MESA is huge so we'd rather avoid it.
256 #:disallowed-references (,mesa)
258 #:phases (modify-phases %standard-phases
261 (setenv "NOCONFIGURE" "indeed")
262 (invoke "sh" "autogen.sh")))
263 ;; Use elogind instead of systemd.
264 (add-before 'configure 'remove-systemd
266 (substitute* "configure"
267 (("libsystemd-daemon libsystemd-login")
269 (substitute* "src/uterm_systemd.c"
270 (("#include <systemd/sd-login.h>")
271 "#include <elogind/sd-login.h>")
272 ;; We don't have this header.
273 (("#include <systemd/sd-daemon\\.h>")
275 ;; Replace the call to 'sd_booted' by the truth value.
279 `(("pkg-config" ,pkg-config)
280 ("autoconf" ,autoconf)
281 ("automake" ,automake)
283 ("libxslt" ,libxslt) ;to build the man page
284 ("libxml2" ,libxml2) ;for XML_CATALOG_FILES
285 ("docbook-xsl" ,docbook-xsl)))
289 ("libxkbcommon" ,libxkbcommon)
291 ;; MESA can be used for accelerated video output via OpenGLESv2, but
292 ;; it's a bit dependency that we'd rather avoid in the installation
297 (synopsis "Linux KMS-based terminal emulator")
298 (description "Kmscon is a terminal emulator based on Linux's @dfn{kernel
299 mode setting} (KMS). It can replace the in-kernel virtual terminal (VT)
300 implementation with a user-space console. Compared to the Linux console,
301 kmscon provides enhanced features including XKB-compatible internationalized
302 keyboard support, UTF-8 input/font support, hardware-accelerated rendering,
303 multi-seat support, a replacement for @command{mingetty}, and more.")
304 (home-page "https://www.freedesktop.org/wiki/Software/kmscon")
305 ;; Hash table implementation is lgpl2.1+ licensed.
306 ;; The wcwidth implementation in external/wcwidth.{h,c} uses a license
308 ;; UCS-4 to UTF-8 encoding is copied from "terminology" which is released
309 ;; under the bsd 2 license.
310 ;; Unifont-Font is from http://unifoundry.com/unifont.html and licensed
311 ;; under the terms of the GNU GPL.
312 (license (list license:expat license:lgpl2.1+ license:bsd-2
314 (supported-systems (filter (cut string-suffix? "-linux" <>)
315 %supported-systems)))))
317 (define-public libtermkey
323 (uri (string-append "http://www.leonerd.org.uk/code/libtermkey/"
324 "libtermkey-" version ".tar.gz"))
326 (base32 "0psd0kf10q5ixfima0mxz10syy7qq1ilz1npr0rz862xycvzgjyf"))))
327 (build-system gnu-build-system)
331 (string-append "PREFIX=" (assoc-ref %outputs "out")))
332 #:phases (modify-phases %standard-phases
333 (delete 'configure)) ; no configure script
334 #:test-target "test"))
335 (inputs `(("ncurses" ,ncurses)))
336 (native-inputs `(("libtool" ,libtool)
337 ("perl-test-harness" ,perl-test-harness)
338 ("pkg-config" ,pkg-config)))
339 (synopsis "Keyboard entry processing library for terminal-based programs")
341 "Libtermkey handles all the necessary logic to recognise special keys, UTF-8
342 combining, and so on, with a simple interface.")
343 (home-page "http://www.leonerd.org.uk/code/libtermkey")
344 (license license:expat)))
346 (define-public picocom
353 (url "https://github.com/npat-efault/picocom.git")
355 (file-name (git-file-name name version))
358 "1vvjydqf0ax47nvdyyl67jafw5b3sfsav00xid6qpgia1gs2r72n"))))
359 (build-system gnu-build-system)
361 `(#:make-flags '("CC=gcc")
362 #:tests? #f ; no tests
364 (modify-phases %standard-phases
365 (delete 'configure) ; no configure script
367 ;; The Makefile lacks an ‘install’ target.
368 (lambda* (#:key outputs #:allow-other-keys)
369 (let* ((out (assoc-ref outputs "out"))
370 (bin (string-append out "/bin"))
371 (man (string-append out "/share/man/man1")))
372 (install-file "picocom" bin)
373 (install-file "picocom.1" man)))))))
374 (home-page "https://github.com/npat-efault/picocom")
375 (synopsis "Minimal dumb-terminal emulator")
377 "Picocom is a minimal dumb-terminal emulation program. It was designed to
378 serve as a simple and manual modem configuration, testing, and debugging tool.
379 It also serves well as a low-tech serial communications program to allow access
380 to all types of devices that provide serial consoles.")
381 (license license:gpl2+)))
391 ;; The original beep 1.3 at <http://www.johnath.com/beep> has been
392 ;; unmaintained for some time, and vulnerable to at least two CVEs:
393 ;; https://github.com/johnath/beep/issues/11#issuecomment-454056858
394 ;; Use this maintained fork instead.
395 (url "https://github.com/spkr-beep/beep.git")
396 (commit (string-append "v" version))))
397 (file-name (git-file-name name version))
399 (base32 "1bk7g63qpiclbq20iz2x238by8s1b2iafdim7i6dq1i5n01s7lgx"))))
400 (build-system gnu-build-system)
402 `(#:tests? #f ; no tests
404 (list (string-append "prefix=" (assoc-ref %outputs "out"))
405 (string-append "pkgdocdir=$(docdir)/" ,name "-" ,version))
407 (modify-phases %standard-phases
408 (delete 'configure)))) ; no configure script
410 `(("gcc" ,gcc-8))) ; for ‘-fstack-clash-protection’
411 (synopsis "Linux command-line utility to control the PC speaker")
412 (description "beep allows the user to control the PC speaker with precision,
413 allowing different sounds to indicate different events. While it can be run
414 quite happily on the command line, its intended place of residence is within
415 scripts, notifying the user when something interesting occurs. Of course, it
416 has no notion of what's interesing, but it's very good at that notifying part.")
417 (home-page "https://github.com/spkr-beep/beep")
418 (license license:gpl2+)))
420 (define-public unibilium
428 (url "https://github.com/mauke/unibilium.git")
429 (commit (string-append "v" version))))
430 (file-name (git-file-name name version))
433 "1wa9a32wzqnxqh1jh554afj13dzjr6mw2wzqzw8d08nza9pg2ra2"))))
434 (build-system gnu-build-system)
438 (string-append "PREFIX=" (assoc-ref %outputs "out")))
440 ;; FIXME: tests require "prove"
443 (modify-phases %standard-phases
444 (delete 'configure))))
446 `(("libtool" ,libtool)
448 (home-page "https://github.com/mauke/unibilium")
449 (synopsis "Terminfo parsing library")
450 (description "Unibilium is a basic C terminfo library. It doesn't depend
451 on curses or any other library. It also doesn't use global variables, so it
452 should be thread-safe.")
453 (license license:lgpl3+)))
455 (define-public libvterm
462 (uri (string-append "http://www.leonerd.org.uk/code/libvterm/"
463 "libvterm-" version ".tar.gz"))
466 "1s56c8p1qz6frkcri0hg4qyydv2wcccj6n2xmz1dwcdqn38ldsmb"))))
467 (build-system gnu-build-system)
471 (string-append "PREFIX=" (assoc-ref %outputs "out")))
474 (modify-phases %standard-phases
475 (delete 'configure))))
477 `(("libtool" ,libtool)
479 (home-page "http://www.leonerd.org.uk/code/libvterm/")
480 (synopsis "VT220/xterm/ECMA-48 terminal emulator library")
481 (description "Libvterm is an abstract C99 library which implements a VT220
482 or xterm-like terminal emulator. It doesn't use any particular graphics
483 toolkit or output system, instead it invokes callback function pointers that
484 its embedding program should provide it to draw on its behalf. It avoids
485 calling @code{malloc} during normal running state, allowing it to be used in
486 embedded kernel situations.")
487 (license license:expat)))
489 (define-public cool-retro-term
490 (let ((commit "1.1.1")
491 (revision "0")) ;not used currently
493 (name "cool-retro-term")
497 (file-name (string-append name "-" version "-checkout"))
499 (url (string-append "https://github.com/Swordfish90/" name))
503 (base32 "0wb6anchxa5jpn9c73kr4byrf2xlj8x8qzc5x7ny6saj7kbbvp75"))
504 (modules '((guix build utils)
510 '(let* ((fonts '(;"1971-ibm-3278" ; BSD 3-clause
511 "1977-apple2" ; Non-Free
512 "1977-commodore-pet" ; Non-Free
513 "1979-atari-400-800" ; Non-Free
514 ;"1981-ibm-pc ; CC-SA 4.0
515 "1982-commodore64")) ; Non-Free
516 ;"1985-ibm-pc-vga" ; CC-SA 4.0
517 ;"modern-fixedsys-excelsior" ; Redistributable
518 ;"modern-hermit" ; SIL
519 ;"modern-inconsolata"; SIL
520 ;"modern-pro-font-win-tweaked" ; X11
521 ;"modern-proggy-tiny"; X11
522 ;"modern-terminus" ; SIL
523 (name-rx (make-regexp " *name: *\"([^\"]*)\""))
524 (source-rx (make-regexp " *source: \"fonts/([^/]*)[^\"]*\""))
525 (fontname-rx (make-regexp "\"fontName\":\"([^\"]*).*"))
527 ;; Gather font names from all Fonts*.qml files.
528 ;; These will be used to remove items from the
531 (lambda (font-file names)
532 (call-with-input-file font-file
534 (let loop ((name #f) (names names))
535 (let ((line (read-line port)))
537 ((eof-object? line) (pk 'names names))
538 ((regexp-exec name-rx line)
540 (loop (match:substring m 1) names)))
541 ((regexp-exec source-rx line)
543 (let ((font (match:substring m 1)))
544 (if (member font fonts)
545 (loop #f (lset-adjoin string=?
548 (else (loop name names))))))))
549 '() (find-files "app/qml" "Font.*\\.qml"))))
550 ;; Remove the font files themselves
551 (for-each (lambda (font)
552 (delete-file-recursively
553 (string-append "app/qml/fonts/" font)))
555 ;; Remove mention of those fonts in the source
556 (substitute* "app/qml/resources.qrc"
557 (((string-append " *<file>fonts/("
558 (string-join fonts "|")
563 (let ((start-rx (make-regexp " *ListElement\\{"))
564 (end-rx (make-regexp " *\\}")))
565 (with-atomic-file-replacement file
567 (let loop ((line-buffer '())
570 (let ((line (read-line in 'concat)))
572 ((eof-object? line) #t) ;done
573 ((regexp-exec start-rx line)
574 (loop (cons line line-buffer) #t #f))
575 ((or (regexp-exec source-rx line)
576 (regexp-exec fontname-rx line))
578 (let ((font-or-name (match:substring m 1)))
579 (if (or (member font-or-name fonts)
580 (member font-or-name names))
582 (loop (cons line line-buffer)
584 ((regexp-exec end-rx line)
586 (for-each (cut display <> out)
587 (reverse line-buffer))
590 (hold? (loop (cons line line-buffer)
592 (discard? (loop line-buffer #f #t))
593 (else (display line out)
594 (loop '() #f #f)))))))))
595 '("app/qml/FontPixels.qml"
596 "app/qml/FontScanlines.qml"
598 "app/qml/ApplicationSettings.qml"))
599 ;; Final substitution for default scanline and pixel fonts
600 (substitute* "app/qml/ApplicationSettings.qml"
601 (("COMMODORE_PET") "PROGGY_TINY"))
603 (build-system gnu-build-system)
606 ("qtdeclarative" ,qtdeclarative)
607 ("qtgraphicaleffects" ,qtgraphicaleffects)
608 ("qtquickcontrols" ,qtquickcontrols)))
611 (modify-phases %standard-phases
613 (lambda* (#:key outputs #:allow-other-keys)
614 (let ((out (assoc-ref outputs "out")))
615 (substitute* '("qmltermwidget/qmltermwidget.pro")
616 (("INSTALL_DIR = \\$\\$\\[QT_INSTALL_QML\\]")
617 (string-append "INSTALL_DIR = " out "/lib/qt5/qml")))
618 (substitute* '("cool-retro-term.pro" "app/app.pro")
621 (add-after 'install 'wrap-executable
622 (lambda* (#:key inputs outputs #:allow-other-keys)
623 (let ((out (assoc-ref outputs "out"))
624 (qml "/lib/qt5/qml"))
625 (wrap-program (string-append out "/bin/cool-retro-term")
626 `("QML2_IMPORT_PATH" ":" prefix
627 (,(string-append out qml)
629 (string-append (assoc-ref inputs i) qml))
632 "qtquickcontrols")))))
634 (add-after 'install 'add-alternate-name
635 (lambda* (#:key outputs #:allow-other-keys)
636 (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
637 (symlink (string-append bin "/cool-retro-term")
638 (string-append bin "/crt"))
640 (add-after 'install 'install-man
641 (lambda* (#:key outputs #:allow-other-keys)
642 (let ((mandir (string-append (assoc-ref outputs "out")
644 (install-file "packaging/debian/cool-retro-term.1" mandir)
646 (synopsis "Terminal emulator")
648 "Cool-retro-term (crt) is a terminal emulator which mimics the look and
649 feel of the old cathode ray tube (CRT) screens. It has been designed to be
650 eye-candy, customizable, and reasonably lightweight.")
651 (home-page "https://github.com/Swordfish90/cool-retro-term")
653 license:gpl2+ ; qmltermwidget
654 license:gpl3+ ; cool-retro-term
660 (define-public sakura
666 (uri (string-append "https://launchpad.net/" name "/trunk/"
667 version "/+download/" name "-" version
671 "1q463qm41ym7jb3kbzjz7b6x549vmgkb70arpkhsf86yxly1y5m1"))))
672 (build-system cmake-build-system)
674 '(#:tests? #f)) ; no check phase
676 `(("gettext" ,gettext-minimal)
677 ("perl" ,perl) ; for pod2man
678 ("pkg-config" ,pkg-config)))
682 (home-page "https://launchpad.net/sakura")
683 (synopsis "A simple but powerful libvte-based terminal emulator")
684 (description "@code{Sakura} is a terminal emulator based on GTK+ and VTE.
685 It's a terminal emulator with few dependencies, so you don't need a full GNOME
686 desktop installed to have a decent terminal emulator.")
687 (license license:gpl2)))
689 (define-public go-github.com-nsf-termbox-go
690 (let ((commit "4ed959e0540971545eddb8c75514973d670cf739")
693 (name "go-github.com-nsf-termbox-go")
694 (version (git-version "0.0.0" revision commit))
698 (url "https://github.com/nsf/termbox-go.git")
700 (file-name (git-file-name name version))
703 "1vx64i1mg660if3wwm81p4b7lzxfb3qbr39i7misdyld3fc486p9"))))
704 (build-system go-build-system)
706 '(#:import-path "github.com/nsf/termbox-go"))
708 `(("go-github.com-mattn-go-runewidth"
709 ,go-github.com-mattn-go-runewidth)))
710 (synopsis "@code{termbox} provides a minimal API for text-based user
713 "Termbox is a library that provides a minimalistic API which allows the
714 programmer to write text-based user interfaces.")
715 (home-page "https://github.com/nsf/termbox-go")
716 (license license:expat))))
718 (define-public go-golang.org-x-crypto-ssh-terminal
719 (let ((commit "c78caca803c95773f48a844d3dcab04b9bc4d6dd")
722 (name "go-golang.org-x-crypto-ssh-terminal")
723 (version (git-version "0.0.0" revision commit))
727 (url "https://go.googlesource.com/crypto")
729 (file-name (git-file-name name version))
732 "0vxlfxr9y681yn2cfh6dbqmq35vvq4f45ay0mm31ffkny9cms0y4"))))
733 (build-system go-build-system)
735 '(#:import-path "golang.org/x/crypto/ssh/terminal"
736 #:unpack-path "golang.org/x/crypto"
738 (modify-phases %standard-phases
739 (add-before 'reset-gzip-timestamps 'make-gzip-archive-writable
740 (lambda* (#:key outputs #:allow-other-keys)
742 (make-file-writable file))
744 (string-append (assoc-ref outputs "out")
745 "/src/golang.org/x/crypto/ed25519/testdata")
748 (synopsis "Support functions for dealing with terminals in Go")
749 (description "@code{terminal} provides support functions for dealing
750 with terminals in Go.")
751 (home-page "https://go.googlesource.com/crypto/")
752 (license license:bsd-3))))
754 (define-public go-github.com-howeyc-gopass
755 (let ((commit "bf9dde6d0d2c004a008c27aaee91170c786f6db8")
758 (name "go-github.com-howeyc-gopass")
759 (version (git-version "0.0.0" revision commit))
763 (url "https://github.com/howeyc/gopass.git")
765 (file-name (git-file-name name version))
768 "1jxzyfnqi0h1fzlsvlkn10bncic803bfhslyijcxk55mgh297g45"))))
769 (build-system go-build-system)
771 '(#:import-path "github.com/howeyc/gopass"))
773 `(("go-golang.org-x-crypto-ssh-terminal"
774 ,go-golang.org-x-crypto-ssh-terminal)))
775 (synopsis "Retrieve password from a terminal or piped input in Go")
777 "@code{gopass} is a Go package for retrieving a password from user
778 terminal or piped input.")
779 (home-page "https://github.com/howeyc/gopass")
780 (license license:isc))))
782 (define-public python-pyte
789 (uri (pypi-uri "pyte" version))
792 "1an54hvyjm8gncx8cgabz9mkpgjkdb0bkyjlkh7g7f94nr3wnfl7"))))
793 (build-system python-build-system)
796 (modify-phases %standard-phases
797 (add-after 'unpack 'remove-failing-test
798 ;; TODO: Reenable when the `captured` files required by this test
799 ;; are included in the archive.
801 (delete-file "tests/test_input_output.py")
804 `(("python-wcwidth" ,python-wcwidth)))
806 `(("python-pytest-runner" ,python-pytest-runner)
807 ("python-pytest" ,python-pytest)))
808 (home-page "https://pyte.readthedocs.io/")
809 (synopsis "Simple VTXXX-compatible terminal emulator")
810 (description "@code{pyte} is an in-memory VTxxx-compatible terminal
811 emulator. @var{VTxxx} stands for a series of video terminals, developed by
812 DEC between 1970 and 1995. The first and probably most famous one was the
813 VT100 terminal, which is now a de-facto standard for all virtual terminal
816 pyte is a fork of vt102, which was an incomplete pure Python implementation
818 (license license:lgpl3+)))
820 (define-public python2-pyte
821 (package-with-python2 python-pyte))
823 (define-public python-blessings
825 (name "python-blessings")
830 (uri (pypi-uri "blessings" version))
833 "1smngy65p8mi62lgm04icasx22v976szhs2aq95y2ljmi1srb4bl"))))
834 (build-system python-build-system)
836 ;; TODO: For py3, 2to2 is used to convert the code, but test-suite fails
839 `(("python-nose" ,python-nose)))
840 (home-page "https://github.com/erikrose/blessings")
841 (synopsis "Python module to manage terminal color, styling, and
843 (description "Blessings is a pythonic API to manipulate terminal color,
844 styling, and positioning. It provides similar features to curses but avoids
845 some of curses’s limitations: it does not require clearing the whole screen
846 for little changes, provides a scroll-back buffer after the program exits, and
847 avoids styling altogether when the output is redirected to something other
849 (license license:expat)))
851 (define-public python2-blessings
852 (package-with-python2 python-blessings))
854 (define-public python-curtsies
856 (name "python-curtsies")
861 (uri (pypi-uri "curtsies" version))
864 "1vljmw3sy6lrqahhpyg4gk13mzcx3mwhvg8s41698ms3cpgkjipc"))))
865 (build-system python-build-system)
868 (modify-phases %standard-phases
871 (invoke "nosetests" "-v"))))))
873 `(("python-blessings" ,python-blessings)
874 ("python-wcwidth" ,python-wcwidth)))
876 `(("python-mock" ,python-mock)
877 ("python-pyte" ,python-pyte)
878 ("python-nose" ,python-nose)))
879 (home-page "https://github.com/thomasballinger/curtsies")
880 (synopsis "Library for curses-like terminal interaction with colored
882 (description "Curtsies is a Python library for interacting with the
883 terminal. It features string-like objects which carry formatting information,
884 per-line fullscreen terminal rendering, and keyboard input event reporting.")
885 (license license:expat)))
887 (define-public python2-curtsies
888 (package-with-python2 python-curtsies))
898 (url "https://github.com/tmate-io/tmate.git")
900 (file-name (git-file-name name version))
903 "0pfl9vrswzim9ydi1n652h3rax2zrmy6sqkp0r09yy3lw83h4y1r"))))
904 (build-system gnu-build-system)
906 `(("libevent" ,libevent)
909 ("ncurses" ,ncurses)))
911 `(("autoconf" ,autoconf)
912 ("automake" ,automake)
913 ("pkg-config" ,pkg-config)))
914 (home-page "https://tmate.io/")
915 (synopsis "Terminal sharing application")
916 (description "tmate is a terminal sharing application that allows you to
917 share your terminal with other users over the Internet. tmate is a fork of
919 (license license:isc)))
925 (home-page "https://sw.kovidgoyal.net/kitty/")
930 (url "https://github.com/kovidgoyal/kitty.git")
931 (commit (string-append "v" version))))
932 (file-name (git-file-name name version))
935 "1y0vd75j8g61jdj8miml79w5ri3pqli5rv9iq6zdrxvzfa4b2rmb"))
936 (modules '((guix build utils)))
939 ;; patch needed as sphinx-build is used as a python script
940 ;; whereas the guix package uses a bash script launching the
942 (substitute* "docs/conf.py"
943 (("(from kitty.constants import str_version)" kitty-imp)
944 (string-append "sys.path.append(\"..\")\n" kitty-imp)))
945 (substitute* "docs/Makefile"
946 (("^SPHINXBUILD[[:space:]]+= (python3.*)$")
947 "SPHINXBUILD = sphinx-build\n"))
949 (build-system gnu-build-system)
952 ("harfbuzz" ,harfbuzz)
955 ("freetype" ,freetype)
956 ("fontconfig" ,fontconfig)
957 ("pygments" ,python-pygments)
958 ("wayland" ,wayland)))
960 `(("pkg-config" ,pkg-config)
961 ("libxrandr" ,libxrandr)
963 ("libxcursor" ,libxcursor)
965 ("libxinerama" ,libxinerama)
966 ("libgl1-mesa" ,mesa)
967 ("libxkbcommon" ,libxkbcommon)
968 ("sphinx" ,python-sphinx)
969 ("ncurses" ,ncurses) ;; for tic command
970 ("wayland-protocols" ,wayland-protocols)))
972 '(#:phases (modify-phases %standard-phases
974 ;; Wayland backend requires EGL, which isn't found
975 ;; out-of-the-box for some reason. Hard-code it instead.
976 (add-after 'unpack 'hard-code-libegl
978 (let* ((mesa (assoc-ref %build-inputs "libgl1-mesa"))
979 (libegl (string-append mesa "/lib/libEGL.so.1")))
980 (substitute* "glfw/egl_context.c"
981 (("libEGL.so.1") libegl)))
985 (invoke "python3" "setup.py" "linux-package")))
988 (invoke "python3" "setup.py" "test")))
989 (add-before 'install 'rm-pycache
990 ;; created python cache __pycache__ are non deterministic
992 (let ((pycaches (find-files "linux-package/"
995 (for-each delete-file-recursively pycaches)
999 (let* ((out (assoc-ref %outputs "out"))
1000 (obin (string-append out "/bin"))
1001 (olib (string-append out "/lib"))
1002 (oshare (string-append out "/share")))
1003 (copy-recursively "linux-package/bin" obin)
1004 (copy-recursively "linux-package/share" oshare)
1005 (copy-recursively "linux-package/lib" olib)
1007 (synopsis "Fast, featureful, GPU based terminal emulator")
1008 (description "Kitty is a fast and featureful GPU-based terminal emulator:
1010 @item Offloads rendering to the GPU for lower system load and buttery smooth
1011 scrolling. Uses threaded rendering to minimize input latency.
1012 @item Supports all modern terminal features: graphics (images), unicode,
1013 true-color, OpenType ligatures, mouse protocol, focus tracking, bracketed
1014 paste and several new terminal protocol extensions.
1015 @item Supports tiling multiple terminal windows side by side in different
1016 layouts without needing to use an extra program like tmux.
1017 @item Can be controlled from scripts or the shell prompt, even over SSH.
1018 @item Has a framework for Kittens, small terminal programs that can be used to
1019 extend kitty's functionality. For example, they are used for Unicode input,
1020 hints, and side-by-side diff.
1021 @item Supports startup sessions which allow you to specify the window/tab
1022 layout, working directories and programs to run on startup.
1023 @item Allows you to open the scrollback buffer in a separate window using
1024 arbitrary programs of your choice. This is useful for browsing the history
1025 comfortably in a pager or editor.
1027 (license license:gpl3+)))
1029 (define-public eternalterminal
1031 (name "eternalterminal")
1037 (url "https://github.com/MisterTea/EternalTerminal.git")
1038 (commit (string-append "et-v" version))))
1039 (file-name (git-file-name name version))
1042 "07ynkcnk3z6wafdlnzdxcd308cw1rzabxyq47ybj79lyji3wsgk7"))))
1043 (build-system cmake-build-system)
1045 '(#:configure-flags '("-DBUILD_TEST=ON")
1047 (modify-phases %standard-phases
1048 (add-after 'unpack 'insert-googletests
1049 (lambda* (#:key inputs #:allow-other-keys)
1050 (let ((tests (assoc-ref inputs "googletest")))
1051 (copy-recursively tests "external/googletest"))
1053 (add-after 'install 'dont-provide-gtest-libraries
1054 (lambda* (#:key outputs #:allow-other-keys)
1055 (let ((out (assoc-ref outputs "out")))
1056 (delete-file-recursively (string-append out "/include"))
1057 (delete-file-recursively (string-append out "/lib")))
1060 `(("gflags" ,gflags)
1061 ("libsodium" ,libsodium)
1062 ("protobuf" ,protobuf)))
1064 `(("googletest" ,(package-source googletest))))
1065 (home-page "https://mistertea.github.io/EternalTerminal/")
1066 (synopsis "Remote shell that reconnects without interrupting the session")
1067 (description "@dfn{Eternal Terminal} (ET) is a remote shell that
1068 automatically reconnects without interrupting the session. ET uses SSH to
1069 initialize a secure connection. Unlike SSH sessions, which must be killed and
1070 reconnected after a network outage an ET session will survive network outages
1071 and IP roaming. ET provides the same core functionality as @command{mosh},
1072 while also supporting native scrolling and @command{tmux} control mode
1073 (@code{tmux -CC}).")
1074 (license license:asl2.0)))