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, 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>
19 ;;; This file is part of GNU Guix.
21 ;;; GNU Guix is free software; you can redistribute it and/or modify it
22 ;;; under the terms of the GNU General Public License as published by
23 ;;; the Free Software Foundation; either version 3 of the License, or (at
24 ;;; your option) any later version.
26 ;;; GNU Guix is distributed in the hope that it will be useful, but
27 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
28 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
29 ;;; GNU General Public License for more details.
31 ;;; You should have received a copy of the GNU General Public License
32 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
34 (define-module (gnu packages terminals)
35 #:use-module ((guix licenses) #:prefix license:)
36 #:use-module (guix build-system cmake)
37 #:use-module (guix build-system gnu)
38 #:use-module (guix build-system glib-or-gtk)
39 #:use-module (guix build-system go)
40 #:use-module (guix build-system python)
41 #:use-module (guix download)
42 #:use-module (guix git-download)
43 #:use-module (guix packages)
44 #:use-module (gnu packages)
45 #:use-module (gnu packages autotools)
46 #:use-module (gnu packages check)
47 #:use-module (gnu packages compression)
48 #:use-module (gnu packages crypto)
49 #:use-module (gnu packages docbook)
50 #:use-module (gnu packages fontutils)
51 #:use-module (gnu packages freedesktop)
52 #:use-module (gnu packages gcc)
53 #:use-module (gnu packages gettext)
54 #:use-module (gnu packages gl)
55 #:use-module (gnu packages glib)
56 #:use-module (gnu packages gnome)
57 #:use-module (gnu packages golang)
58 #:use-module (gnu packages gtk)
59 #:use-module (gnu packages image)
60 #:use-module (gnu packages libcanberra)
61 #:use-module (gnu packages libevent)
62 #:use-module (gnu packages linux)
63 #:use-module (gnu packages ncurses)
64 #:use-module (gnu packages perl)
65 #:use-module (gnu packages perl-check)
66 #:use-module (gnu packages pkg-config)
67 #:use-module (gnu packages popt)
68 #:use-module (gnu packages protobuf)
69 #:use-module (gnu packages python)
70 #:use-module (gnu packages python-web)
71 #:use-module (gnu packages python-xyz)
72 #:use-module (gnu packages qt)
73 #:use-module (gnu packages serialization)
74 #:use-module (gnu packages sphinx)
75 #:use-module (gnu packages ssh)
76 #:use-module (gnu packages textutils)
77 #:use-module (gnu packages xdisorg)
78 #:use-module (gnu packages xml)
79 #:use-module (gnu packages xorg)
80 #:use-module (srfi srfi-26))
89 (url "https://github.com/lanoxx/tilda.git")
90 (commit (string-append "tilda-" version))))
91 (file-name (git-file-name name version))
94 "154rsldqjv2m1bddisb930qicb0y35kx7bxq392n2hn68jr2pxkj"))))
95 (build-system glib-or-gtk-build-system)
97 '(#:phases (modify-phases %standard-phases
100 (setenv "NOCONFIGURE" "true")
101 (invoke "sh" "autogen.sh"))))))
103 `(("autoconf" ,autoconf)
104 ("automake" ,automake)
105 ("gettext" ,gettext-minimal)
106 ("pkg-config" ,pkg-config)))
108 `(("libconfuse" ,libconfuse)
110 (synopsis "GTK+-based drop-down terminal")
111 (description "Tilda is a terminal emulator similar to normal terminals like
112 gnome-terminal (GNOME) or Konsole (KDE), with the difference that it drops down
113 from the edge of a screen when a certain configurable hotkey is pressed. This
114 is similar to the built-in consoles in some applications. Tilda is highly
115 configurable through a graphical wizard.")
116 (home-page "https://github.com/lanoxx/tilda")
117 (license license:gpl2+)))
119 (define-public termite
127 (url (string-append "https://github.com/thestinger/"
129 (commit (string-append "v" version))
131 (file-name (string-append name "-" version "-checkout"))
134 "0hp1x6lj098m3jgna274wv5dv60lnzg22297di68g4hw9djjyd2k"))))
135 (build-system gnu-build-system)
138 (modify-phases %standard-phases
141 ;; This sets the destination when installing the necessary terminal
142 ;; capability data, which are not provided by 'ncurses'. See
143 ;; <https://lists.gnu.org/archive/html/bug-ncurses/2009-10/msg00031.html>.
144 #:make-flags (list "PREFIX="
145 (string-append "VERSION=v" (version))
146 (string-append "DESTDIR="
147 (assoc-ref %outputs "out")))))
151 ("ncurses" ,ncurses)))
153 `(("pkg-config" ,pkg-config)))
155 ;; FIXME: This should only be located in 'ncurses'. Nonetheless it is
156 ;; provided for usability reasons. See <https://bugs.gnu.org/22138>.
158 (list (search-path-specification
159 (variable "TERMINFO_DIRS")
160 (files '("share/terminfo")))))
161 (home-page "https://github.com/thestinger/termite/")
162 (synopsis "Keyboard-centric, VTE-based terminal")
163 (description "Termite is a minimal terminal emulator designed for use with
164 tiling window managers. It is a modal application, similar to Vim, with an
165 insert mode and command mode where keybindings have different functions.")
167 ;; Files under util/ are under the Expat license; the rest is LGPLv2+.
168 (license license:lgpl2.0+)))
170 (define-public asciinema
177 (uri (pypi-uri "asciinema" version))
180 "1jrf8c8711gkdilmvyv3d37kp8xfvdc5cqighw5k92a6g9z4acgv"))))
181 (build-system python-build-system)
184 (modify-phases %standard-phases
185 (add-before 'build 'patch-exec-paths
186 (lambda* (#:key inputs #:allow-other-keys)
187 (let ((ncurses (assoc-ref inputs "ncurses")))
188 (substitute* "asciinema/recorder.py"
190 (string-append "'" ncurses "/bin/tput'"))))
192 (inputs `(("ncurses" ,ncurses)))
195 `(("python-requests" ,python-requests)))
196 (home-page "https://asciinema.org")
197 (synopsis "Terminal session recorder")
199 "Use asciinema to record and share your terminal sessions, the right way.
200 Forget screen recording apps and blurry video. Enjoy a lightweight, purely
201 text-based approach to terminal recording.")
202 (license license:gpl3)))
204 (define-public libtsm
205 (let ((commit "f70e37982f382b03c6939dac3d5f814450bda253")
209 (version (git-version "0.0.0" revision commit))
212 ;; The freedesktop repository is no longer maintained.
214 (url (string-append "https://github.com/Aetf/" name))
218 "0mwn91i5h5d518i1s05y7hzv6bc13vzcvxszpfh77473iwg4wprx"))))
219 (build-system cmake-build-system)
221 `(#:configure-flags '("-DBUILD_TESTING=ON")))
223 `(("pkg-config" ,pkg-config)))
225 `(("libxkbcommon" ,libxkbcommon)
227 (synopsis "Xterm state machine library")
228 (description "TSM is a state machine for DEC VT100-VT520 compatible
229 terminal emulators. It tries to support all common standards while keeping
230 compatibility to existing emulators like xterm, gnome-terminal, konsole, etc.")
231 (home-page "https://www.freedesktop.org/wiki/Software/libtsm")
232 ;; Hash table implementation is lgpl2.1+ licensed.
233 ;; The wcwidth implementation in external/wcwidth.{h,c} uses a license
235 ;; UCS-4 to UTF-8 encoding is copied from "terminology" which is released
236 ;; under the bsd 2 license.
237 (license (list license:expat license:lgpl2.1+ license:isc license:bsd-2)))))
239 (define-public kmscon
240 (let ((commit "01dd0a231e2125a40ceba5f59fd945ff29bf2cdc")
244 (version (git-version "0.0.0" revision commit))
247 ;; The freedesktop repository is no longer maintained.
249 (url (string-append "https://github.com/Aetf/" name))
253 "0q62kjsvy2iwy8adfiygx2bfwlh83rphgxbis95ycspqidg9py87"))
255 (search-patches "kmscon-runtime-keymap-switch.patch"))
256 (modules '((guix build utils)))
257 (file-name (git-file-name name version))))
258 (build-system gnu-build-system)
260 `(;; The closure of MESA is huge so we'd rather avoid it.
261 #:disallowed-references (,mesa)
263 #:phases (modify-phases %standard-phases
266 (setenv "NOCONFIGURE" "indeed")
267 (invoke "sh" "autogen.sh")))
268 ;; Use elogind instead of systemd.
269 (add-before 'configure 'remove-systemd
271 (substitute* "configure"
272 (("libsystemd-daemon libsystemd-login")
274 (substitute* "src/uterm_systemd.c"
275 (("#include <systemd/sd-login.h>")
276 "#include <elogind/sd-login.h>")
277 ;; We don't have this header.
278 (("#include <systemd/sd-daemon\\.h>")
280 ;; Replace the call to 'sd_booted' by the truth value.
284 `(("pkg-config" ,pkg-config)
285 ("autoconf" ,autoconf)
286 ("automake" ,automake)
288 ("libxslt" ,libxslt) ;to build the man page
289 ("libxml2" ,libxml2) ;for XML_CATALOG_FILES
290 ("docbook-xsl" ,docbook-xsl)))
294 ("libxkbcommon" ,libxkbcommon)
296 ;; MESA can be used for accelerated video output via OpenGLESv2, but
297 ;; it's a bit dependency that we'd rather avoid in the installation
302 (synopsis "Linux KMS-based terminal emulator")
303 (description "Kmscon is a terminal emulator based on Linux's @dfn{kernel
304 mode setting} (KMS). It can replace the in-kernel virtual terminal (VT)
305 implementation with a user-space console. Compared to the Linux console,
306 kmscon provides enhanced features including XKB-compatible internationalized
307 keyboard support, UTF-8 input/font support, hardware-accelerated rendering,
308 multi-seat support, a replacement for @command{mingetty}, and more.")
309 (home-page "https://www.freedesktop.org/wiki/Software/kmscon")
310 ;; Hash table implementation is lgpl2.1+ licensed.
311 ;; The wcwidth implementation in external/wcwidth.{h,c} uses a license
313 ;; UCS-4 to UTF-8 encoding is copied from "terminology" which is released
314 ;; under the bsd 2 license.
315 ;; Unifont-Font is from http://unifoundry.com/unifont.html and licensed
316 ;; under the terms of the GNU GPL.
317 (license (list license:expat license:lgpl2.1+ license:bsd-2
319 (supported-systems (filter (cut string-suffix? "-linux" <>)
320 %supported-systems)))))
322 (define-public libtermkey
328 (uri (string-append "http://www.leonerd.org.uk/code/libtermkey/"
329 "libtermkey-" version ".tar.gz"))
331 (base32 "0psd0kf10q5ixfima0mxz10syy7qq1ilz1npr0rz862xycvzgjyf"))))
332 (build-system gnu-build-system)
336 (string-append "PREFIX=" (assoc-ref %outputs "out")))
337 #:phases (modify-phases %standard-phases
338 (delete 'configure)) ; no configure script
339 #:test-target "test"))
340 (inputs `(("ncurses" ,ncurses)))
341 (native-inputs `(("libtool" ,libtool)
342 ("perl-test-harness" ,perl-test-harness)
343 ("pkg-config" ,pkg-config)))
344 (synopsis "Keyboard entry processing library for terminal-based programs")
346 "Libtermkey handles all the necessary logic to recognise special keys, UTF-8
347 combining, and so on, with a simple interface.")
348 (home-page "http://www.leonerd.org.uk/code/libtermkey")
349 (license license:expat)))
351 (define-public picocom
358 (url "https://github.com/npat-efault/picocom.git")
360 (file-name (git-file-name name version))
363 "1vvjydqf0ax47nvdyyl67jafw5b3sfsav00xid6qpgia1gs2r72n"))))
364 (build-system gnu-build-system)
366 `(#:make-flags '("CC=gcc")
367 #:tests? #f ; no tests
369 (modify-phases %standard-phases
370 (delete 'configure) ; no configure script
372 ;; The Makefile lacks an ‘install’ target.
373 (lambda* (#:key outputs #:allow-other-keys)
374 (let* ((out (assoc-ref outputs "out"))
375 (bin (string-append out "/bin"))
376 (man (string-append out "/share/man/man1")))
377 (install-file "picocom" bin)
378 (install-file "picocom.1" man)))))))
379 (home-page "https://github.com/npat-efault/picocom")
380 (synopsis "Minimal dumb-terminal emulator")
382 "Picocom is a minimal dumb-terminal emulation program. It was designed to
383 serve as a simple and manual modem configuration, testing, and debugging tool.
384 It also serves well as a low-tech serial communications program to allow access
385 to all types of devices that provide serial consoles.")
386 (license license:gpl2+)))
396 ;; The original beep 1.3 at <http://www.johnath.com/beep> has been
397 ;; unmaintained for some time, and vulnerable to at least two CVEs:
398 ;; https://github.com/johnath/beep/issues/11#issuecomment-454056858
399 ;; Use this maintained fork instead.
400 (url "https://github.com/spkr-beep/beep.git")
401 (commit (string-append "v" version))))
402 (file-name (git-file-name name version))
404 (base32 "1bk7g63qpiclbq20iz2x238by8s1b2iafdim7i6dq1i5n01s7lgx"))))
405 (build-system gnu-build-system)
407 `(#:tests? #f ; no tests
409 (list (string-append "prefix=" (assoc-ref %outputs "out"))
410 (string-append "pkgdocdir=$(docdir)/" ,name "-" ,version))
412 (modify-phases %standard-phases
413 (delete 'configure)))) ; no configure script
415 `(("gcc" ,gcc-8))) ; for ‘-fstack-clash-protection’
416 (synopsis "Linux command-line utility to control the PC speaker")
417 (description "beep allows the user to control the PC speaker with precision,
418 allowing different sounds to indicate different events. While it can be run
419 quite happily on the command line, its intended place of residence is within
420 scripts, notifying the user when something interesting occurs. Of course, it
421 has no notion of what's interesing, but it's very good at that notifying part.")
422 (home-page "https://github.com/spkr-beep/beep")
423 (license license:gpl2+)))
425 (define-public unibilium
433 (url "https://github.com/mauke/unibilium.git")
434 (commit (string-append "v" version))))
435 (file-name (git-file-name name version))
438 "1wa9a32wzqnxqh1jh554afj13dzjr6mw2wzqzw8d08nza9pg2ra2"))))
439 (build-system gnu-build-system)
443 (string-append "PREFIX=" (assoc-ref %outputs "out")))
445 ;; FIXME: tests require "prove"
448 (modify-phases %standard-phases
449 (delete 'configure))))
451 `(("libtool" ,libtool)
453 (home-page "https://github.com/mauke/unibilium")
454 (synopsis "Terminfo parsing library")
455 (description "Unibilium is a basic C terminfo library. It doesn't depend
456 on curses or any other library. It also doesn't use global variables, so it
457 should be thread-safe.")
458 (license license:lgpl3+)))
460 (define-public libvterm
467 (uri (string-append "http://www.leonerd.org.uk/code/libvterm/"
468 "libvterm-" version ".tar.gz"))
471 "1pcxjhvdwhr2f3lyzf2rv1vp3l62bgkjm1ybhj82qf8yly7ca6g4"))))
472 (build-system gnu-build-system)
476 (string-append "PREFIX=" (assoc-ref %outputs "out")))
477 #:tests? #f ; XXX: some tests fail in this release
480 (modify-phases %standard-phases
481 (delete 'configure))))
483 `(("libtool" ,libtool)
485 (home-page "http://www.leonerd.org.uk/code/libvterm/")
486 (synopsis "VT220/xterm/ECMA-48 terminal emulator library")
487 (description "Libvterm is an abstract C99 library which implements a VT220
488 or xterm-like terminal emulator. It doesn't use any particular graphics
489 toolkit or output system, instead it invokes callback function pointers that
490 its embedding program should provide it to draw on its behalf. It avoids
491 calling @code{malloc} during normal running state, allowing it to be used in
492 embedded kernel situations.")
493 (license license:expat)))
495 (define-public cool-retro-term
496 (let ((commit "1.1.1")
497 (revision "0")) ;not used currently
499 (name "cool-retro-term")
503 (file-name (string-append name "-" version "-checkout"))
505 (url (string-append "https://github.com/Swordfish90/" name))
509 (base32 "0wb6anchxa5jpn9c73kr4byrf2xlj8x8qzc5x7ny6saj7kbbvp75"))
510 (modules '((guix build utils)
516 '(let* ((fonts '(;"1971-ibm-3278" ; BSD 3-clause
517 "1977-apple2" ; Non-Free
518 "1977-commodore-pet" ; Non-Free
519 "1979-atari-400-800" ; Non-Free
520 ;"1981-ibm-pc ; CC-SA 4.0
521 "1982-commodore64")) ; Non-Free
522 ;"1985-ibm-pc-vga" ; CC-SA 4.0
523 ;"modern-fixedsys-excelsior" ; Redistributable
524 ;"modern-hermit" ; SIL
525 ;"modern-inconsolata"; SIL
526 ;"modern-pro-font-win-tweaked" ; X11
527 ;"modern-proggy-tiny"; X11
528 ;"modern-terminus" ; SIL
529 (name-rx (make-regexp " *name: *\"([^\"]*)\""))
530 (source-rx (make-regexp " *source: \"fonts/([^/]*)[^\"]*\""))
531 (fontname-rx (make-regexp "\"fontName\":\"([^\"]*).*"))
533 ;; Gather font names from all Fonts*.qml files.
534 ;; These will be used to remove items from the
537 (lambda (font-file names)
538 (call-with-input-file font-file
540 (let loop ((name #f) (names names))
541 (let ((line (read-line port)))
543 ((eof-object? line) (pk 'names names))
544 ((regexp-exec name-rx line)
546 (loop (match:substring m 1) names)))
547 ((regexp-exec source-rx line)
549 (let ((font (match:substring m 1)))
550 (if (member font fonts)
551 (loop #f (lset-adjoin string=?
554 (else (loop name names))))))))
555 '() (find-files "app/qml" "Font.*\\.qml"))))
556 ;; Remove the font files themselves
557 (for-each (lambda (font)
558 (delete-file-recursively
559 (string-append "app/qml/fonts/" font)))
561 ;; Remove mention of those fonts in the source
562 (substitute* "app/qml/resources.qrc"
563 (((string-append " *<file>fonts/("
564 (string-join fonts "|")
569 (let ((start-rx (make-regexp " *ListElement\\{"))
570 (end-rx (make-regexp " *\\}")))
571 (with-atomic-file-replacement file
573 (let loop ((line-buffer '())
576 (let ((line (read-line in 'concat)))
578 ((eof-object? line) #t) ;done
579 ((regexp-exec start-rx line)
580 (loop (cons line line-buffer) #t #f))
581 ((or (regexp-exec source-rx line)
582 (regexp-exec fontname-rx line))
584 (let ((font-or-name (match:substring m 1)))
585 (if (or (member font-or-name fonts)
586 (member font-or-name names))
588 (loop (cons line line-buffer)
590 ((regexp-exec end-rx line)
592 (for-each (cut display <> out)
593 (reverse line-buffer))
596 (hold? (loop (cons line line-buffer)
598 (discard? (loop line-buffer #f #t))
599 (else (display line out)
600 (loop '() #f #f)))))))))
601 '("app/qml/FontPixels.qml"
602 "app/qml/FontScanlines.qml"
604 "app/qml/ApplicationSettings.qml"))
605 ;; Final substitution for default scanline and pixel fonts
606 (substitute* "app/qml/ApplicationSettings.qml"
607 (("COMMODORE_PET") "PROGGY_TINY"))
609 (build-system gnu-build-system)
612 ("qtdeclarative" ,qtdeclarative)
613 ("qtgraphicaleffects" ,qtgraphicaleffects)
614 ("qtquickcontrols" ,qtquickcontrols)))
617 (modify-phases %standard-phases
619 (lambda* (#:key outputs #:allow-other-keys)
620 (let ((out (assoc-ref outputs "out")))
621 (substitute* '("qmltermwidget/qmltermwidget.pro")
622 (("INSTALL_DIR = \\$\\$\\[QT_INSTALL_QML\\]")
623 (string-append "INSTALL_DIR = " out "/lib/qt5/qml")))
624 (substitute* '("cool-retro-term.pro" "app/app.pro")
627 (add-after 'install 'wrap-executable
628 (lambda* (#:key inputs outputs #:allow-other-keys)
629 (let ((out (assoc-ref outputs "out"))
630 (qml "/lib/qt5/qml"))
631 (wrap-program (string-append out "/bin/cool-retro-term")
632 `("QML2_IMPORT_PATH" ":" prefix
633 (,(string-append out qml)
635 (string-append (assoc-ref inputs i) qml))
638 "qtquickcontrols")))))
640 (add-after 'install 'add-alternate-name
641 (lambda* (#:key outputs #:allow-other-keys)
642 (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
643 (symlink (string-append bin "/cool-retro-term")
644 (string-append bin "/crt"))
646 (add-after 'install 'install-man
647 (lambda* (#:key outputs #:allow-other-keys)
648 (let ((mandir (string-append (assoc-ref outputs "out")
650 (install-file "packaging/debian/cool-retro-term.1" mandir)
652 (synopsis "Terminal emulator")
654 "Cool-retro-term (crt) is a terminal emulator which mimics the look and
655 feel of the old cathode ray tube (CRT) screens. It has been designed to be
656 eye-candy, customizable, and reasonably lightweight.")
657 (home-page "https://github.com/Swordfish90/cool-retro-term")
659 license:gpl2+ ; qmltermwidget
660 license:gpl3+ ; cool-retro-term
666 (define-public sakura
672 (uri (string-append "https://launchpad.net/" name "/trunk/"
673 version "/+download/" name "-" version
677 "1q463qm41ym7jb3kbzjz7b6x549vmgkb70arpkhsf86yxly1y5m1"))))
678 (build-system cmake-build-system)
680 '(#:tests? #f)) ; no check phase
682 `(("gettext" ,gettext-minimal)
683 ("perl" ,perl) ; for pod2man
684 ("pkg-config" ,pkg-config)))
688 (home-page "https://launchpad.net/sakura")
689 (synopsis "A simple but powerful libvte-based terminal emulator")
690 (description "@code{Sakura} is a terminal emulator based on GTK+ and VTE.
691 It's a terminal emulator with few dependencies, so you don't need a full GNOME
692 desktop installed to have a decent terminal emulator.")
693 (license license:gpl2)))
695 (define-public go-github.com-nsf-termbox-go
696 (let ((commit "288510b9734e30e7966ec2f22b87c5f8e67345e3")
699 (name "go-github.com-nsf-termbox-go")
700 (version (git-version "0.0.0" revision commit))
704 (url "https://github.com/nsf/termbox-go.git")
706 (file-name (git-file-name name version))
709 "0hdyisfaf8yb55h3p03p4sbq19546mp9fy28f2kn659mycmhxqk4"))))
710 (build-system go-build-system)
712 '(#:import-path "github.com/nsf/termbox-go"))
714 `(("go-github.com-mattn-go-runewidth"
715 ,go-github.com-mattn-go-runewidth)))
716 (synopsis "@code{termbox} provides a minimal API for text-based user
719 "Termbox is a library that provides a minimalistic API which allows the
720 programmer to write text-based user interfaces.")
721 (home-page "https://github.com/nsf/termbox-go")
722 (license license:expat))))
724 (define-public go-golang.org-x-crypto-ssh-terminal
725 (let ((commit "c78caca803c95773f48a844d3dcab04b9bc4d6dd")
728 (name "go-golang.org-x-crypto-ssh-terminal")
729 (version (git-version "0.0.0" revision commit))
733 (url "https://go.googlesource.com/crypto")
735 (file-name (git-file-name name version))
738 "0vxlfxr9y681yn2cfh6dbqmq35vvq4f45ay0mm31ffkny9cms0y4"))))
739 (build-system go-build-system)
741 '(#:import-path "golang.org/x/crypto/ssh/terminal"
742 #:unpack-path "golang.org/x/crypto"
744 (modify-phases %standard-phases
745 (add-before 'reset-gzip-timestamps 'make-gzip-archive-writable
746 (lambda* (#:key outputs #:allow-other-keys)
748 (make-file-writable file))
750 (string-append (assoc-ref outputs "out")
751 "/src/golang.org/x/crypto/ed25519/testdata")
754 (synopsis "Support functions for dealing with terminals in Go")
755 (description "@code{terminal} provides support functions for dealing
756 with terminals in Go.")
757 (home-page "https://go.googlesource.com/crypto/")
758 (license license:bsd-3))))
760 (define-public go-github-com-junegunn-fzf
762 (name "go-github-com-junegunn-fzf")
768 (url "https://github.com/junegunn/fzf")
770 (file-name (git-file-name name version))
773 "0pwpr4fpw56yzzkcabzzgbgwraaxmp7xzzmap7w1xsrkbj7dl2xl"))))
774 (build-system go-build-system)
776 `(#:import-path "github.com/junegunn/fzf"))
778 `(("go-github.com-mattn-go-runewidth" ,go-github.com-mattn-go-runewidth)
779 ("go-github-com-mattn-go-shellwords" ,go-github-com-mattn-go-shellwords)
780 ("go-github-com-mattn-go-isatty" ,go-github-com-mattn-go-isatty)
781 ("go-github-com-gdamore-tcell" ,go-github-com-gdamore-tcell)
782 ("go-golang-org-x-crypto-ssh-terminal" ,go-golang-org-x-crypto-ssh-terminal)))
783 (home-page "https://github.com/junegunn/fzf")
784 (synopsis "Command-line fuzzy-finder")
785 (description "This package provides an interactive command-line filter
786 usable with any list--including files, command history, processes and more.")
787 (license license:expat)))
789 (define-public go-github.com-howeyc-gopass
790 (let ((commit "bf9dde6d0d2c004a008c27aaee91170c786f6db8")
793 (name "go-github.com-howeyc-gopass")
794 (version (git-version "0.0.0" revision commit))
798 (url "https://github.com/howeyc/gopass.git")
800 (file-name (git-file-name name version))
803 "1jxzyfnqi0h1fzlsvlkn10bncic803bfhslyijcxk55mgh297g45"))))
804 (build-system go-build-system)
806 '(#:import-path "github.com/howeyc/gopass"))
808 `(("go-golang.org-x-crypto-ssh-terminal"
809 ,go-golang.org-x-crypto-ssh-terminal)))
810 (synopsis "Retrieve password from a terminal or piped input in Go")
812 "@code{gopass} is a Go package for retrieving a password from user
813 terminal or piped input.")
814 (home-page "https://github.com/howeyc/gopass")
815 (license license:isc))))
817 (define-public python-pyte
824 (uri (pypi-uri "pyte" version))
827 "1an54hvyjm8gncx8cgabz9mkpgjkdb0bkyjlkh7g7f94nr3wnfl7"))))
828 (build-system python-build-system)
831 (modify-phases %standard-phases
832 (add-after 'unpack 'remove-failing-test
833 ;; TODO: Reenable when the `captured` files required by this test
834 ;; are included in the archive.
836 (delete-file "tests/test_input_output.py")
839 `(("python-wcwidth" ,python-wcwidth)))
841 `(("python-pytest-runner" ,python-pytest-runner)
842 ("python-pytest" ,python-pytest)))
843 (home-page "https://pyte.readthedocs.io/")
844 (synopsis "Simple VTXXX-compatible terminal emulator")
845 (description "@code{pyte} is an in-memory VTxxx-compatible terminal
846 emulator. @var{VTxxx} stands for a series of video terminals, developed by
847 DEC between 1970 and 1995. The first and probably most famous one was the
848 VT100 terminal, which is now a de-facto standard for all virtual terminal
851 pyte is a fork of vt102, which was an incomplete pure Python implementation
853 (license license:lgpl3+)))
855 (define-public python2-pyte
856 (package-with-python2 python-pyte))
858 (define-public python-blessings
860 (name "python-blessings")
865 (uri (pypi-uri "blessings" version))
868 "1smngy65p8mi62lgm04icasx22v976szhs2aq95y2ljmi1srb4bl"))))
869 (build-system python-build-system)
871 ;; TODO: For py3, 2to2 is used to convert the code, but test-suite fails
874 `(("python-nose" ,python-nose)))
875 (home-page "https://github.com/erikrose/blessings")
876 (synopsis "Python module to manage terminal color, styling, and
878 (description "Blessings is a pythonic API to manipulate terminal color,
879 styling, and positioning. It provides similar features to curses but avoids
880 some of curses’s limitations: it does not require clearing the whole screen
881 for little changes, provides a scroll-back buffer after the program exits, and
882 avoids styling altogether when the output is redirected to something other
884 (license license:expat)))
886 (define-public python2-blessings
887 (package-with-python2 python-blessings))
889 (define-public python-curtsies
891 (name "python-curtsies")
896 (uri (pypi-uri "curtsies" version))
899 "1vljmw3sy6lrqahhpyg4gk13mzcx3mwhvg8s41698ms3cpgkjipc"))))
900 (build-system python-build-system)
903 (modify-phases %standard-phases
906 (invoke "nosetests" "-v"))))))
908 `(("python-blessings" ,python-blessings)
909 ("python-wcwidth" ,python-wcwidth)))
911 `(("python-mock" ,python-mock)
912 ("python-pyte" ,python-pyte)
913 ("python-nose" ,python-nose)))
914 (home-page "https://github.com/thomasballinger/curtsies")
915 (synopsis "Library for curses-like terminal interaction with colored
917 (description "Curtsies is a Python library for interacting with the
918 terminal. It features string-like objects which carry formatting information,
919 per-line fullscreen terminal rendering, and keyboard input event reporting.")
920 (license license:expat)))
922 (define-public python2-curtsies
923 (package-with-python2 python-curtsies))
933 (url "https://github.com/tmate-io/tmate.git")
935 (file-name (git-file-name name version))
938 "0pfl9vrswzim9ydi1n652h3rax2zrmy6sqkp0r09yy3lw83h4y1r"))))
939 (build-system gnu-build-system)
941 `(("libevent" ,libevent)
944 ("ncurses" ,ncurses)))
946 `(("autoconf" ,autoconf)
947 ("automake" ,automake)
948 ("pkg-config" ,pkg-config)))
949 (home-page "https://tmate.io/")
950 (synopsis "Terminal sharing application")
951 (description "tmate is a terminal sharing application that allows you to
952 share your terminal with other users over the Internet. tmate is a fork of
954 (license license:isc)))
960 (home-page "https://sw.kovidgoyal.net/kitty/")
965 (url "https://github.com/kovidgoyal/kitty.git")
966 (commit (string-append "v" version))))
967 (file-name (git-file-name name version))
970 "0z0y80wcbra3zfyaiim98afbqlfpkjkql430zfb8shx61rzzmn9i"))
971 (modules '((guix build utils)))
974 ;; patch needed as sphinx-build is used as a python script
975 ;; whereas the guix package uses a bash script launching the
977 (substitute* "docs/conf.py"
978 (("(from kitty.constants import str_version)" kitty-imp)
979 (string-append "sys.path.append(\"..\")\n" kitty-imp)))
980 (substitute* "docs/Makefile"
981 (("^SPHINXBUILD[[:space:]]+= (python3.*)$")
982 "SPHINXBUILD = sphinx-build\n"))
984 (build-system gnu-build-system)
987 ("harfbuzz" ,harfbuzz)
989 ("libcanberra" ,libcanberra)
991 ("freetype" ,freetype)
992 ("fontconfig" ,fontconfig)
993 ("pygments" ,python-pygments)
994 ("wayland" ,wayland)))
996 `(("pkg-config" ,pkg-config)
997 ("libxrandr" ,libxrandr)
999 ("libxcursor" ,libxcursor)
1001 ("libxinerama" ,libxinerama)
1002 ("libgl1-mesa" ,mesa)
1003 ("libxkbcommon" ,libxkbcommon)
1004 ("sphinx" ,python-sphinx)
1005 ("ncurses" ,ncurses) ;; for tic command
1006 ("wayland-protocols" ,wayland-protocols)))
1008 '(#:phases (modify-phases %standard-phases
1010 ;; Wayland backend requires EGL, which isn't found
1011 ;; out-of-the-box for some reason. Hard-code it instead.
1012 (add-after 'unpack 'hard-code-libegl
1014 (let* ((mesa (assoc-ref %build-inputs "libgl1-mesa"))
1015 (libegl (string-append mesa "/lib/libEGL.so.1")))
1016 (substitute* "glfw/egl_context.c"
1017 (("libEGL.so.1") libegl)))
1021 (invoke "python3" "setup.py" "linux-package")))
1024 (invoke "python3" "setup.py" "test")))
1025 (add-before 'install 'rm-pycache
1026 ;; created python cache __pycache__ are non deterministic
1028 (let ((pycaches (find-files "linux-package/"
1030 #:directories? #t)))
1031 (for-each delete-file-recursively pycaches)
1035 (let* ((out (assoc-ref %outputs "out"))
1036 (obin (string-append out "/bin"))
1037 (olib (string-append out "/lib"))
1038 (oshare (string-append out "/share")))
1039 (copy-recursively "linux-package/bin" obin)
1040 (copy-recursively "linux-package/share" oshare)
1041 (copy-recursively "linux-package/lib" olib)
1043 (synopsis "Fast, featureful, GPU based terminal emulator")
1044 (description "Kitty is a fast and featureful GPU-based terminal emulator:
1046 @item Offloads rendering to the GPU for lower system load and buttery smooth
1047 scrolling. Uses threaded rendering to minimize input latency.
1048 @item Supports all modern terminal features: graphics (images), unicode,
1049 true-color, OpenType ligatures, mouse protocol, focus tracking, bracketed
1050 paste and several new terminal protocol extensions.
1051 @item Supports tiling multiple terminal windows side by side in different
1052 layouts without needing to use an extra program like tmux.
1053 @item Can be controlled from scripts or the shell prompt, even over SSH.
1054 @item Has a framework for Kittens, small terminal programs that can be used to
1055 extend kitty's functionality. For example, they are used for Unicode input,
1056 hints, and side-by-side diff.
1057 @item Supports startup sessions which allow you to specify the window/tab
1058 layout, working directories and programs to run on startup.
1059 @item Allows you to open the scrollback buffer in a separate window using
1060 arbitrary programs of your choice. This is useful for browsing the history
1061 comfortably in a pager or editor.
1063 (license license:gpl3+)))
1065 (define-public eternalterminal
1067 (name "eternalterminal")
1073 (url "https://github.com/MisterTea/EternalTerminal.git")
1074 (commit (string-append "et-v" version))))
1075 (file-name (git-file-name name version))
1077 (base32 "0jh89229bd9s82h3aj6faaybwr5xvnk8w2kgz47gq263pz021zpl"))))
1078 (build-system cmake-build-system)
1080 '(#:configure-flags '("-DBUILD_TEST=ON")
1082 (modify-phases %standard-phases
1083 (add-after 'unpack 'insert-googletests
1084 (lambda* (#:key inputs #:allow-other-keys)
1085 (let ((tests (assoc-ref inputs "googletest")))
1086 (copy-recursively tests "external/googletest"))
1088 (add-after 'install 'dont-provide-gtest-libraries
1089 (lambda* (#:key outputs #:allow-other-keys)
1090 (let ((out (assoc-ref outputs "out")))
1091 (delete-file-recursively (string-append out "/include"))
1092 (delete-file-recursively (string-append out "/lib")))
1095 `(("gflags" ,gflags)
1096 ("libsodium" ,libsodium)
1097 ("protobuf" ,protobuf)))
1099 `(("googletest" ,(package-source googletest))))
1100 (home-page "https://mistertea.github.io/EternalTerminal/")
1101 (synopsis "Remote shell that reconnects without interrupting the session")
1102 (description "@dfn{Eternal Terminal} (ET) is a remote shell that
1103 automatically reconnects without interrupting the session. ET uses SSH to
1104 initialize a secure connection. Unlike SSH sessions, which must be killed and
1105 reconnected after a network outage an ET session will survive network outages
1106 and IP roaming. ET provides the same core functionality as @command{mosh},
1107 while also supporting native scrolling and @command{tmux} control mode
1108 (@code{tmux -CC}).")
1109 (license license:asl2.0)))
1111 (define-public wterm
1119 (url "https://github.com/majestrate/wterm.git")
1120 (commit "0ae42717c08a85a6509214e881422c7fbe7ecc45")))
1123 "0g4lzmc1w6na81i6hny32xds4xfig4xzswzfijyi6p93a1226dv0"))
1124 (file-name (git-file-name name version))))
1125 (build-system gnu-build-system)
1127 `(("pkg-config" ,pkg-config)))
1129 `(("fontconfig" ,fontconfig)
1130 ("freetype" ,freetype)
1132 ("libxkbcommon" ,libxkbcommon)
1133 ("ncurses" ,ncurses)
1135 ("wayland" ,wayland)))
1139 ;; Without -j1 it fails to find file libwld.a.
1140 #:parallel-build? #f
1142 #:make-flags (list "CC=gcc"
1143 (string-append "PREFIX=" %output)
1144 (string-append "TERMINFO="
1145 (assoc-ref %outputs "out")
1148 (modify-phases %standard-phases
1150 (add-after 'unpack 'terminfo-fix
1152 (substitute* "Makefile"
1153 (("\ttic .*") "\tmkdir -p $(SHARE_PREFIX)/share/terminfo
1154 \ttic -o $(SHARE_PREFIX)/share/terminfo -s wterm.info\n"))
1156 (native-search-paths
1157 (list (search-path-specification
1158 (variable "TERMINFO_DIRS")
1159 (files '("share/terminfo")))))
1160 (home-page "https://github.com/majestrate/wterm")
1161 (synopsis "Terminal emulator for Wayland")
1162 (description "wterm is a native Wayland terminal emulator based on
1163 an st fork using wld. st is a simple terminal emulator for X originally
1165 (license license:x11)))