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>
21 ;;; This file is part of GNU Guix.
23 ;;; GNU Guix is free software; you can redistribute it and/or modify it
24 ;;; under the terms of the GNU General Public License as published by
25 ;;; the Free Software Foundation; either version 3 of the License, or (at
26 ;;; your option) any later version.
28 ;;; GNU Guix is distributed in the hope that it will be useful, but
29 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
30 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
31 ;;; GNU General Public License for more details.
33 ;;; You should have received a copy of the GNU General Public License
34 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
36 (define-module (gnu packages terminals)
37 #:use-module ((guix licenses) #:prefix license:)
38 #:use-module (guix build-system cmake)
39 #:use-module (guix build-system gnu)
40 #:use-module (guix build-system glib-or-gtk)
41 #:use-module (guix build-system go)
42 #:use-module (guix build-system python)
43 #:use-module (guix download)
44 #:use-module (guix git-download)
45 #:use-module (guix packages)
46 #:use-module (gnu packages)
47 #:use-module (gnu packages autotools)
48 #:use-module (gnu packages check)
49 #:use-module (gnu packages compression)
50 #:use-module (gnu packages crypto)
51 #:use-module (gnu packages docbook)
52 #:use-module (gnu packages fontutils)
53 #:use-module (gnu packages freedesktop)
54 #:use-module (gnu packages gcc)
55 #:use-module (gnu packages gettext)
56 #:use-module (gnu packages gl)
57 #:use-module (gnu packages glib)
58 #:use-module (gnu packages gnome)
59 #:use-module (gnu packages golang)
60 #:use-module (gnu packages gtk)
61 #:use-module (gnu packages image)
62 #:use-module (gnu packages libcanberra)
63 #:use-module (gnu packages libevent)
64 #:use-module (gnu packages linux)
65 #:use-module (gnu packages ncurses)
66 #:use-module (gnu packages perl)
67 #:use-module (gnu packages perl-check)
68 #:use-module (gnu packages pkg-config)
69 #:use-module (gnu packages popt)
70 #:use-module (gnu packages protobuf)
71 #:use-module (gnu packages python)
72 #:use-module (gnu packages python-web)
73 #:use-module (gnu packages python-xyz)
74 #:use-module (gnu packages qt)
75 #:use-module (gnu packages serialization)
76 #:use-module (gnu packages sphinx)
77 #:use-module (gnu packages ssh)
78 #:use-module (gnu packages textutils)
79 #:use-module (gnu packages xdisorg)
80 #:use-module (gnu packages xml)
81 #:use-module (gnu packages xorg)
82 #:use-module (srfi srfi-26))
91 (url "https://github.com/lanoxx/tilda.git")
92 (commit (string-append "tilda-" version))))
93 (file-name (git-file-name name version))
96 "154rsldqjv2m1bddisb930qicb0y35kx7bxq392n2hn68jr2pxkj"))))
97 (build-system glib-or-gtk-build-system)
99 '(#:phases (modify-phases %standard-phases
102 (setenv "NOCONFIGURE" "true")
103 (invoke "sh" "autogen.sh"))))))
105 `(("autoconf" ,autoconf)
106 ("automake" ,automake)
107 ("gettext" ,gettext-minimal)
108 ("pkg-config" ,pkg-config)))
110 `(("libconfuse" ,libconfuse)
112 (synopsis "GTK+-based drop-down terminal")
113 (description "Tilda is a terminal emulator similar to normal terminals like
114 gnome-terminal (GNOME) or Konsole (KDE), with the difference that it drops down
115 from the edge of a screen when a certain configurable hotkey is pressed. This
116 is similar to the built-in consoles in some applications. Tilda is highly
117 configurable through a graphical wizard.")
118 (home-page "https://github.com/lanoxx/tilda")
119 (license license:gpl2+)))
121 (define-public termite
129 (url (string-append "https://github.com/thestinger/"
131 (commit (string-append "v" version))
133 (file-name (string-append name "-" version "-checkout"))
136 "0hp1x6lj098m3jgna274wv5dv60lnzg22297di68g4hw9djjyd2k"))))
137 (build-system gnu-build-system)
140 (modify-phases %standard-phases
143 ;; This sets the destination when installing the necessary terminal
144 ;; capability data, which are not provided by 'ncurses'. See
145 ;; <https://lists.gnu.org/archive/html/bug-ncurses/2009-10/msg00031.html>.
146 #:make-flags (list "PREFIX="
147 (string-append "VERSION=v" (version))
148 (string-append "DESTDIR="
149 (assoc-ref %outputs "out")))))
153 ("ncurses" ,ncurses)))
155 `(("pkg-config" ,pkg-config)))
157 ;; FIXME: This should only be located in 'ncurses'. Nonetheless it is
158 ;; provided for usability reasons. See <https://bugs.gnu.org/22138>.
160 (list (search-path-specification
161 (variable "TERMINFO_DIRS")
162 (files '("share/terminfo")))))
163 (home-page "https://github.com/thestinger/termite/")
164 (synopsis "Keyboard-centric, VTE-based terminal")
165 (description "Termite is a minimal terminal emulator designed for use with
166 tiling window managers. It is a modal application, similar to Vim, with an
167 insert mode and command mode where keybindings have different functions.")
169 ;; Files under util/ are under the Expat license; the rest is LGPLv2+.
170 (license license:lgpl2.0+)))
172 (define-public asciinema
180 (url "https://github.com/asciinema/asciinema")
181 (commit (string-append "v" version))))
182 (file-name (git-file-name name version))
185 "1a2pysxnp6icyd08mgf66xr6f6j0irnfxdpf3fmzcz31ix7l9kc4"))))
186 (build-system python-build-system)
189 (modify-phases %standard-phases
190 (add-before 'build 'patch-exec-paths
191 (lambda* (#:key inputs #:allow-other-keys)
192 (let ((ncurses (assoc-ref inputs "ncurses")))
193 (substitute* "asciinema/term.py"
195 (string-append "'" ncurses "/bin/tput'"))))
198 (lambda _ (invoke "nosetests" "-v"))))))
199 (inputs `(("ncurses" ,ncurses)))
202 `(("python-nose" ,python-nose)))
203 (home-page "https://asciinema.org")
204 (synopsis "Terminal session recorder")
206 "Use asciinema to record and share your terminal sessions, the right way.
207 Forget screen recording apps and blurry video. Enjoy a lightweight, purely
208 text-based approach to terminal recording.")
209 (license license:gpl3)))
211 (define-public libtsm
212 (let ((commit "f70e37982f382b03c6939dac3d5f814450bda253")
216 (version (git-version "0.0.0" revision commit))
219 ;; The freedesktop repository is no longer maintained.
221 (url (string-append "https://github.com/Aetf/" name))
223 (file-name (git-file-name name version))
226 "0mwn91i5h5d518i1s05y7hzv6bc13vzcvxszpfh77473iwg4wprx"))))
227 (build-system cmake-build-system)
229 `(#:configure-flags '("-DBUILD_TESTING=ON")))
231 `(("pkg-config" ,pkg-config)))
233 `(("libxkbcommon" ,libxkbcommon)
235 (synopsis "Xterm state machine library")
236 (description "TSM is a state machine for DEC VT100-VT520 compatible
237 terminal emulators. It tries to support all common standards while keeping
238 compatibility to existing emulators like xterm, gnome-terminal, konsole, etc.")
239 (home-page "https://www.freedesktop.org/wiki/Software/libtsm")
240 ;; Hash table implementation is lgpl2.1+ licensed.
241 ;; The wcwidth implementation in external/wcwidth.{h,c} uses a license
243 ;; UCS-4 to UTF-8 encoding is copied from "terminology" which is released
244 ;; under the bsd 2 license.
245 (license (list license:expat license:lgpl2.1+ license:isc license:bsd-2)))))
247 (define-public kmscon
248 (let ((commit "01dd0a231e2125a40ceba5f59fd945ff29bf2cdc")
252 (version (git-version "0.0.0" revision commit))
255 ;; The freedesktop repository is no longer maintained.
257 (url (string-append "https://github.com/Aetf/" name))
261 "0q62kjsvy2iwy8adfiygx2bfwlh83rphgxbis95ycspqidg9py87"))
263 (search-patches "kmscon-runtime-keymap-switch.patch"))
264 (modules '((guix build utils)))
265 (file-name (git-file-name name version))))
266 (build-system gnu-build-system)
268 `(;; The closure of MESA is huge so we'd rather avoid it.
269 #:disallowed-references (,mesa)
271 #:phases (modify-phases %standard-phases
274 (setenv "NOCONFIGURE" "indeed")
275 (invoke "sh" "autogen.sh")))
276 ;; Use elogind instead of systemd.
277 (add-before 'configure 'remove-systemd
279 (substitute* "configure"
280 (("libsystemd-daemon libsystemd-login")
282 (substitute* "src/uterm_systemd.c"
283 (("#include <systemd/sd-login.h>")
284 "#include <elogind/sd-login.h>")
285 ;; We don't have this header.
286 (("#include <systemd/sd-daemon\\.h>")
288 ;; Replace the call to 'sd_booted' by the truth value.
292 `(("pkg-config" ,pkg-config)
293 ("autoconf" ,autoconf)
294 ("automake" ,automake)
296 ("libxslt" ,libxslt) ;to build the man page
297 ("libxml2" ,libxml2) ;for XML_CATALOG_FILES
298 ("docbook-xsl" ,docbook-xsl)))
302 ("libxkbcommon" ,libxkbcommon)
304 ;; MESA can be used for accelerated video output via OpenGLESv2, but
305 ;; it's a bit dependency that we'd rather avoid in the installation
310 (synopsis "Linux KMS-based terminal emulator")
311 (description "Kmscon is a terminal emulator based on Linux's @dfn{kernel
312 mode setting} (KMS). It can replace the in-kernel virtual terminal (VT)
313 implementation with a user-space console. Compared to the Linux console,
314 kmscon provides enhanced features including XKB-compatible internationalized
315 keyboard support, UTF-8 input/font support, hardware-accelerated rendering,
316 multi-seat support, a replacement for @command{mingetty}, and more.")
317 (home-page "https://www.freedesktop.org/wiki/Software/kmscon")
318 ;; Hash table implementation is lgpl2.1+ licensed.
319 ;; The wcwidth implementation in external/wcwidth.{h,c} uses a license
321 ;; UCS-4 to UTF-8 encoding is copied from "terminology" which is released
322 ;; under the bsd 2 license.
323 ;; Unifont-Font is from http://unifoundry.com/unifont.html and licensed
324 ;; under the terms of the GNU GPL.
325 (license (list license:expat license:lgpl2.1+ license:bsd-2
327 (supported-systems (filter (cut string-suffix? "-linux" <>)
328 %supported-systems)))))
330 (define-public libtermkey
336 (uri (string-append "http://www.leonerd.org.uk/code/libtermkey/"
337 "libtermkey-" version ".tar.gz"))
339 (base32 "0psd0kf10q5ixfima0mxz10syy7qq1ilz1npr0rz862xycvzgjyf"))))
340 (build-system gnu-build-system)
344 (string-append "PREFIX=" (assoc-ref %outputs "out")))
345 #:phases (modify-phases %standard-phases
346 (delete 'configure)) ; no configure script
347 #:test-target "test"))
348 (inputs `(("ncurses" ,ncurses)))
349 (native-inputs `(("libtool" ,libtool)
350 ("perl-test-harness" ,perl-test-harness)
351 ("pkg-config" ,pkg-config)))
352 (synopsis "Keyboard entry processing library for terminal-based programs")
354 "Libtermkey handles all the necessary logic to recognise special keys, UTF-8
355 combining, and so on, with a simple interface.")
356 (home-page "http://www.leonerd.org.uk/code/libtermkey")
357 (license license:expat)))
359 (define-public picocom
366 (url "https://github.com/npat-efault/picocom.git")
368 (file-name (git-file-name name version))
371 "1vvjydqf0ax47nvdyyl67jafw5b3sfsav00xid6qpgia1gs2r72n"))))
372 (build-system gnu-build-system)
374 `(#:make-flags '("CC=gcc")
375 #:tests? #f ; no tests
377 (modify-phases %standard-phases
378 (delete 'configure) ; no configure script
380 ;; The Makefile lacks an ‘install’ target.
381 (lambda* (#:key outputs #:allow-other-keys)
382 (let* ((out (assoc-ref outputs "out"))
383 (bin (string-append out "/bin"))
384 (man (string-append out "/share/man/man1")))
385 (install-file "picocom" bin)
386 (install-file "picocom.1" man)))))))
387 (home-page "https://github.com/npat-efault/picocom")
388 (synopsis "Minimal dumb-terminal emulator")
390 "Picocom is a minimal dumb-terminal emulation program. It was designed to
391 serve as a simple and manual modem configuration, testing, and debugging tool.
392 It also serves well as a low-tech serial communications program to allow access
393 to all types of devices that provide serial consoles.")
394 (license license:gpl2+)))
404 ;; The original beep 1.3 at <http://www.johnath.com/beep> has been
405 ;; unmaintained for some time, and vulnerable to at least two CVEs:
406 ;; https://github.com/johnath/beep/issues/11#issuecomment-454056858
407 ;; Use this maintained fork instead.
408 (url "https://github.com/spkr-beep/beep.git")
409 (commit (string-append "v" version))))
410 (file-name (git-file-name name version))
412 (base32 "0dnbvzzxvajc7pl1165wb3l74pfcqcdg12rcjcw86qqy954dx8my"))))
413 (build-system gnu-build-system)
415 `(#:tests? #f ; no tests
417 (list (string-append "prefix=" (assoc-ref %outputs "out"))
418 (string-append "pkgdocdir=$(docdir)/" ,name "-" ,version))
420 (modify-phases %standard-phases
421 (delete 'configure)))) ; no configure script
423 `(("gcc" ,gcc-8))) ; for ‘-fstack-clash-protection’
424 (synopsis "Linux command-line utility to control the PC speaker")
425 (description "beep allows the user to control the PC speaker with precision,
426 allowing different sounds to indicate different events. While it can be run
427 quite happily on the command line, its intended place of residence is within
428 scripts, notifying the user when something interesting occurs. Of course, it
429 has no notion of what's interesing, but it's very good at that notifying part.")
430 (home-page "https://github.com/spkr-beep/beep")
431 (license license:gpl2+)))
433 (define-public unibilium
441 (url "https://github.com/mauke/unibilium.git")
442 (commit (string-append "v" version))))
443 (file-name (git-file-name name version))
446 "1wa9a32wzqnxqh1jh554afj13dzjr6mw2wzqzw8d08nza9pg2ra2"))))
447 (build-system gnu-build-system)
451 (string-append "PREFIX=" (assoc-ref %outputs "out")))
453 ;; FIXME: tests require "prove"
456 (modify-phases %standard-phases
457 (delete 'configure))))
459 `(("libtool" ,libtool)
461 (home-page "https://github.com/mauke/unibilium")
462 (synopsis "Terminfo parsing library")
463 (description "Unibilium is a basic C terminfo library. It doesn't depend
464 on curses or any other library. It also doesn't use global variables, so it
465 should be thread-safe.")
466 (license license:lgpl3+)))
468 (define-public libvterm
475 (uri (string-append "http://www.leonerd.org.uk/code/libvterm/"
476 "libvterm-" version ".tar.gz"))
479 "1n5maylann2anfifjy576vzyar9q5m1kzpyiz2hca2pacxy8xf4v"))))
480 (build-system gnu-build-system)
484 (string-append "PREFIX=" (assoc-ref %outputs "out")))
487 (modify-phases %standard-phases
488 (delete 'configure))))
490 `(("libtool" ,libtool)
492 (home-page "http://www.leonerd.org.uk/code/libvterm/")
493 (synopsis "VT220/xterm/ECMA-48 terminal emulator library")
494 (description "Libvterm is an abstract C99 library which implements a VT220
495 or xterm-like terminal emulator. It doesn't use any particular graphics
496 toolkit or output system, instead it invokes callback function pointers that
497 its embedding program should provide it to draw on its behalf. It avoids
498 calling @code{malloc} during normal running state, allowing it to be used in
499 embedded kernel situations.")
500 (license license:expat)))
502 (define-public cool-retro-term
503 (let ((commit "1.1.1")
504 (revision "0")) ;not used currently
506 (name "cool-retro-term")
510 (file-name (string-append name "-" version "-checkout"))
512 (url (string-append "https://github.com/Swordfish90/" name))
516 (base32 "0wb6anchxa5jpn9c73kr4byrf2xlj8x8qzc5x7ny6saj7kbbvp75"))
517 (modules '((guix build utils)
523 '(let* ((fonts '(;"1971-ibm-3278" ; BSD 3-clause
524 "1977-apple2" ; Non-Free
525 "1977-commodore-pet" ; Non-Free
526 "1979-atari-400-800" ; Non-Free
527 ;"1981-ibm-pc ; CC-SA 4.0
528 "1982-commodore64")) ; Non-Free
529 ;"1985-ibm-pc-vga" ; CC-SA 4.0
530 ;"modern-fixedsys-excelsior" ; Redistributable
531 ;"modern-hermit" ; SIL
532 ;"modern-inconsolata"; SIL
533 ;"modern-pro-font-win-tweaked" ; X11
534 ;"modern-proggy-tiny"; X11
535 ;"modern-terminus" ; SIL
536 (name-rx (make-regexp " *name: *\"([^\"]*)\""))
537 (source-rx (make-regexp " *source: \"fonts/([^/]*)[^\"]*\""))
538 (fontname-rx (make-regexp "\"fontName\":\"([^\"]*).*"))
540 ;; Gather font names from all Fonts*.qml files.
541 ;; These will be used to remove items from the
544 (lambda (font-file names)
545 (call-with-input-file font-file
547 (let loop ((name #f) (names names))
548 (let ((line (read-line port)))
550 ((eof-object? line) (pk 'names names))
551 ((regexp-exec name-rx line)
553 (loop (match:substring m 1) names)))
554 ((regexp-exec source-rx line)
556 (let ((font (match:substring m 1)))
557 (if (member font fonts)
558 (loop #f (lset-adjoin string=?
561 (else (loop name names))))))))
562 '() (find-files "app/qml" "Font.*\\.qml"))))
563 ;; Remove the font files themselves
564 (for-each (lambda (font)
565 (delete-file-recursively
566 (string-append "app/qml/fonts/" font)))
568 ;; Remove mention of those fonts in the source
569 (substitute* "app/qml/resources.qrc"
570 (((string-append " *<file>fonts/("
571 (string-join fonts "|")
576 (let ((start-rx (make-regexp " *ListElement\\{"))
577 (end-rx (make-regexp " *\\}")))
578 (with-atomic-file-replacement file
580 (let loop ((line-buffer '())
583 (let ((line (read-line in 'concat)))
585 ((eof-object? line) #t) ;done
586 ((regexp-exec start-rx line)
587 (loop (cons line line-buffer) #t #f))
588 ((or (regexp-exec source-rx line)
589 (regexp-exec fontname-rx line))
591 (let ((font-or-name (match:substring m 1)))
592 (if (or (member font-or-name fonts)
593 (member font-or-name names))
595 (loop (cons line line-buffer)
597 ((regexp-exec end-rx line)
599 (for-each (cut display <> out)
600 (reverse line-buffer))
603 (hold? (loop (cons line line-buffer)
605 (discard? (loop line-buffer #f #t))
606 (else (display line out)
607 (loop '() #f #f)))))))))
608 '("app/qml/FontPixels.qml"
609 "app/qml/FontScanlines.qml"
611 "app/qml/ApplicationSettings.qml"))
612 ;; Final substitution for default scanline and pixel fonts
613 (substitute* "app/qml/ApplicationSettings.qml"
614 (("COMMODORE_PET") "PROGGY_TINY"))
616 (build-system gnu-build-system)
619 ("qtdeclarative" ,qtdeclarative)
620 ("qtgraphicaleffects" ,qtgraphicaleffects)
621 ("qtquickcontrols" ,qtquickcontrols)))
624 (modify-phases %standard-phases
626 (lambda* (#:key outputs #:allow-other-keys)
627 (let ((out (assoc-ref outputs "out")))
628 (substitute* '("qmltermwidget/qmltermwidget.pro")
629 (("INSTALL_DIR = \\$\\$\\[QT_INSTALL_QML\\]")
630 (string-append "INSTALL_DIR = " out "/lib/qt5/qml")))
631 (substitute* '("cool-retro-term.pro" "app/app.pro")
634 (add-after 'install 'wrap-executable
635 (lambda* (#:key inputs outputs #:allow-other-keys)
636 (let ((out (assoc-ref outputs "out"))
637 (qml "/lib/qt5/qml"))
638 (wrap-program (string-append out "/bin/cool-retro-term")
639 `("QML2_IMPORT_PATH" ":" prefix
640 (,(string-append out qml)
642 (string-append (assoc-ref inputs i) qml))
645 "qtquickcontrols")))))
647 (add-after 'install 'add-alternate-name
648 (lambda* (#:key outputs #:allow-other-keys)
649 (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
650 (symlink (string-append bin "/cool-retro-term")
651 (string-append bin "/crt"))
653 (add-after 'install 'install-man
654 (lambda* (#:key outputs #:allow-other-keys)
655 (let ((mandir (string-append (assoc-ref outputs "out")
657 (install-file "packaging/debian/cool-retro-term.1" mandir)
659 (synopsis "Terminal emulator")
661 "Cool-retro-term (crt) is a terminal emulator which mimics the look and
662 feel of the old cathode ray tube (CRT) screens. It has been designed to be
663 eye-candy, customizable, and reasonably lightweight.")
664 (home-page "https://github.com/Swordfish90/cool-retro-term")
666 license:gpl2+ ; qmltermwidget
667 license:gpl3+ ; cool-retro-term
673 (define-public sakura
679 (uri (string-append "https://launchpad.net/" name "/trunk/"
680 version "/+download/" name "-" version
684 "15gskj5yv5qs3cj4ps43735kfx2nzjlhq4dk9ghirl8lvhhxsm5m"))))
685 (build-system cmake-build-system)
687 '(#:tests? #f)) ; no check phase
689 `(("gettext" ,gettext-minimal)
690 ("perl" ,perl) ; for pod2man
691 ("pkg-config" ,pkg-config)))
695 (home-page "https://launchpad.net/sakura")
696 (synopsis "A simple but powerful libvte-based terminal emulator")
697 (description "@code{Sakura} is a terminal emulator based on GTK+ and VTE.
698 It's a terminal emulator with few dependencies, so you don't need a full GNOME
699 desktop installed to have a decent terminal emulator.")
700 (license license:gpl2)))
702 (define-public go-github.com-nsf-termbox-go
703 (let ((commit "288510b9734e30e7966ec2f22b87c5f8e67345e3")
706 (name "go-github.com-nsf-termbox-go")
707 (version (git-version "0.0.0" revision commit))
711 (url "https://github.com/nsf/termbox-go.git")
713 (file-name (git-file-name name version))
716 "0hdyisfaf8yb55h3p03p4sbq19546mp9fy28f2kn659mycmhxqk4"))))
717 (build-system go-build-system)
719 '(#:import-path "github.com/nsf/termbox-go"))
721 `(("go-github.com-mattn-go-runewidth"
722 ,go-github.com-mattn-go-runewidth)))
723 (synopsis "@code{termbox} provides a minimal API for text-based user
726 "Termbox is a library that provides a minimalistic API which allows the
727 programmer to write text-based user interfaces.")
728 (home-page "https://github.com/nsf/termbox-go")
729 (license license:expat))))
731 (define-public go-github-com-junegunn-fzf
733 (name "go-github-com-junegunn-fzf")
739 (url "https://github.com/junegunn/fzf")
741 (file-name (git-file-name name version))
744 "0pwpr4fpw56yzzkcabzzgbgwraaxmp7xzzmap7w1xsrkbj7dl2xl"))))
745 (build-system go-build-system)
747 `(#:import-path "github.com/junegunn/fzf"))
749 `(("go-github.com-mattn-go-runewidth" ,go-github.com-mattn-go-runewidth)
750 ("go-github-com-mattn-go-shellwords" ,go-github-com-mattn-go-shellwords)
751 ("go-github-com-mattn-go-isatty" ,go-github-com-mattn-go-isatty)
752 ("go-github-com-gdamore-tcell" ,go-github-com-gdamore-tcell)
753 ("go-golang-org-x-crypto" ,go-golang-org-x-crypto)))
754 (home-page "https://github.com/junegunn/fzf")
755 (synopsis "Command-line fuzzy-finder")
756 (description "This package provides an interactive command-line filter
757 usable with any list--including files, command history, processes and more.")
758 (license license:expat)))
760 (define-public go-github.com-howeyc-gopass
761 (let ((commit "bf9dde6d0d2c004a008c27aaee91170c786f6db8")
764 (name "go-github.com-howeyc-gopass")
765 (version (git-version "0.0.0" revision commit))
769 (url "https://github.com/howeyc/gopass.git")
771 (file-name (git-file-name name version))
774 "1jxzyfnqi0h1fzlsvlkn10bncic803bfhslyijcxk55mgh297g45"))))
775 (build-system go-build-system)
777 '(#:import-path "github.com/howeyc/gopass"))
779 `(("go-golang-org-x-crypto"
780 ,go-golang-org-x-crypto)))
781 (synopsis "Retrieve password from a terminal or piped input in Go")
783 "@code{gopass} is a Go package for retrieving a password from user
784 terminal or piped input.")
785 (home-page "https://github.com/howeyc/gopass")
786 (license license:isc))))
788 (define-public python-pyte
795 (uri (pypi-uri "pyte" version))
798 "1an54hvyjm8gncx8cgabz9mkpgjkdb0bkyjlkh7g7f94nr3wnfl7"))))
799 (build-system python-build-system)
802 (modify-phases %standard-phases
803 (add-after 'unpack 'remove-failing-test
804 ;; TODO: Reenable when the `captured` files required by this test
805 ;; are included in the archive.
807 (delete-file "tests/test_input_output.py")
810 `(("python-wcwidth" ,python-wcwidth)))
812 `(("python-pytest-runner" ,python-pytest-runner)
813 ("python-pytest" ,python-pytest)))
814 (home-page "https://pyte.readthedocs.io/")
815 (synopsis "Simple VTXXX-compatible terminal emulator")
816 (description "@code{pyte} is an in-memory VTxxx-compatible terminal
817 emulator. @var{VTxxx} stands for a series of video terminals, developed by
818 DEC between 1970 and 1995. The first and probably most famous one was the
819 VT100 terminal, which is now a de-facto standard for all virtual terminal
822 pyte is a fork of vt102, which was an incomplete pure Python implementation
824 (license license:lgpl3+)))
826 (define-public python2-pyte
827 (package-with-python2 python-pyte))
829 (define-public python-blessings
831 (name "python-blessings")
836 (uri (pypi-uri "blessings" version))
839 "0z8mgkbmisxs10rz88qg46l1c9a8n08k8cy2iassal2zh16qbrcq"))))
840 (build-system python-build-system)
842 ;; FIXME: Test suite is unable to detect TTY conditions.
845 `(("python-nose" ,python-nose)
846 ("python-six" ,python-six)))
847 (home-page "https://github.com/erikrose/blessings")
848 (synopsis "Python module to manage terminal color, styling, and
850 (description "Blessings is a pythonic API to manipulate terminal color,
851 styling, and positioning. It provides similar features to curses but avoids
852 some of curses’s limitations: it does not require clearing the whole screen
853 for little changes, provides a scroll-back buffer after the program exits, and
854 avoids styling altogether when the output is redirected to something other
856 (license license:expat)))
858 (define-public python2-blessings
859 (package-with-python2 python-blessings))
861 (define-public python-curtsies
863 (name "python-curtsies")
868 (uri (pypi-uri "curtsies" version))
871 "1vljmw3sy6lrqahhpyg4gk13mzcx3mwhvg8s41698ms3cpgkjipc"))))
872 (build-system python-build-system)
875 (modify-phases %standard-phases
878 (invoke "nosetests" "-v"))))))
880 `(("python-blessings" ,python-blessings)
881 ("python-wcwidth" ,python-wcwidth)))
883 `(("python-mock" ,python-mock)
884 ("python-pyte" ,python-pyte)
885 ("python-nose" ,python-nose)))
886 (home-page "https://github.com/thomasballinger/curtsies")
887 (synopsis "Library for curses-like terminal interaction with colored
889 (description "Curtsies is a Python library for interacting with the
890 terminal. It features string-like objects which carry formatting information,
891 per-line fullscreen terminal rendering, and keyboard input event reporting.")
892 (license license:expat)))
894 (define-public python2-curtsies
895 (package-with-python2 python-curtsies))
905 (url "https://github.com/tmate-io/tmate.git")
907 (file-name (git-file-name name version))
910 "0pfl9vrswzim9ydi1n652h3rax2zrmy6sqkp0r09yy3lw83h4y1r"))))
911 (build-system gnu-build-system)
913 `(("libevent" ,libevent)
916 ("ncurses" ,ncurses)))
918 `(("autoconf" ,autoconf)
919 ("automake" ,automake)
920 ("pkg-config" ,pkg-config)))
921 (home-page "https://tmate.io/")
922 (synopsis "Terminal sharing application")
923 (description "tmate is a terminal sharing application that allows you to
924 share your terminal with other users over the Internet. tmate is a fork of
926 (license license:isc)))
932 (home-page "https://sw.kovidgoyal.net/kitty/")
937 (url "https://github.com/kovidgoyal/kitty.git")
938 (commit (string-append "v" version))))
939 (file-name (git-file-name name version))
941 (base32 "1rb5ys9xsdhd2qa3kz5gqzz111c6b14za98va6hlglk69wqlmb51"))
942 (modules '((guix build utils)))
945 ;; patch needed as sphinx-build is used as a python script
946 ;; whereas the guix package uses a bash script launching the
948 (substitute* "docs/conf.py"
949 (("(from kitty.constants import str_version)" kitty-imp)
950 (string-append "sys.path.append(\"..\")\n" kitty-imp)))
951 (substitute* "docs/Makefile"
952 (("^SPHINXBUILD[[:space:]]+= (python3.*)$")
953 "SPHINXBUILD = sphinx-build\n"))
955 (build-system gnu-build-system)
958 ("harfbuzz" ,harfbuzz)
960 ("libcanberra" ,libcanberra)
962 ("freetype" ,freetype)
963 ("fontconfig" ,fontconfig)
964 ("pygments" ,python-pygments)
965 ("wayland" ,wayland)))
967 `(("pkg-config" ,pkg-config)
968 ("libxrandr" ,libxrandr)
970 ("libxcursor" ,libxcursor)
972 ("libxinerama" ,libxinerama)
973 ("libgl1-mesa" ,mesa)
974 ("libxkbcommon" ,libxkbcommon)
975 ("sphinx" ,python-sphinx)
976 ("ncurses" ,ncurses) ;; for tic command
977 ("wayland-protocols" ,wayland-protocols)))
979 '(#:phases (modify-phases %standard-phases
981 ;; Wayland backend requires EGL, which isn't found
982 ;; out-of-the-box for some reason. Hard-code it instead.
983 (add-after 'unpack 'hard-code-libegl
985 (let* ((mesa (assoc-ref %build-inputs "libgl1-mesa"))
986 (libegl (string-append mesa "/lib/libEGL.so.1")))
987 (substitute* "glfw/egl_context.c"
988 (("libEGL.so.1") libegl)))
992 (invoke "python3" "setup.py" "linux-package")))
995 (invoke "python3" "setup.py" "test")))
996 (add-before 'install 'rm-pycache
997 ;; created python cache __pycache__ are non deterministic
999 (let ((pycaches (find-files "linux-package/"
1001 #:directories? #t)))
1002 (for-each delete-file-recursively pycaches)
1006 (let* ((out (assoc-ref %outputs "out"))
1007 (obin (string-append out "/bin"))
1008 (olib (string-append out "/lib"))
1009 (oshare (string-append out "/share")))
1010 (copy-recursively "linux-package/bin" obin)
1011 (copy-recursively "linux-package/share" oshare)
1012 (copy-recursively "linux-package/lib" olib)
1014 (synopsis "Fast, featureful, GPU based terminal emulator")
1015 (description "Kitty is a fast and featureful GPU-based terminal emulator:
1017 @item Offloads rendering to the GPU for lower system load and buttery smooth
1018 scrolling. Uses threaded rendering to minimize input latency.
1019 @item Supports all modern terminal features: graphics (images), unicode,
1020 true-color, OpenType ligatures, mouse protocol, focus tracking, bracketed
1021 paste and several new terminal protocol extensions.
1022 @item Supports tiling multiple terminal windows side by side in different
1023 layouts without needing to use an extra program like tmux.
1024 @item Can be controlled from scripts or the shell prompt, even over SSH.
1025 @item Has a framework for Kittens, small terminal programs that can be used to
1026 extend kitty's functionality. For example, they are used for Unicode input,
1027 hints, and side-by-side diff.
1028 @item Supports startup sessions which allow you to specify the window/tab
1029 layout, working directories and programs to run on startup.
1030 @item Allows you to open the scrollback buffer in a separate window using
1031 arbitrary programs of your choice. This is useful for browsing the history
1032 comfortably in a pager or editor.
1034 (license license:gpl3+)))
1036 (define-public eternalterminal
1038 (name "eternalterminal")
1044 (url "https://github.com/MisterTea/EternalTerminal.git")
1045 (commit (string-append "et-v" version))))
1046 (file-name (git-file-name name version))
1048 (base32 "0jh89229bd9s82h3aj6faaybwr5xvnk8w2kgz47gq263pz021zpl"))))
1049 (build-system cmake-build-system)
1051 '(#:configure-flags '("-DBUILD_TEST=ON")
1053 (modify-phases %standard-phases
1054 (add-after 'unpack 'insert-googletests
1055 (lambda* (#:key inputs #:allow-other-keys)
1056 (let ((tests (assoc-ref inputs "googletest")))
1057 (copy-recursively tests "external/googletest"))
1059 (add-after 'install 'dont-provide-gtest-libraries
1060 (lambda* (#:key outputs #:allow-other-keys)
1061 (let ((out (assoc-ref outputs "out")))
1062 (delete-file-recursively (string-append out "/include"))
1063 (delete-file-recursively (string-append out "/lib")))
1066 `(("gflags" ,gflags)
1067 ("libsodium" ,libsodium)
1068 ("protobuf" ,protobuf)))
1070 `(("googletest" ,(package-source googletest))))
1071 (home-page "https://mistertea.github.io/EternalTerminal/")
1072 (synopsis "Remote shell that reconnects without interrupting the session")
1073 (description "@dfn{Eternal Terminal} (ET) is a remote shell that
1074 automatically reconnects without interrupting the session. ET uses SSH to
1075 initialize a secure connection. Unlike SSH sessions, which must be killed and
1076 reconnected after a network outage an ET session will survive network outages
1077 and IP roaming. ET provides the same core functionality as @command{mosh},
1078 while also supporting native scrolling and @command{tmux} control mode
1079 (@code{tmux -CC}).")
1080 (license license:asl2.0)))
1082 (define-public wterm
1090 (url "https://github.com/majestrate/wterm.git")
1091 (commit "0ae42717c08a85a6509214e881422c7fbe7ecc45")))
1094 "0g4lzmc1w6na81i6hny32xds4xfig4xzswzfijyi6p93a1226dv0"))
1095 (file-name (git-file-name name version))))
1096 (build-system gnu-build-system)
1098 `(("pkg-config" ,pkg-config)))
1100 `(("fontconfig" ,fontconfig)
1101 ("freetype" ,freetype)
1103 ("libxkbcommon" ,libxkbcommon)
1104 ("ncurses" ,ncurses)
1106 ("wayland" ,wayland)))
1110 ;; Without -j1 it fails to find file libwld.a.
1111 #:parallel-build? #f
1113 #:make-flags (list "CC=gcc"
1114 (string-append "PREFIX=" %output)
1115 (string-append "TERMINFO="
1116 (assoc-ref %outputs "out")
1119 (modify-phases %standard-phases
1121 (add-after 'unpack 'terminfo-fix
1123 (substitute* "Makefile"
1124 (("\ttic .*") "\tmkdir -p $(SHARE_PREFIX)/share/terminfo
1125 \ttic -o $(SHARE_PREFIX)/share/terminfo -s wterm.info\n"))
1127 (native-search-paths
1128 (list (search-path-specification
1129 (variable "TERMINFO_DIRS")
1130 (files '("share/terminfo")))))
1131 (home-page "https://github.com/majestrate/wterm")
1132 (synopsis "Terminal emulator for Wayland")
1133 (description "wterm is a native Wayland terminal emulator based on
1134 an st fork using wld. st is a simple terminal emulator for X originally
1136 (license license:x11)))