1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2015, 2016, 2017, 2018, 2019 Efraim Flashner <efraim@flashner.co.il>
3 ;;; Copyright © 2016 Mckinley Olsen <mck.olsen@gmail.com>
4 ;;; Copyright © 2016, 2017, 2019 Alex Griffin <a@ajgrf.com>
5 ;;; Copyright © 2016 David Craven <david@craven.ch>
6 ;;; Copyright © 2016, 2017, 2019 Ludovic Courtès <ludo@gnu.org>
7 ;;; Copyright © 2016, 2017 José Miguel Sánchez García <jmi2k@openmailbox.org>
8 ;;; Copyright © 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
9 ;;; Copyright © 2017 Kei Kebreau <kkebreau@posteo.net>
10 ;;; Copyright © 2017, 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
11 ;;; Copyright © 2017 Petter <petter@mykolab.ch>
12 ;;; Copyright © 2018 Hartmut Goebel <h.goebel@crazy-compilers.com>
13 ;;; Copyright © 2018 Arun Isaac <arunisaac@systemreboot.net>
14 ;;; Copyright © 2018 Gabriel Hondet <gabrielhondet@gmail.com>
15 ;;; Copyright © 2019 Rutger Helling <rhelling@mykolab.com>
16 ;;; Copyright © 2018, 2019 Eric Bavier <bavier@member.fsf.org>
17 ;;; Copyright © 2019 Julien Lepiller <julien@lepiller.eu>
18 ;;; Copyright © 2019 Pierre Langlois <pierre.langlois@gmx.com>
19 ;;; Copyright © 2019 Brett Gilio <brettg@gnu.org>
20 ;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
22 ;;; This file is part of GNU Guix.
24 ;;; GNU Guix is free software; you can redistribute it and/or modify it
25 ;;; under the terms of the GNU General Public License as published by
26 ;;; the Free Software Foundation; either version 3 of the License, or (at
27 ;;; your option) any later version.
29 ;;; GNU Guix is distributed in the hope that it will be useful, but
30 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
31 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
32 ;;; GNU General Public License for more details.
34 ;;; You should have received a copy of the GNU General Public License
35 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
37 (define-module (gnu packages terminals)
38 #:use-module ((guix licenses) #:prefix license:)
39 #:use-module (guix build-system cmake)
40 #:use-module (guix build-system gnu)
41 #:use-module (guix build-system glib-or-gtk)
42 #:use-module (guix build-system go)
43 #:use-module (guix build-system python)
44 #:use-module (guix download)
45 #:use-module (guix git-download)
46 #:use-module (guix packages)
47 #:use-module (gnu packages)
48 #:use-module (gnu packages autotools)
49 #:use-module (gnu packages check)
50 #:use-module (gnu packages compression)
51 #:use-module (gnu packages crypto)
52 #:use-module (gnu packages docbook)
53 #:use-module (gnu packages fontutils)
54 #:use-module (gnu packages freedesktop)
55 #:use-module (gnu packages gcc)
56 #:use-module (gnu packages gettext)
57 #:use-module (gnu packages gl)
58 #:use-module (gnu packages glib)
59 #:use-module (gnu packages gnome)
60 #:use-module (gnu packages golang)
61 #:use-module (gnu packages gtk)
62 #:use-module (gnu packages image)
63 #:use-module (gnu packages libcanberra)
64 #:use-module (gnu packages libevent)
65 #:use-module (gnu packages linux)
66 #:use-module (gnu packages ncurses)
67 #:use-module (gnu packages perl)
68 #:use-module (gnu packages perl-check)
69 #:use-module (gnu packages pkg-config)
70 #:use-module (gnu packages popt)
71 #:use-module (gnu packages protobuf)
72 #:use-module (gnu packages python)
73 #:use-module (gnu packages python-web)
74 #:use-module (gnu packages python-xyz)
75 #:use-module (gnu packages qt)
76 #:use-module (gnu packages serialization)
77 #:use-module (gnu packages sphinx)
78 #:use-module (gnu packages ssh)
79 #:use-module (gnu packages textutils)
80 #:use-module (gnu packages xdisorg)
81 #:use-module (gnu packages xml)
82 #:use-module (gnu packages xorg)
83 #:use-module (srfi srfi-26))
92 (url "https://github.com/lanoxx/tilda.git")
93 (commit (string-append "tilda-" version))))
94 (file-name (git-file-name name version))
97 "154rsldqjv2m1bddisb930qicb0y35kx7bxq392n2hn68jr2pxkj"))))
98 (build-system glib-or-gtk-build-system)
100 '(#:phases (modify-phases %standard-phases
103 (setenv "NOCONFIGURE" "true")
104 (invoke "sh" "autogen.sh"))))))
106 `(("autoconf" ,autoconf)
107 ("automake" ,automake)
108 ("gettext" ,gettext-minimal)
109 ("pkg-config" ,pkg-config)))
111 `(("libconfuse" ,libconfuse)
113 (synopsis "GTK+-based drop-down terminal")
114 (description "Tilda is a terminal emulator similar to normal terminals like
115 gnome-terminal (GNOME) or Konsole (KDE), with the difference that it drops down
116 from the edge of a screen when a certain configurable hotkey is pressed. This
117 is similar to the built-in consoles in some applications. Tilda is highly
118 configurable through a graphical wizard.")
119 (home-page "https://github.com/lanoxx/tilda")
120 (license license:gpl2+)))
122 (define-public termite
130 (url (string-append "https://github.com/thestinger/"
132 (commit (string-append "v" version))
134 (file-name (string-append name "-" version "-checkout"))
137 "0hp1x6lj098m3jgna274wv5dv60lnzg22297di68g4hw9djjyd2k"))))
138 (build-system gnu-build-system)
141 (modify-phases %standard-phases
142 (add-after 'unpack 'patch-xdg-open
144 (substitute* "termite.cc"
145 (("xdg-open") (which "xdg-open")))
149 ;; This sets the destination when installing the necessary terminal
150 ;; capability data, which are not provided by 'ncurses'. See
151 ;; <https://lists.gnu.org/archive/html/bug-ncurses/2009-10/msg00031.html>.
152 #:make-flags (list "PREFIX="
153 (string-append "VERSION=v" (version))
154 (string-append "DESTDIR="
155 (assoc-ref %outputs "out")))))
159 ("xdg-utils" ,xdg-utils)
160 ("ncurses" ,ncurses)))
162 `(("pkg-config" ,pkg-config)))
164 ;; FIXME: This should only be located in 'ncurses'. Nonetheless it is
165 ;; provided for usability reasons. See <https://bugs.gnu.org/22138>.
167 (list (search-path-specification
168 (variable "TERMINFO_DIRS")
169 (files '("share/terminfo")))))
170 (home-page "https://github.com/thestinger/termite/")
171 (synopsis "Keyboard-centric, VTE-based terminal")
172 (description "Termite is a minimal terminal emulator designed for use with
173 tiling window managers. It is a modal application, similar to Vim, with an
174 insert mode and command mode where keybindings have different functions.")
176 ;; Files under util/ are under the Expat license; the rest is LGPLv2+.
177 (license license:lgpl2.0+)))
179 (define-public asciinema
187 (url "https://github.com/asciinema/asciinema")
188 (commit (string-append "v" version))))
189 (file-name (git-file-name name version))
192 "1a2pysxnp6icyd08mgf66xr6f6j0irnfxdpf3fmzcz31ix7l9kc4"))))
193 (build-system python-build-system)
196 (modify-phases %standard-phases
197 (add-before 'build 'patch-exec-paths
198 (lambda* (#:key inputs #:allow-other-keys)
199 (let ((ncurses (assoc-ref inputs "ncurses")))
200 (substitute* "asciinema/term.py"
202 (string-append "'" ncurses "/bin/tput'"))))
205 (lambda _ (invoke "nosetests" "-v"))))))
206 (inputs `(("ncurses" ,ncurses)))
209 `(("python-nose" ,python-nose)))
210 (home-page "https://asciinema.org")
211 (synopsis "Terminal session recorder")
213 "Use asciinema to record and share your terminal sessions, the right way.
214 Forget screen recording apps and blurry video. Enjoy a lightweight, purely
215 text-based approach to terminal recording.")
216 (license license:gpl3)))
218 (define-public libtsm
219 (let ((commit "f70e37982f382b03c6939dac3d5f814450bda253")
223 (version (git-version "0.0.0" revision commit))
226 ;; The freedesktop repository is no longer maintained.
228 (url (string-append "https://github.com/Aetf/" name))
230 (file-name (git-file-name name version))
233 "0mwn91i5h5d518i1s05y7hzv6bc13vzcvxszpfh77473iwg4wprx"))))
234 (build-system cmake-build-system)
236 `(#:configure-flags '("-DBUILD_TESTING=ON")))
238 `(("pkg-config" ,pkg-config)))
240 `(("libxkbcommon" ,libxkbcommon)
242 (synopsis "Xterm state machine library")
243 (description "TSM is a state machine for DEC VT100-VT520 compatible
244 terminal emulators. It tries to support all common standards while keeping
245 compatibility to existing emulators like xterm, gnome-terminal, konsole, etc.")
246 (home-page "https://www.freedesktop.org/wiki/Software/libtsm")
247 ;; Hash table implementation is lgpl2.1+ licensed.
248 ;; The wcwidth implementation in external/wcwidth.{h,c} uses a license
250 ;; UCS-4 to UTF-8 encoding is copied from "terminology" which is released
251 ;; under the bsd 2 license.
252 (license (list license:expat license:lgpl2.1+ license:isc license:bsd-2)))))
254 (define-public kmscon
255 (let ((commit "01dd0a231e2125a40ceba5f59fd945ff29bf2cdc")
259 (version (git-version "0.0.0" revision commit))
262 ;; The freedesktop repository is no longer maintained.
264 (url (string-append "https://github.com/Aetf/" name))
268 "0q62kjsvy2iwy8adfiygx2bfwlh83rphgxbis95ycspqidg9py87"))
270 (search-patches "kmscon-runtime-keymap-switch.patch"))
271 (modules '((guix build utils)))
272 (file-name (git-file-name name version))))
273 (build-system gnu-build-system)
275 `(;; The closure of MESA is huge so we'd rather avoid it.
276 #:disallowed-references (,mesa)
278 #:phases (modify-phases %standard-phases
281 (setenv "NOCONFIGURE" "indeed")
282 (invoke "sh" "autogen.sh")))
283 ;; Use elogind instead of systemd.
284 (add-before 'configure 'remove-systemd
286 (substitute* "configure"
287 (("libsystemd-daemon libsystemd-login")
289 (substitute* "src/uterm_systemd.c"
290 (("#include <systemd/sd-login.h>")
291 "#include <elogind/sd-login.h>")
292 ;; We don't have this header.
293 (("#include <systemd/sd-daemon\\.h>")
295 ;; Replace the call to 'sd_booted' by the truth value.
299 `(("pkg-config" ,pkg-config)
300 ("autoconf" ,autoconf)
301 ("automake" ,automake)
303 ("libxslt" ,libxslt) ;to build the man page
304 ("libxml2" ,libxml2) ;for XML_CATALOG_FILES
305 ("docbook-xsl" ,docbook-xsl)))
309 ("libxkbcommon" ,libxkbcommon)
311 ;; MESA can be used for accelerated video output via OpenGLESv2, but
312 ;; it's a bit dependency that we'd rather avoid in the installation
317 (synopsis "Linux KMS-based terminal emulator")
318 (description "Kmscon is a terminal emulator based on Linux's @dfn{kernel
319 mode setting} (KMS). It can replace the in-kernel virtual terminal (VT)
320 implementation with a user-space console. Compared to the Linux console,
321 kmscon provides enhanced features including XKB-compatible internationalized
322 keyboard support, UTF-8 input/font support, hardware-accelerated rendering,
323 multi-seat support, a replacement for @command{mingetty}, and more.")
324 (home-page "https://www.freedesktop.org/wiki/Software/kmscon")
325 ;; Hash table implementation is lgpl2.1+ licensed.
326 ;; The wcwidth implementation in external/wcwidth.{h,c} uses a license
328 ;; UCS-4 to UTF-8 encoding is copied from "terminology" which is released
329 ;; under the bsd 2 license.
330 ;; Unifont-Font is from http://unifoundry.com/unifont.html and licensed
331 ;; under the terms of the GNU GPL.
332 (license (list license:expat license:lgpl2.1+ license:bsd-2
334 (supported-systems (filter (cut string-suffix? "-linux" <>)
335 %supported-systems)))))
337 (define-public libtermkey
343 (uri (string-append "http://www.leonerd.org.uk/code/libtermkey/"
344 "libtermkey-" version ".tar.gz"))
346 (base32 "0psd0kf10q5ixfima0mxz10syy7qq1ilz1npr0rz862xycvzgjyf"))))
347 (build-system gnu-build-system)
351 (string-append "PREFIX=" (assoc-ref %outputs "out")))
352 #:phases (modify-phases %standard-phases
353 (delete 'configure)) ; no configure script
354 #:test-target "test"))
355 (inputs `(("ncurses" ,ncurses)))
356 (native-inputs `(("libtool" ,libtool)
357 ("perl-test-harness" ,perl-test-harness)
358 ("pkg-config" ,pkg-config)))
359 (synopsis "Keyboard entry processing library for terminal-based programs")
361 "Libtermkey handles all the necessary logic to recognise special keys, UTF-8
362 combining, and so on, with a simple interface.")
363 (home-page "http://www.leonerd.org.uk/code/libtermkey")
364 (license license:expat)))
366 (define-public picocom
373 (url "https://github.com/npat-efault/picocom.git")
375 (file-name (git-file-name name version))
378 "1vvjydqf0ax47nvdyyl67jafw5b3sfsav00xid6qpgia1gs2r72n"))))
379 (build-system gnu-build-system)
381 `(#:make-flags '("CC=gcc")
382 #:tests? #f ; no tests
384 (modify-phases %standard-phases
385 (delete 'configure) ; no configure script
387 ;; The Makefile lacks an ‘install’ target.
388 (lambda* (#:key outputs #:allow-other-keys)
389 (let* ((out (assoc-ref outputs "out"))
390 (bin (string-append out "/bin"))
391 (man (string-append out "/share/man/man1")))
392 (install-file "picocom" bin)
393 (install-file "picocom.1" man)))))))
394 (home-page "https://github.com/npat-efault/picocom")
395 (synopsis "Minimal dumb-terminal emulator")
397 "Picocom is a minimal dumb-terminal emulation program. It was designed to
398 serve as a simple and manual modem configuration, testing, and debugging tool.
399 It also serves well as a low-tech serial communications program to allow access
400 to all types of devices that provide serial consoles.")
401 (license license:gpl2+)))
411 ;; The original beep 1.3 at <http://www.johnath.com/beep> has been
412 ;; unmaintained for some time, and vulnerable to at least two CVEs:
413 ;; https://github.com/johnath/beep/issues/11#issuecomment-454056858
414 ;; Use this maintained fork instead.
415 (url "https://github.com/spkr-beep/beep.git")
416 (commit (string-append "v" version))))
417 (file-name (git-file-name name version))
419 (base32 "0dnbvzzxvajc7pl1165wb3l74pfcqcdg12rcjcw86qqy954dx8my"))))
420 (build-system gnu-build-system)
422 `(#:tests? #f ; no tests
424 (list (string-append "prefix=" (assoc-ref %outputs "out"))
425 (string-append "pkgdocdir=$(docdir)/" ,name "-" ,version))
427 (modify-phases %standard-phases
428 (delete 'configure)))) ; no configure script
430 `(("gcc" ,gcc-8))) ; for ‘-fstack-clash-protection’
431 (synopsis "Linux command-line utility to control the PC speaker")
432 (description "beep allows the user to control the PC speaker with precision,
433 allowing different sounds to indicate different events. While it can be run
434 quite happily on the command line, its intended place of residence is within
435 scripts, notifying the user when something interesting occurs. Of course, it
436 has no notion of what's interesing, but it's very good at that notifying part.")
437 (home-page "https://github.com/spkr-beep/beep")
438 (license license:gpl2+)))
440 (define-public unibilium
448 (url "https://github.com/mauke/unibilium.git")
449 (commit (string-append "v" version))))
450 (file-name (git-file-name name version))
453 "1wa9a32wzqnxqh1jh554afj13dzjr6mw2wzqzw8d08nza9pg2ra2"))))
454 (build-system gnu-build-system)
458 (string-append "PREFIX=" (assoc-ref %outputs "out")))
460 ;; FIXME: tests require "prove"
463 (modify-phases %standard-phases
464 (delete 'configure))))
466 `(("libtool" ,libtool)
468 (home-page "https://github.com/mauke/unibilium")
469 (synopsis "Terminfo parsing library")
470 (description "Unibilium is a basic C terminfo library. It doesn't depend
471 on curses or any other library. It also doesn't use global variables, so it
472 should be thread-safe.")
473 (license license:lgpl3+)))
475 (define-public libvterm
482 (uri (string-append "http://www.leonerd.org.uk/code/libvterm/"
483 "libvterm-" version ".tar.gz"))
486 "1n5maylann2anfifjy576vzyar9q5m1kzpyiz2hca2pacxy8xf4v"))))
487 (build-system gnu-build-system)
491 (string-append "PREFIX=" (assoc-ref %outputs "out")))
494 (modify-phases %standard-phases
495 (delete 'configure))))
497 `(("libtool" ,libtool)
499 (home-page "http://www.leonerd.org.uk/code/libvterm/")
500 (synopsis "VT220/xterm/ECMA-48 terminal emulator library")
501 (description "Libvterm is an abstract C99 library which implements a VT220
502 or xterm-like terminal emulator. It doesn't use any particular graphics
503 toolkit or output system, instead it invokes callback function pointers that
504 its embedding program should provide it to draw on its behalf. It avoids
505 calling @code{malloc} during normal running state, allowing it to be used in
506 embedded kernel situations.")
507 (license license:expat)))
509 (define-public cool-retro-term
510 (let ((commit "1.1.1")
511 (revision "0")) ;not used currently
513 (name "cool-retro-term")
517 (file-name (string-append name "-" version "-checkout"))
519 (url (string-append "https://github.com/Swordfish90/" name))
523 (base32 "0wb6anchxa5jpn9c73kr4byrf2xlj8x8qzc5x7ny6saj7kbbvp75"))
524 (modules '((guix build utils)
530 '(let* ((fonts '(;"1971-ibm-3278" ; BSD 3-clause
531 "1977-apple2" ; Non-Free
532 "1977-commodore-pet" ; Non-Free
533 "1979-atari-400-800" ; Non-Free
534 ;"1981-ibm-pc ; CC-SA 4.0
535 "1982-commodore64")) ; Non-Free
536 ;"1985-ibm-pc-vga" ; CC-SA 4.0
537 ;"modern-fixedsys-excelsior" ; Redistributable
538 ;"modern-hermit" ; SIL
539 ;"modern-inconsolata"; SIL
540 ;"modern-pro-font-win-tweaked" ; X11
541 ;"modern-proggy-tiny"; X11
542 ;"modern-terminus" ; SIL
543 (name-rx (make-regexp " *name: *\"([^\"]*)\""))
544 (source-rx (make-regexp " *source: \"fonts/([^/]*)[^\"]*\""))
545 (fontname-rx (make-regexp "\"fontName\":\"([^\"]*).*"))
547 ;; Gather font names from all Fonts*.qml files.
548 ;; These will be used to remove items from the
551 (lambda (font-file names)
552 (call-with-input-file font-file
554 (let loop ((name #f) (names names))
555 (let ((line (read-line port)))
557 ((eof-object? line) (pk 'names names))
558 ((regexp-exec name-rx line)
560 (loop (match:substring m 1) names)))
561 ((regexp-exec source-rx line)
563 (let ((font (match:substring m 1)))
564 (if (member font fonts)
565 (loop #f (lset-adjoin string=?
568 (else (loop name names))))))))
569 '() (find-files "app/qml" "Font.*\\.qml"))))
570 ;; Remove the font files themselves
571 (for-each (lambda (font)
572 (delete-file-recursively
573 (string-append "app/qml/fonts/" font)))
575 ;; Remove mention of those fonts in the source
576 (substitute* "app/qml/resources.qrc"
577 (((string-append " *<file>fonts/("
578 (string-join fonts "|")
583 (let ((start-rx (make-regexp " *ListElement\\{"))
584 (end-rx (make-regexp " *\\}")))
585 (with-atomic-file-replacement file
587 (let loop ((line-buffer '())
590 (let ((line (read-line in 'concat)))
592 ((eof-object? line) #t) ;done
593 ((regexp-exec start-rx line)
594 (loop (cons line line-buffer) #t #f))
595 ((or (regexp-exec source-rx line)
596 (regexp-exec fontname-rx line))
598 (let ((font-or-name (match:substring m 1)))
599 (if (or (member font-or-name fonts)
600 (member font-or-name names))
602 (loop (cons line line-buffer)
604 ((regexp-exec end-rx line)
606 (for-each (cut display <> out)
607 (reverse line-buffer))
610 (hold? (loop (cons line line-buffer)
612 (discard? (loop line-buffer #f #t))
613 (else (display line out)
614 (loop '() #f #f)))))))))
615 '("app/qml/FontPixels.qml"
616 "app/qml/FontScanlines.qml"
618 "app/qml/ApplicationSettings.qml"))
619 ;; Final substitution for default scanline and pixel fonts
620 (substitute* "app/qml/ApplicationSettings.qml"
621 (("COMMODORE_PET") "PROGGY_TINY"))
623 (build-system gnu-build-system)
626 ("qtdeclarative" ,qtdeclarative)
627 ("qtgraphicaleffects" ,qtgraphicaleffects)
628 ("qtquickcontrols" ,qtquickcontrols)))
631 (modify-phases %standard-phases
633 (lambda* (#:key outputs #:allow-other-keys)
634 (let ((out (assoc-ref outputs "out")))
635 (substitute* '("qmltermwidget/qmltermwidget.pro")
636 (("INSTALL_DIR = \\$\\$\\[QT_INSTALL_QML\\]")
637 (string-append "INSTALL_DIR = " out "/lib/qt5/qml")))
638 (substitute* '("cool-retro-term.pro" "app/app.pro")
641 (add-after 'install 'wrap-executable
642 (lambda* (#:key inputs outputs #:allow-other-keys)
643 (let ((out (assoc-ref outputs "out"))
644 (qml "/lib/qt5/qml"))
645 (wrap-program (string-append out "/bin/cool-retro-term")
646 `("QML2_IMPORT_PATH" ":" prefix
647 (,(string-append out qml)
649 (string-append (assoc-ref inputs i) qml))
652 "qtquickcontrols")))))
654 (add-after 'install 'add-alternate-name
655 (lambda* (#:key outputs #:allow-other-keys)
656 (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
657 (symlink (string-append bin "/cool-retro-term")
658 (string-append bin "/crt"))
660 (add-after 'install 'install-man
661 (lambda* (#:key outputs #:allow-other-keys)
662 (let ((mandir (string-append (assoc-ref outputs "out")
664 (install-file "packaging/debian/cool-retro-term.1" mandir)
666 (synopsis "Terminal emulator")
668 "Cool-retro-term (crt) is a terminal emulator which mimics the look and
669 feel of the old cathode ray tube (CRT) screens. It has been designed to be
670 eye-candy, customizable, and reasonably lightweight.")
671 (home-page "https://github.com/Swordfish90/cool-retro-term")
673 license:gpl2+ ; qmltermwidget
674 license:gpl3+ ; cool-retro-term
680 (define-public sakura
686 (uri (string-append "https://launchpad.net/" name "/trunk/"
687 version "/+download/" name "-" version
691 "15gskj5yv5qs3cj4ps43735kfx2nzjlhq4dk9ghirl8lvhhxsm5m"))))
692 (build-system cmake-build-system)
694 '(#:tests? #f)) ; no check phase
696 `(("gettext" ,gettext-minimal)
697 ("perl" ,perl) ; for pod2man
698 ("pkg-config" ,pkg-config)))
702 (home-page "https://launchpad.net/sakura")
703 (synopsis "A simple but powerful libvte-based terminal emulator")
704 (description "@code{Sakura} is a terminal emulator based on GTK+ and VTE.
705 It's a terminal emulator with few dependencies, so you don't need a full GNOME
706 desktop installed to have a decent terminal emulator.")
707 (license license:gpl2)))
709 (define-public go-github.com-nsf-termbox-go
710 (let ((commit "288510b9734e30e7966ec2f22b87c5f8e67345e3")
713 (name "go-github.com-nsf-termbox-go")
714 (version (git-version "0.0.0" revision commit))
718 (url "https://github.com/nsf/termbox-go.git")
720 (file-name (git-file-name name version))
723 "0hdyisfaf8yb55h3p03p4sbq19546mp9fy28f2kn659mycmhxqk4"))))
724 (build-system go-build-system)
726 '(#:import-path "github.com/nsf/termbox-go"))
728 `(("go-github.com-mattn-go-runewidth"
729 ,go-github.com-mattn-go-runewidth)))
730 (synopsis "@code{termbox} provides a minimal API for text-based user
733 "Termbox is a library that provides a minimalistic API which allows the
734 programmer to write text-based user interfaces.")
735 (home-page "https://github.com/nsf/termbox-go")
736 (license license:expat))))
738 (define-public go-github-com-junegunn-fzf
740 (name "go-github-com-junegunn-fzf")
746 (url "https://github.com/junegunn/fzf")
748 (file-name (git-file-name name version))
751 "0pwpr4fpw56yzzkcabzzgbgwraaxmp7xzzmap7w1xsrkbj7dl2xl"))))
752 (build-system go-build-system)
754 `(#:import-path "github.com/junegunn/fzf"))
756 `(("go-github.com-mattn-go-runewidth" ,go-github.com-mattn-go-runewidth)
757 ("go-github-com-mattn-go-shellwords" ,go-github-com-mattn-go-shellwords)
758 ("go-github-com-mattn-go-isatty" ,go-github-com-mattn-go-isatty)
759 ("go-github-com-gdamore-tcell" ,go-github-com-gdamore-tcell)
760 ("go-golang-org-x-crypto" ,go-golang-org-x-crypto)))
761 (home-page "https://github.com/junegunn/fzf")
762 (synopsis "Command-line fuzzy-finder")
763 (description "This package provides an interactive command-line filter
764 usable with any list--including files, command history, processes and more.")
765 (license license:expat)))
767 (define-public go-github.com-howeyc-gopass
768 (let ((commit "bf9dde6d0d2c004a008c27aaee91170c786f6db8")
771 (name "go-github.com-howeyc-gopass")
772 (version (git-version "0.0.0" revision commit))
776 (url "https://github.com/howeyc/gopass.git")
778 (file-name (git-file-name name version))
781 "1jxzyfnqi0h1fzlsvlkn10bncic803bfhslyijcxk55mgh297g45"))))
782 (build-system go-build-system)
784 '(#:import-path "github.com/howeyc/gopass"))
786 `(("go-golang-org-x-crypto"
787 ,go-golang-org-x-crypto)))
788 (synopsis "Retrieve password from a terminal or piped input in Go")
790 "@code{gopass} is a Go package for retrieving a password from user
791 terminal or piped input.")
792 (home-page "https://github.com/howeyc/gopass")
793 (license license:isc))))
795 (define-public python-pyte
802 (uri (pypi-uri "pyte" version))
805 "1an54hvyjm8gncx8cgabz9mkpgjkdb0bkyjlkh7g7f94nr3wnfl7"))))
806 (build-system python-build-system)
809 (modify-phases %standard-phases
810 (add-after 'unpack 'remove-failing-test
811 ;; TODO: Reenable when the `captured` files required by this test
812 ;; are included in the archive.
814 (delete-file "tests/test_input_output.py")
817 `(("python-wcwidth" ,python-wcwidth)))
819 `(("python-pytest-runner" ,python-pytest-runner)
820 ("python-pytest" ,python-pytest)))
821 (home-page "https://pyte.readthedocs.io/")
822 (synopsis "Simple VTXXX-compatible terminal emulator")
823 (description "@code{pyte} is an in-memory VTxxx-compatible terminal
824 emulator. @var{VTxxx} stands for a series of video terminals, developed by
825 DEC between 1970 and 1995. The first and probably most famous one was the
826 VT100 terminal, which is now a de-facto standard for all virtual terminal
829 pyte is a fork of vt102, which was an incomplete pure Python implementation
831 (license license:lgpl3+)))
833 (define-public python2-pyte
834 (package-with-python2 python-pyte))
836 (define-public python-blessings
838 (name "python-blessings")
843 (uri (pypi-uri "blessings" version))
846 "0z8mgkbmisxs10rz88qg46l1c9a8n08k8cy2iassal2zh16qbrcq"))))
847 (build-system python-build-system)
849 ;; FIXME: Test suite is unable to detect TTY conditions.
852 `(("python-nose" ,python-nose)
853 ("python-six" ,python-six)))
854 (home-page "https://github.com/erikrose/blessings")
855 (synopsis "Python module to manage terminal color, styling, and
857 (description "Blessings is a pythonic API to manipulate terminal color,
858 styling, and positioning. It provides similar features to curses but avoids
859 some of curses’s limitations: it does not require clearing the whole screen
860 for little changes, provides a scroll-back buffer after the program exits, and
861 avoids styling altogether when the output is redirected to something other
863 (license license:expat)))
865 (define-public python2-blessings
866 (package-with-python2 python-blessings))
868 (define-public python-curtsies
870 (name "python-curtsies")
875 (uri (pypi-uri "curtsies" version))
878 "1vljmw3sy6lrqahhpyg4gk13mzcx3mwhvg8s41698ms3cpgkjipc"))))
879 (build-system python-build-system)
882 (modify-phases %standard-phases
885 (invoke "nosetests" "-v"))))))
887 `(("python-blessings" ,python-blessings)
888 ("python-wcwidth" ,python-wcwidth)))
890 `(("python-mock" ,python-mock)
891 ("python-pyte" ,python-pyte)
892 ("python-nose" ,python-nose)))
893 (home-page "https://github.com/thomasballinger/curtsies")
894 (synopsis "Library for curses-like terminal interaction with colored
896 (description "Curtsies is a Python library for interacting with the
897 terminal. It features string-like objects which carry formatting information,
898 per-line fullscreen terminal rendering, and keyboard input event reporting.")
899 (license license:expat)))
901 (define-public python2-curtsies
902 (package-with-python2 python-curtsies))
912 (url "https://github.com/tmate-io/tmate.git")
914 (file-name (git-file-name name version))
917 "0pfl9vrswzim9ydi1n652h3rax2zrmy6sqkp0r09yy3lw83h4y1r"))))
918 (build-system gnu-build-system)
920 `(("libevent" ,libevent)
923 ("ncurses" ,ncurses)))
925 `(("autoconf" ,autoconf)
926 ("automake" ,automake)
927 ("pkg-config" ,pkg-config)))
928 (home-page "https://tmate.io/")
929 (synopsis "Terminal sharing application")
930 (description "tmate is a terminal sharing application that allows you to
931 share your terminal with other users over the Internet. tmate is a fork of
933 (license license:isc)))
939 (home-page "https://sw.kovidgoyal.net/kitty/")
944 (url "https://github.com/kovidgoyal/kitty.git")
945 (commit (string-append "v" version))))
946 (file-name (git-file-name name version))
948 (base32 "1rb5ys9xsdhd2qa3kz5gqzz111c6b14za98va6hlglk69wqlmb51"))
949 (modules '((guix build utils)))
952 ;; patch needed as sphinx-build is used as a python script
953 ;; whereas the guix package uses a bash script launching the
955 (substitute* "docs/conf.py"
956 (("(from kitty.constants import str_version)" kitty-imp)
957 (string-append "sys.path.append(\"..\")\n" kitty-imp)))
958 (substitute* "docs/Makefile"
959 (("^SPHINXBUILD[[:space:]]+= (python3.*)$")
960 "SPHINXBUILD = sphinx-build\n"))
962 (build-system gnu-build-system)
965 ("harfbuzz" ,harfbuzz)
967 ("libcanberra" ,libcanberra)
969 ("freetype" ,freetype)
970 ("fontconfig" ,fontconfig)
971 ("pygments" ,python-pygments)
972 ("wayland" ,wayland)))
974 `(("pkg-config" ,pkg-config)
975 ("libxrandr" ,libxrandr)
977 ("libxcursor" ,libxcursor)
979 ("libxinerama" ,libxinerama)
980 ("libgl1-mesa" ,mesa)
981 ("libxkbcommon" ,libxkbcommon)
982 ("sphinx" ,python-sphinx)
983 ("ncurses" ,ncurses) ;; for tic command
984 ("wayland-protocols" ,wayland-protocols)))
986 '(#:phases (modify-phases %standard-phases
988 ;; Wayland backend requires EGL, which isn't found
989 ;; out-of-the-box for some reason. Hard-code it instead.
990 (add-after 'unpack 'hard-code-libegl
992 (let* ((mesa (assoc-ref %build-inputs "libgl1-mesa"))
993 (libegl (string-append mesa "/lib/libEGL.so.1")))
994 (substitute* "glfw/egl_context.c"
995 (("libEGL.so.1") libegl)))
999 (invoke "python3" "setup.py" "linux-package")))
1002 (invoke "python3" "setup.py" "test")))
1003 (add-before 'install 'rm-pycache
1004 ;; created python cache __pycache__ are non deterministic
1006 (let ((pycaches (find-files "linux-package/"
1008 #:directories? #t)))
1009 (for-each delete-file-recursively pycaches)
1013 (let* ((out (assoc-ref %outputs "out"))
1014 (obin (string-append out "/bin"))
1015 (olib (string-append out "/lib"))
1016 (oshare (string-append out "/share")))
1017 (copy-recursively "linux-package/bin" obin)
1018 (copy-recursively "linux-package/share" oshare)
1019 (copy-recursively "linux-package/lib" olib)
1021 (synopsis "Fast, featureful, GPU based terminal emulator")
1022 (description "Kitty is a fast and featureful GPU-based terminal emulator:
1024 @item Offloads rendering to the GPU for lower system load and buttery smooth
1025 scrolling. Uses threaded rendering to minimize input latency.
1026 @item Supports all modern terminal features: graphics (images), unicode,
1027 true-color, OpenType ligatures, mouse protocol, focus tracking, bracketed
1028 paste and several new terminal protocol extensions.
1029 @item Supports tiling multiple terminal windows side by side in different
1030 layouts without needing to use an extra program like tmux.
1031 @item Can be controlled from scripts or the shell prompt, even over SSH.
1032 @item Has a framework for Kittens, small terminal programs that can be used to
1033 extend kitty's functionality. For example, they are used for Unicode input,
1034 hints, and side-by-side diff.
1035 @item Supports startup sessions which allow you to specify the window/tab
1036 layout, working directories and programs to run on startup.
1037 @item Allows you to open the scrollback buffer in a separate window using
1038 arbitrary programs of your choice. This is useful for browsing the history
1039 comfortably in a pager or editor.
1041 (license license:gpl3+)))
1043 (define-public eternalterminal
1045 (name "eternalterminal")
1051 (url "https://github.com/MisterTea/EternalTerminal.git")
1052 (commit (string-append "et-v" version))))
1053 (file-name (git-file-name name version))
1055 (base32 "0jh89229bd9s82h3aj6faaybwr5xvnk8w2kgz47gq263pz021zpl"))))
1056 (build-system cmake-build-system)
1058 '(#:configure-flags '("-DBUILD_TEST=ON")
1060 (modify-phases %standard-phases
1061 (add-after 'unpack 'insert-googletests
1062 (lambda* (#:key inputs #:allow-other-keys)
1063 (let ((tests (assoc-ref inputs "googletest")))
1064 (copy-recursively tests "external/googletest"))
1066 (add-after 'install 'dont-provide-gtest-libraries
1067 (lambda* (#:key outputs #:allow-other-keys)
1068 (let ((out (assoc-ref outputs "out")))
1069 (delete-file-recursively (string-append out "/include"))
1070 (delete-file-recursively (string-append out "/lib")))
1073 `(("gflags" ,gflags)
1074 ("libsodium" ,libsodium)
1075 ("protobuf" ,protobuf)))
1077 `(("googletest" ,(package-source googletest))))
1078 (home-page "https://mistertea.github.io/EternalTerminal/")
1079 (synopsis "Remote shell that reconnects without interrupting the session")
1080 (description "@dfn{Eternal Terminal} (ET) is a remote shell that
1081 automatically reconnects without interrupting the session. ET uses SSH to
1082 initialize a secure connection. Unlike SSH sessions, which must be killed and
1083 reconnected after a network outage an ET session will survive network outages
1084 and IP roaming. ET provides the same core functionality as @command{mosh},
1085 while also supporting native scrolling and @command{tmux} control mode
1086 (@code{tmux -CC}).")
1087 (license license:asl2.0)))
1089 (define-public wterm
1097 (url "https://github.com/majestrate/wterm.git")
1098 (commit "0ae42717c08a85a6509214e881422c7fbe7ecc45")))
1101 "0g4lzmc1w6na81i6hny32xds4xfig4xzswzfijyi6p93a1226dv0"))
1102 (file-name (git-file-name name version))))
1103 (build-system gnu-build-system)
1105 `(("pkg-config" ,pkg-config)))
1107 `(("fontconfig" ,fontconfig)
1108 ("freetype" ,freetype)
1110 ("libxkbcommon" ,libxkbcommon)
1111 ("ncurses" ,ncurses)
1113 ("wayland" ,wayland)))
1117 ;; Without -j1 it fails to find file libwld.a.
1118 #:parallel-build? #f
1120 #:make-flags (list "CC=gcc"
1121 (string-append "PREFIX=" %output)
1122 (string-append "TERMINFO="
1123 (assoc-ref %outputs "out")
1126 (modify-phases %standard-phases
1128 (add-after 'unpack 'terminfo-fix
1130 (substitute* "Makefile"
1131 (("\ttic .*") "\tmkdir -p $(SHARE_PREFIX)/share/terminfo
1132 \ttic -o $(SHARE_PREFIX)/share/terminfo -s wterm.info\n"))
1134 (native-search-paths
1135 (list (search-path-specification
1136 (variable "TERMINFO_DIRS")
1137 (files '("share/terminfo")))))
1138 (home-page "https://github.com/majestrate/wterm")
1139 (synopsis "Terminal emulator for Wayland")
1140 (description "wterm is a native Wayland terminal emulator based on
1141 an st fork using wld. st is a simple terminal emulator for X originally
1143 (license license:x11)))