1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020 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, 2020 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>
21 ;;; Copyright © 2020 Valentin Ignatev <valentignatev@gmail.com>
23 ;;; This file is part of GNU Guix.
25 ;;; GNU Guix is free software; you can redistribute it and/or modify it
26 ;;; under the terms of the GNU General Public License as published by
27 ;;; the Free Software Foundation; either version 3 of the License, or (at
28 ;;; your option) any later version.
30 ;;; GNU Guix is distributed in the hope that it will be useful, but
31 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
32 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
33 ;;; GNU General Public License for more details.
35 ;;; You should have received a copy of the GNU General Public License
36 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
38 (define-module (gnu packages terminals)
39 #:use-module ((guix licenses) #:prefix license:)
40 #:use-module (guix build-system cargo)
41 #:use-module (guix build-system cmake)
42 #:use-module (guix build-system gnu)
43 #:use-module (guix build-system glib-or-gtk)
44 #:use-module (guix build-system go)
45 #:use-module (guix build-system python)
46 #:use-module (guix download)
47 #:use-module (guix git-download)
48 #:use-module (guix packages)
49 #:use-module (gnu packages)
50 #:use-module (gnu packages autotools)
51 #:use-module (gnu packages check)
52 #:use-module (gnu packages cmake)
53 #:use-module (gnu packages compression)
54 #:use-module (gnu packages crates-io)
55 #:use-module (gnu packages crypto)
56 #:use-module (gnu packages docbook)
57 #:use-module (gnu packages fontutils)
58 #:use-module (gnu packages freedesktop)
59 #:use-module (gnu packages gcc)
60 #:use-module (gnu packages gettext)
61 #:use-module (gnu packages gl)
62 #:use-module (gnu packages glib)
63 #:use-module (gnu packages gnome)
64 #:use-module (gnu packages golang)
65 #:use-module (gnu packages gtk)
66 #:use-module (gnu packages image)
67 #:use-module (gnu packages libcanberra)
68 #:use-module (gnu packages libevent)
69 #:use-module (gnu packages linux)
70 #:use-module (gnu packages ncurses)
71 #:use-module (gnu packages perl)
72 #:use-module (gnu packages perl-check)
73 #:use-module (gnu packages pkg-config)
74 #:use-module (gnu packages popt)
75 #:use-module (gnu packages protobuf)
76 #:use-module (gnu packages python)
77 #:use-module (gnu packages python-web)
78 #:use-module (gnu packages python-xyz)
79 #:use-module (gnu packages qt)
80 #:use-module (gnu packages serialization)
81 #:use-module (gnu packages sphinx)
82 #:use-module (gnu packages ssh)
83 #:use-module (gnu packages textutils)
84 #:use-module (gnu packages xdisorg)
85 #:use-module (gnu packages xml)
86 #:use-module (gnu packages xorg)
87 #:use-module (srfi srfi-26))
96 (url "https://github.com/lanoxx/tilda.git")
97 (commit (string-append "tilda-" version))))
98 (file-name (git-file-name name version))
101 "13djibj3s7ig13c57ywy38pxy3qfmqihii2c0g15fy2h9q8xp1gx"))))
102 (build-system glib-or-gtk-build-system)
104 `(("autoconf" ,autoconf)
105 ("automake" ,automake)
106 ("gettext" ,gettext-minimal)
107 ("pkg-config" ,pkg-config)))
109 `(("libconfuse" ,libconfuse)
111 (synopsis "GTK+-based drop-down terminal")
112 (description "Tilda is a terminal emulator similar to normal terminals like
113 gnome-terminal (GNOME) or Konsole (KDE), with the difference that it drops down
114 from the edge of a screen when a certain configurable hotkey is pressed. This
115 is similar to the built-in consoles in some applications. Tilda is highly
116 configurable through a graphical wizard.")
117 (home-page "https://github.com/lanoxx/tilda")
118 (license license:gpl2+)))
120 (define-public termite
128 (url (string-append "https://github.com/thestinger/"
130 (commit (string-append "v" version))
132 (file-name (string-append name "-" version "-checkout"))
135 "0hp1x6lj098m3jgna274wv5dv60lnzg22297di68g4hw9djjyd2k"))))
136 (build-system gnu-build-system)
139 (modify-phases %standard-phases
140 (add-after 'unpack 'patch-xdg-open
142 (substitute* "termite.cc"
143 (("xdg-open") (which "xdg-open")))
147 ;; This sets the destination when installing the necessary terminal
148 ;; capability data, which are not provided by 'ncurses'. See
149 ;; <https://lists.gnu.org/archive/html/bug-ncurses/2009-10/msg00031.html>.
150 #:make-flags (list "PREFIX="
151 (string-append "VERSION=v" (version))
152 (string-append "DESTDIR="
153 (assoc-ref %outputs "out")))))
157 ("xdg-utils" ,xdg-utils)
158 ("ncurses" ,ncurses)))
160 `(("pkg-config" ,pkg-config)))
162 ;; FIXME: This should only be located in 'ncurses'. Nonetheless it is
163 ;; provided for usability reasons. See <https://bugs.gnu.org/22138>.
165 (list (search-path-specification
166 (variable "TERMINFO_DIRS")
167 (files '("share/terminfo")))))
168 (home-page "https://github.com/thestinger/termite/")
169 (synopsis "Keyboard-centric, VTE-based terminal")
170 (description "Termite is a minimal terminal emulator designed for use with
171 tiling window managers. It is a modal application, similar to Vim, with an
172 insert mode and command mode where keybindings have different functions.")
174 ;; Files under util/ are under the Expat license; the rest is LGPLv2+.
175 (license license:lgpl2.0+)))
177 (define-public asciinema
185 (url "https://github.com/asciinema/asciinema")
186 (commit (string-append "v" version))))
187 (file-name (git-file-name name version))
190 "1a2pysxnp6icyd08mgf66xr6f6j0irnfxdpf3fmzcz31ix7l9kc4"))))
191 (build-system python-build-system)
194 (modify-phases %standard-phases
195 (add-before 'build 'patch-exec-paths
196 (lambda* (#:key inputs #:allow-other-keys)
197 (let ((ncurses (assoc-ref inputs "ncurses")))
198 (substitute* "asciinema/term.py"
200 (string-append "'" ncurses "/bin/tput'"))))
203 (lambda _ (invoke "nosetests" "-v"))))))
204 (inputs `(("ncurses" ,ncurses)))
207 `(("python-nose" ,python-nose)))
208 (home-page "https://asciinema.org")
209 (synopsis "Terminal session recorder")
211 "Use asciinema to record and share your terminal sessions, the right way.
212 Forget screen recording apps and blurry video. Enjoy a lightweight, purely
213 text-based approach to terminal recording.")
214 (license license:gpl3)))
216 (define-public libtsm
217 (let ((commit "f70e37982f382b03c6939dac3d5f814450bda253")
221 (version (git-version "0.0.0" revision commit))
224 ;; The freedesktop repository is no longer maintained.
226 (url (string-append "https://github.com/Aetf/" name))
228 (file-name (git-file-name name version))
231 "0mwn91i5h5d518i1s05y7hzv6bc13vzcvxszpfh77473iwg4wprx"))))
232 (build-system cmake-build-system)
234 `(#:configure-flags '("-DBUILD_TESTING=ON")))
236 `(("pkg-config" ,pkg-config)))
238 `(("libxkbcommon" ,libxkbcommon)
240 (synopsis "Xterm state machine library")
241 (description "TSM is a state machine for DEC VT100-VT520 compatible
242 terminal emulators. It tries to support all common standards while keeping
243 compatibility to existing emulators like xterm, gnome-terminal, konsole, etc.")
244 (home-page "https://www.freedesktop.org/wiki/Software/libtsm")
245 ;; Hash table implementation is lgpl2.1+ licensed.
246 ;; The wcwidth implementation in external/wcwidth.{h,c} uses a license
248 ;; UCS-4 to UTF-8 encoding is copied from "terminology" which is released
249 ;; under the bsd 2 license.
250 (license (list license:expat license:lgpl2.1+ license:isc license:bsd-2)))))
252 (define-public kmscon
253 (let ((commit "01dd0a231e2125a40ceba5f59fd945ff29bf2cdc")
257 (version (git-version "0.0.0" revision commit))
260 ;; The freedesktop repository is no longer maintained.
262 (url (string-append "https://github.com/Aetf/" name))
266 "0q62kjsvy2iwy8adfiygx2bfwlh83rphgxbis95ycspqidg9py87"))
268 (search-patches "kmscon-runtime-keymap-switch.patch"))
269 (modules '((guix build utils)))
270 (file-name (git-file-name name version))))
271 (build-system gnu-build-system)
273 `(;; The closure of MESA is huge so we'd rather avoid it.
274 #:disallowed-references (,mesa)
276 #:phases (modify-phases %standard-phases
277 ;; Use elogind instead of systemd.
278 (add-before 'configure 'remove-systemd
280 (substitute* "configure"
281 (("libsystemd-daemon libsystemd-login")
283 (substitute* "src/uterm_systemd.c"
284 (("#include <systemd/sd-login.h>")
285 "#include <elogind/sd-login.h>")
286 ;; We don't have this header.
287 (("#include <systemd/sd-daemon\\.h>")
289 ;; Replace the call to 'sd_booted' by the truth value.
293 `(("pkg-config" ,pkg-config)
294 ("autoconf" ,autoconf)
295 ("automake" ,automake)
297 ("libxslt" ,libxslt) ;to build the man page
298 ("libxml2" ,libxml2) ;for XML_CATALOG_FILES
299 ("docbook-xsl" ,docbook-xsl)))
303 ("libxkbcommon" ,libxkbcommon)
305 ;; MESA can be used for accelerated video output via OpenGLESv2, but
306 ;; it's a bit dependency that we'd rather avoid in the installation
311 (synopsis "Linux KMS-based terminal emulator")
312 (description "Kmscon is a terminal emulator based on Linux's @dfn{kernel
313 mode setting} (KMS). It can replace the in-kernel virtual terminal (VT)
314 implementation with a user-space console. Compared to the Linux console,
315 kmscon provides enhanced features including XKB-compatible internationalized
316 keyboard support, UTF-8 input/font support, hardware-accelerated rendering,
317 multi-seat support, a replacement for @command{mingetty}, and more.")
318 (home-page "https://www.freedesktop.org/wiki/Software/kmscon")
319 ;; Hash table implementation is lgpl2.1+ licensed.
320 ;; The wcwidth implementation in external/wcwidth.{h,c} uses a license
322 ;; UCS-4 to UTF-8 encoding is copied from "terminology" which is released
323 ;; under the bsd 2 license.
324 ;; Unifont-Font is from http://unifoundry.com/unifont.html and licensed
325 ;; under the terms of the GNU GPL.
326 (license (list license:expat license:lgpl2.1+ license:bsd-2
328 (supported-systems (filter (cut string-suffix? "-linux" <>)
329 %supported-systems)))))
331 (define-public libtermkey
337 (uri (string-append "http://www.leonerd.org.uk/code/libtermkey/"
338 "libtermkey-" version ".tar.gz"))
340 (base32 "0psd0kf10q5ixfima0mxz10syy7qq1ilz1npr0rz862xycvzgjyf"))))
341 (build-system gnu-build-system)
345 (string-append "PREFIX=" (assoc-ref %outputs "out")))
346 #:phases (modify-phases %standard-phases
347 (delete 'configure)) ; no configure script
348 #:test-target "test"))
349 (inputs `(("ncurses" ,ncurses)))
350 (native-inputs `(("libtool" ,libtool)
351 ("perl-test-harness" ,perl-test-harness)
352 ("pkg-config" ,pkg-config)))
353 (synopsis "Keyboard entry processing library for terminal-based programs")
355 "Libtermkey handles all the necessary logic to recognise special keys, UTF-8
356 combining, and so on, with a simple interface.")
357 (home-page "http://www.leonerd.org.uk/code/libtermkey")
358 (license license:expat)))
360 (define-public picocom
367 (url "https://github.com/npat-efault/picocom.git")
369 (file-name (git-file-name name version))
372 "1vvjydqf0ax47nvdyyl67jafw5b3sfsav00xid6qpgia1gs2r72n"))))
373 (build-system gnu-build-system)
375 `(#:make-flags '("CC=gcc")
376 #:tests? #f ; no tests
378 (modify-phases %standard-phases
379 (delete 'configure) ; no configure script
381 ;; The Makefile lacks an ‘install’ target.
382 (lambda* (#:key outputs #:allow-other-keys)
383 (let* ((out (assoc-ref outputs "out"))
384 (bin (string-append out "/bin"))
385 (man (string-append out "/share/man/man1")))
386 (install-file "picocom" bin)
387 (install-file "picocom.1" man)))))))
388 (home-page "https://github.com/npat-efault/picocom")
389 (synopsis "Minimal dumb-terminal emulator")
391 "Picocom is a minimal dumb-terminal emulation program. It was designed to
392 serve as a simple and manual modem configuration, testing, and debugging tool.
393 It also serves well as a low-tech serial communications program to allow access
394 to all types of devices that provide serial consoles.")
395 (license license:gpl2+)))
405 ;; The original beep 1.3 at <http://www.johnath.com/beep> has been
406 ;; unmaintained for some time, and vulnerable to at least two CVEs:
407 ;; https://github.com/johnath/beep/issues/11#issuecomment-454056858
408 ;; Use this maintained fork instead.
409 (url "https://github.com/spkr-beep/beep.git")
410 (commit (string-append "v" version))))
411 (file-name (git-file-name name version))
413 (base32 "0jmvqk6g5n0wzj9znw42njxq3mzw1769f4db99b83927hf4aidi4"))))
414 (build-system gnu-build-system)
416 `(#:tests? #f ; no tests
418 (list (string-append "prefix=" (assoc-ref %outputs "out"))
419 (string-append "pkgdocdir=$(docdir)/" ,name "-" ,version))
421 (modify-phases %standard-phases
422 (delete 'configure)))) ; no configure script
423 (synopsis "Linux command-line utility to control the PC speaker")
424 (description "beep allows the user to control the PC speaker with precision,
425 allowing different sounds to indicate different events. While it can be run
426 quite happily on the command line, its intended place of residence is within
427 scripts, notifying the user when something interesting occurs. Of course, it
428 has no notion of what's interesing, but it's very good at that notifying part.")
429 (home-page "https://github.com/spkr-beep/beep")
430 (license license:gpl2+)))
432 (define-public unibilium
440 (url "https://github.com/mauke/unibilium.git")
441 (commit (string-append "v" version))))
442 (file-name (git-file-name name version))
445 "1wa9a32wzqnxqh1jh554afj13dzjr6mw2wzqzw8d08nza9pg2ra2"))))
446 (build-system gnu-build-system)
450 (string-append "PREFIX=" (assoc-ref %outputs "out")))
452 ;; FIXME: tests require "prove"
455 (modify-phases %standard-phases
456 (delete 'configure))))
458 `(("libtool" ,libtool)
460 (home-page "https://github.com/mauke/unibilium")
461 (synopsis "Terminfo parsing library")
462 (description "Unibilium is a basic C terminfo library. It doesn't depend
463 on curses or any other library. It also doesn't use global variables, so it
464 should be thread-safe.")
465 (license license:lgpl3+)))
467 (define-public libvterm
474 (uri (string-append "http://www.leonerd.org.uk/code/libvterm/"
475 "libvterm-" version ".tar.gz"))
478 "1n5maylann2anfifjy576vzyar9q5m1kzpyiz2hca2pacxy8xf4v"))))
479 (build-system gnu-build-system)
483 (string-append "PREFIX=" (assoc-ref %outputs "out")))
486 (modify-phases %standard-phases
487 (delete 'configure))))
489 `(("libtool" ,libtool)
491 (home-page "http://www.leonerd.org.uk/code/libvterm/")
492 (synopsis "VT220/xterm/ECMA-48 terminal emulator library")
493 (description "Libvterm is an abstract C99 library which implements a VT220
494 or xterm-like terminal emulator. It doesn't use any particular graphics
495 toolkit or output system, instead it invokes callback function pointers that
496 its embedding program should provide it to draw on its behalf. It avoids
497 calling @code{malloc} during normal running state, allowing it to be used in
498 embedded kernel situations.")
499 (license license:expat)))
501 (define-public cool-retro-term
502 (let ((commit "1.1.1")
503 (revision "0")) ;not used currently
505 (name "cool-retro-term")
509 (file-name (string-append name "-" version "-checkout"))
511 (url (string-append "https://github.com/Swordfish90/" name))
515 (base32 "0wb6anchxa5jpn9c73kr4byrf2xlj8x8qzc5x7ny6saj7kbbvp75"))
516 (modules '((guix build utils)
522 '(let* ((fonts '(;"1971-ibm-3278" ; BSD 3-clause
523 "1977-apple2" ; Non-Free
524 "1977-commodore-pet" ; Non-Free
525 "1979-atari-400-800" ; Non-Free
526 ;"1981-ibm-pc ; CC-SA 4.0
527 "1982-commodore64")) ; Non-Free
528 ;"1985-ibm-pc-vga" ; CC-SA 4.0
529 ;"modern-fixedsys-excelsior" ; Redistributable
530 ;"modern-hermit" ; SIL
531 ;"modern-inconsolata"; SIL
532 ;"modern-pro-font-win-tweaked" ; X11
533 ;"modern-proggy-tiny"; X11
534 ;"modern-terminus" ; SIL
535 (name-rx (make-regexp " *name: *\"([^\"]*)\""))
536 (source-rx (make-regexp " *source: \"fonts/([^/]*)[^\"]*\""))
537 (fontname-rx (make-regexp "\"fontName\":\"([^\"]*).*"))
539 ;; Gather font names from all Fonts*.qml files.
540 ;; These will be used to remove items from the
543 (lambda (font-file names)
544 (call-with-input-file font-file
546 (let loop ((name #f) (names names))
547 (let ((line (read-line port)))
549 ((eof-object? line) (pk 'names names))
550 ((regexp-exec name-rx line)
552 (loop (match:substring m 1) names)))
553 ((regexp-exec source-rx line)
555 (let ((font (match:substring m 1)))
556 (if (member font fonts)
557 (loop #f (lset-adjoin string=?
560 (else (loop name names))))))))
561 '() (find-files "app/qml" "Font.*\\.qml"))))
562 ;; Remove the font files themselves
563 (for-each (lambda (font)
564 (delete-file-recursively
565 (string-append "app/qml/fonts/" font)))
567 ;; Remove mention of those fonts in the source
568 (substitute* "app/qml/resources.qrc"
569 (((string-append " *<file>fonts/("
570 (string-join fonts "|")
575 (let ((start-rx (make-regexp " *ListElement\\{"))
576 (end-rx (make-regexp " *\\}")))
577 (with-atomic-file-replacement file
579 (let loop ((line-buffer '())
582 (let ((line (read-line in 'concat)))
584 ((eof-object? line) #t) ;done
585 ((regexp-exec start-rx line)
586 (loop (cons line line-buffer) #t #f))
587 ((or (regexp-exec source-rx line)
588 (regexp-exec fontname-rx line))
590 (let ((font-or-name (match:substring m 1)))
591 (if (or (member font-or-name fonts)
592 (member font-or-name names))
594 (loop (cons line line-buffer)
596 ((regexp-exec end-rx line)
598 (for-each (cut display <> out)
599 (reverse line-buffer))
602 (hold? (loop (cons line line-buffer)
604 (discard? (loop line-buffer #f #t))
605 (else (display line out)
606 (loop '() #f #f)))))))))
607 '("app/qml/FontPixels.qml"
608 "app/qml/FontScanlines.qml"
610 "app/qml/ApplicationSettings.qml"))
611 ;; Final substitution for default scanline and pixel fonts
612 (substitute* "app/qml/ApplicationSettings.qml"
613 (("COMMODORE_PET") "PROGGY_TINY"))
615 (build-system gnu-build-system)
618 ("qtdeclarative" ,qtdeclarative)
619 ("qtgraphicaleffects" ,qtgraphicaleffects)
620 ("qtquickcontrols" ,qtquickcontrols)))
623 (modify-phases %standard-phases
625 (lambda* (#:key outputs #:allow-other-keys)
626 (let ((out (assoc-ref outputs "out")))
627 (substitute* '("qmltermwidget/qmltermwidget.pro")
628 (("INSTALL_DIR = \\$\\$\\[QT_INSTALL_QML\\]")
629 (string-append "INSTALL_DIR = " out "/lib/qt5/qml")))
630 (substitute* '("cool-retro-term.pro" "app/app.pro")
633 (add-after 'install 'wrap-executable
634 (lambda* (#:key inputs outputs #:allow-other-keys)
635 (let ((out (assoc-ref outputs "out"))
636 (qml "/lib/qt5/qml"))
637 (wrap-program (string-append out "/bin/cool-retro-term")
638 `("QML2_IMPORT_PATH" ":" prefix
639 (,(string-append out qml)
641 (string-append (assoc-ref inputs i) qml))
644 "qtquickcontrols")))))
646 (add-after 'install 'add-alternate-name
647 (lambda* (#:key outputs #:allow-other-keys)
648 (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
649 (symlink (string-append bin "/cool-retro-term")
650 (string-append bin "/crt"))
652 (add-after 'install 'install-man
653 (lambda* (#:key outputs #:allow-other-keys)
654 (let ((mandir (string-append (assoc-ref outputs "out")
656 (install-file "packaging/debian/cool-retro-term.1" mandir)
658 (synopsis "Terminal emulator")
660 "Cool-retro-term (crt) is a terminal emulator which mimics the look and
661 feel of the old cathode ray tube (CRT) screens. It has been designed to be
662 eye-candy, customizable, and reasonably lightweight.")
663 (home-page "https://github.com/Swordfish90/cool-retro-term")
665 license:gpl2+ ; qmltermwidget
666 license:gpl3+ ; cool-retro-term
672 (define-public sakura
678 (uri (string-append "https://launchpad.net/" name "/trunk/"
679 version "/+download/" name "-" version
683 "15gskj5yv5qs3cj4ps43735kfx2nzjlhq4dk9ghirl8lvhhxsm5m"))))
684 (build-system cmake-build-system)
686 '(#:tests? #f)) ; no check phase
688 `(("gettext" ,gettext-minimal)
689 ("perl" ,perl) ; for pod2man
690 ("pkg-config" ,pkg-config)))
694 (home-page "https://launchpad.net/sakura")
695 (synopsis "A simple but powerful libvte-based terminal emulator")
696 (description "@code{Sakura} is a terminal emulator based on GTK+ and VTE.
697 It's a terminal emulator with few dependencies, so you don't need a full GNOME
698 desktop installed to have a decent terminal emulator.")
699 (license license:gpl2)))
701 (define-public go-github.com-nsf-termbox-go
702 (let ((commit "288510b9734e30e7966ec2f22b87c5f8e67345e3")
705 (name "go-github.com-nsf-termbox-go")
706 (version (git-version "0.0.0" revision commit))
710 (url "https://github.com/nsf/termbox-go.git")
712 (file-name (git-file-name name version))
715 "0hdyisfaf8yb55h3p03p4sbq19546mp9fy28f2kn659mycmhxqk4"))))
716 (build-system go-build-system)
718 '(#:import-path "github.com/nsf/termbox-go"))
720 `(("go-github.com-mattn-go-runewidth"
721 ,go-github.com-mattn-go-runewidth)))
722 (synopsis "@code{termbox} provides a minimal API for text-based user
725 "Termbox is a library that provides a minimalistic API which allows the
726 programmer to write text-based user interfaces.")
727 (home-page "https://github.com/nsf/termbox-go")
728 (license license:expat))))
730 (define-public go-github-com-junegunn-fzf
732 (name "go-github-com-junegunn-fzf")
738 (url "https://github.com/junegunn/fzf")
740 (file-name (git-file-name name version))
743 "0pwpr4fpw56yzzkcabzzgbgwraaxmp7xzzmap7w1xsrkbj7dl2xl"))))
744 (build-system go-build-system)
746 `(#:import-path "github.com/junegunn/fzf"))
748 `(("go-github.com-mattn-go-runewidth" ,go-github.com-mattn-go-runewidth)
749 ("go-github-com-mattn-go-shellwords" ,go-github-com-mattn-go-shellwords)
750 ("go-github-com-mattn-go-isatty" ,go-github-com-mattn-go-isatty)
751 ("go-github-com-gdamore-tcell" ,go-github-com-gdamore-tcell)
752 ("go-golang-org-x-crypto" ,go-golang-org-x-crypto)))
753 (home-page "https://github.com/junegunn/fzf")
754 (synopsis "Command-line fuzzy-finder")
755 (description "This package provides an interactive command-line filter
756 usable with any list--including files, command history, processes and more.")
757 (license license:expat)))
759 (define-public go-github.com-howeyc-gopass
760 (let ((commit "bf9dde6d0d2c004a008c27aaee91170c786f6db8")
763 (name "go-github.com-howeyc-gopass")
764 (version (git-version "0.0.0" revision commit))
768 (url "https://github.com/howeyc/gopass.git")
770 (file-name (git-file-name name version))
773 "1jxzyfnqi0h1fzlsvlkn10bncic803bfhslyijcxk55mgh297g45"))))
774 (build-system go-build-system)
776 '(#:import-path "github.com/howeyc/gopass"))
778 `(("go-golang-org-x-crypto"
779 ,go-golang-org-x-crypto)))
780 (synopsis "Retrieve password from a terminal or piped input in Go")
782 "@code{gopass} is a Go package for retrieving a password from user
783 terminal or piped input.")
784 (home-page "https://github.com/howeyc/gopass")
785 (license license:isc))))
787 (define-public python-pyte
794 (uri (pypi-uri "pyte" version))
797 "1an54hvyjm8gncx8cgabz9mkpgjkdb0bkyjlkh7g7f94nr3wnfl7"))))
798 (build-system python-build-system)
801 (modify-phases %standard-phases
802 (add-after 'unpack 'remove-failing-test
803 ;; TODO: Reenable when the `captured` files required by this test
804 ;; are included in the archive.
806 (delete-file "tests/test_input_output.py")
809 `(("python-wcwidth" ,python-wcwidth)))
811 `(("python-pytest-runner" ,python-pytest-runner)
812 ("python-pytest" ,python-pytest)))
813 (home-page "https://pyte.readthedocs.io/")
814 (synopsis "Simple VTXXX-compatible terminal emulator")
815 (description "@code{pyte} is an in-memory VTxxx-compatible terminal
816 emulator. @var{VTxxx} stands for a series of video terminals, developed by
817 DEC between 1970 and 1995. The first and probably most famous one was the
818 VT100 terminal, which is now a de-facto standard for all virtual terminal
821 pyte is a fork of vt102, which was an incomplete pure Python implementation
823 (license license:lgpl3+)))
825 (define-public python2-pyte
826 (package-with-python2 python-pyte))
828 (define-public python-blessings
830 (name "python-blessings")
835 (uri (pypi-uri "blessings" version))
838 "0z8mgkbmisxs10rz88qg46l1c9a8n08k8cy2iassal2zh16qbrcq"))))
839 (build-system python-build-system)
841 ;; FIXME: Test suite is unable to detect TTY conditions.
844 `(("python-nose" ,python-nose)
845 ("python-six" ,python-six)))
846 (home-page "https://github.com/erikrose/blessings")
847 (synopsis "Python module to manage terminal color, styling, and
849 (description "Blessings is a pythonic API to manipulate terminal color,
850 styling, and positioning. It provides similar features to curses but avoids
851 some of curses’s limitations: it does not require clearing the whole screen
852 for little changes, provides a scroll-back buffer after the program exits, and
853 avoids styling altogether when the output is redirected to something other
855 (license license:expat)))
857 (define-public python2-blessings
858 (package-with-python2 python-blessings))
860 (define-public python-curtsies
862 (name "python-curtsies")
867 (uri (pypi-uri "curtsies" version))
870 "1vljmw3sy6lrqahhpyg4gk13mzcx3mwhvg8s41698ms3cpgkjipc"))))
871 (build-system python-build-system)
874 (modify-phases %standard-phases
877 (invoke "nosetests" "-v"))))))
879 `(("python-blessings" ,python-blessings)
880 ("python-wcwidth" ,python-wcwidth)))
882 `(("python-mock" ,python-mock)
883 ("python-pyte" ,python-pyte)
884 ("python-nose" ,python-nose)))
885 (home-page "https://github.com/thomasballinger/curtsies")
886 (synopsis "Library for curses-like terminal interaction with colored
888 (description "Curtsies is a Python library for interacting with the
889 terminal. It features string-like objects which carry formatting information,
890 per-line fullscreen terminal rendering, and keyboard input event reporting.")
891 (license license:expat)))
893 (define-public python2-curtsies
894 (package-with-python2 python-curtsies))
904 (url "https://github.com/tmate-io/tmate.git")
906 (file-name (git-file-name name version))
909 "0pfl9vrswzim9ydi1n652h3rax2zrmy6sqkp0r09yy3lw83h4y1r"))))
910 (build-system gnu-build-system)
912 `(("libevent" ,libevent)
915 ("ncurses" ,ncurses)))
917 `(("autoconf" ,autoconf)
918 ("automake" ,automake)
919 ("pkg-config" ,pkg-config)))
920 (home-page "https://tmate.io/")
921 (synopsis "Terminal sharing application")
922 (description "tmate is a terminal sharing application that allows you to
923 share your terminal with other users over the Internet. tmate is a fork of
925 (license license:isc)))
931 (home-page "https://sw.kovidgoyal.net/kitty/")
936 (url "https://github.com/kovidgoyal/kitty.git")
937 (commit (string-append "v" version))))
938 (file-name (git-file-name name version))
940 (base32 "1bszyddar0g1gdz67h8rd3gbrdhi6ahjg7j14cjiqxm1938z9ajf"))
941 (modules '((guix build utils)))
944 ;; patch needed as sphinx-build is used as a python script
945 ;; whereas the guix package uses a bash script launching the
947 (substitute* "docs/conf.py"
948 (("(from kitty.constants import str_version)" kitty-imp)
949 (string-append "sys.path.append(\"..\")\n" kitty-imp)))
950 (substitute* "docs/Makefile"
951 (("^SPHINXBUILD[[:space:]]+= (python3.*)$")
952 "SPHINXBUILD = sphinx-build\n"))
954 (build-system gnu-build-system)
957 ("harfbuzz" ,harfbuzz)
959 ("libcanberra" ,libcanberra)
961 ("freetype" ,freetype)
962 ("fontconfig" ,fontconfig)
963 ("pygments" ,python-pygments)
964 ("wayland" ,wayland)))
966 `(("pkg-config" ,pkg-config)
967 ("libxrandr" ,libxrandr)
969 ("libxcursor" ,libxcursor)
971 ("libxinerama" ,libxinerama)
972 ("libgl1-mesa" ,mesa)
973 ("libxkbcommon" ,libxkbcommon)
974 ("sphinx" ,python-sphinx)
975 ("ncurses" ,ncurses) ;; for tic command
976 ("wayland-protocols" ,wayland-protocols)))
978 '(#:phases (modify-phases %standard-phases
980 ;; Wayland backend requires EGL, which isn't found
981 ;; out-of-the-box for some reason. Hard-code it instead.
982 (add-after 'unpack 'hard-code-libegl
984 (let* ((mesa (assoc-ref %build-inputs "libgl1-mesa"))
985 (libegl (string-append mesa "/lib/libEGL.so.1")))
986 (substitute* "glfw/egl_context.c"
987 (("libEGL.so.1") libegl)))
991 (invoke "python3" "setup.py" "linux-package")))
994 (invoke "python3" "setup.py" "test")))
995 (add-before 'install 'rm-pycache
996 ;; created python cache __pycache__ are non deterministic
998 (let ((pycaches (find-files "linux-package/"
1000 #:directories? #t)))
1001 (for-each delete-file-recursively pycaches)
1005 (let* ((out (assoc-ref %outputs "out"))
1006 (obin (string-append out "/bin"))
1007 (olib (string-append out "/lib"))
1008 (oshare (string-append out "/share")))
1009 (copy-recursively "linux-package/bin" obin)
1010 (copy-recursively "linux-package/share" oshare)
1011 (copy-recursively "linux-package/lib" olib)
1013 (synopsis "Fast, featureful, GPU based terminal emulator")
1014 (description "Kitty is a fast and featureful GPU-based terminal emulator:
1016 @item Offloads rendering to the GPU for lower system load and buttery smooth
1017 scrolling. Uses threaded rendering to minimize input latency.
1018 @item Supports all modern terminal features: graphics (images), unicode,
1019 true-color, OpenType ligatures, mouse protocol, focus tracking, bracketed
1020 paste and several new terminal protocol extensions.
1021 @item Supports tiling multiple terminal windows side by side in different
1022 layouts without needing to use an extra program like tmux.
1023 @item Can be controlled from scripts or the shell prompt, even over SSH.
1024 @item Has a framework for Kittens, small terminal programs that can be used to
1025 extend kitty's functionality. For example, they are used for Unicode input,
1026 hints, and side-by-side diff.
1027 @item Supports startup sessions which allow you to specify the window/tab
1028 layout, working directories and programs to run on startup.
1029 @item Allows you to open the scrollback buffer in a separate window using
1030 arbitrary programs of your choice. This is useful for browsing the history
1031 comfortably in a pager or editor.
1033 (license license:gpl3+)))
1035 (define-public eternalterminal
1037 (name "eternalterminal")
1043 (url "https://github.com/MisterTea/EternalTerminal.git")
1044 (commit (string-append "et-v" version))))
1045 (file-name (git-file-name name version))
1047 (base32 "0jh89229bd9s82h3aj6faaybwr5xvnk8w2kgz47gq263pz021zpl"))))
1048 (build-system cmake-build-system)
1050 '(#:configure-flags '("-DBUILD_TEST=ON")
1052 (modify-phases %standard-phases
1053 (add-after 'unpack 'insert-googletests
1054 (lambda* (#:key inputs #:allow-other-keys)
1055 (let ((tests (assoc-ref inputs "googletest")))
1056 (copy-recursively tests "external/googletest"))
1058 (add-after 'install 'dont-provide-gtest-libraries
1059 (lambda* (#:key outputs #:allow-other-keys)
1060 (let ((out (assoc-ref outputs "out")))
1061 (delete-file-recursively (string-append out "/include"))
1062 (delete-file-recursively (string-append out "/lib")))
1065 `(("gflags" ,gflags)
1066 ("libsodium" ,libsodium)
1067 ("protobuf" ,protobuf)))
1069 `(("googletest" ,(package-source googletest))))
1070 (home-page "https://mistertea.github.io/EternalTerminal/")
1071 (synopsis "Remote shell that reconnects without interrupting the session")
1072 (description "@dfn{Eternal Terminal} (ET) is a remote shell that
1073 automatically reconnects without interrupting the session. ET uses SSH to
1074 initialize a secure connection. Unlike SSH sessions, which must be killed and
1075 reconnected after a network outage an ET session will survive network outages
1076 and IP roaming. ET provides the same core functionality as @command{mosh},
1077 while also supporting native scrolling and @command{tmux} control mode
1078 (@code{tmux -CC}).")
1079 (license license:asl2.0)))
1081 (define-public wterm
1089 (url "https://github.com/majestrate/wterm.git")
1090 (commit "0ae42717c08a85a6509214e881422c7fbe7ecc45")))
1093 "0g4lzmc1w6na81i6hny32xds4xfig4xzswzfijyi6p93a1226dv0"))
1094 (file-name (git-file-name name version))))
1095 (build-system gnu-build-system)
1097 `(("pkg-config" ,pkg-config)))
1099 `(("fontconfig" ,fontconfig)
1100 ("freetype" ,freetype)
1102 ("libxkbcommon" ,libxkbcommon)
1103 ("ncurses" ,ncurses)
1105 ("wayland" ,wayland)))
1109 ;; Without -j1 it fails to find file libwld.a.
1110 #:parallel-build? #f
1112 #:make-flags (list "CC=gcc"
1113 (string-append "PREFIX=" %output)
1114 (string-append "TERMINFO="
1115 (assoc-ref %outputs "out")
1118 (modify-phases %standard-phases
1120 (add-after 'unpack 'terminfo-fix
1122 (substitute* "Makefile"
1123 (("\ttic .*") "\tmkdir -p $(SHARE_PREFIX)/share/terminfo
1124 \ttic -o $(SHARE_PREFIX)/share/terminfo -s wterm.info\n"))
1126 (native-search-paths
1127 (list (search-path-specification
1128 (variable "TERMINFO_DIRS")
1129 (files '("share/terminfo")))))
1130 (home-page "https://github.com/majestrate/wterm")
1131 (synopsis "Terminal emulator for Wayland")
1132 (description "wterm is a native Wayland terminal emulator based on
1133 an st fork using wld. st is a simple terminal emulator for X originally
1135 (license license:x11)))
1137 (define-public alacritty
1145 (url "https://github.com/jwilm/alacritty.git")
1146 (commit (string-append "v" version))))
1147 (file-name (git-file-name name version))
1149 (base32 "05jcg33ifngpzw2hdhgb614j87ihhhlqgar0kky183rywg0dxikg"))
1150 (modules '((guix build utils)))
1152 ;; Don't use a custom location for winit-0.20-alpha6.
1153 '(begin (substitute* "Cargo.toml"
1156 (build-system cargo-build-system)
1159 (("rust-clap" ,rust-clap-2)
1160 ("rust-log" ,rust-log-0.4)
1161 ("rust-time" ,rust-time-0.1)
1162 ("rust-env-logger" ,rust-env-logger-0.7)
1163 ("rust-serde" ,rust-serde-1.0)
1164 ("rust-serde-yaml" ,rust-serde-yaml-0.8)
1165 ("rust-serde-json" ,rust-serde-json-1.0)
1166 ("rust-glutin" ,rust-glutin-0.22) ; adjust 'patch-glutin-libgl-path as needed
1167 ("rust-notify" ,rust-notify-4)
1168 ("rust-libc" ,rust-libc-0.2)
1169 ("rust-unicode-width" ,rust-unicode-width-0.1)
1170 ("rust-parking-lot" ,rust-parking-lot-0.9)
1171 ("rust-urlocator" ,rust-urlocator-0.1)
1172 ("rust-xdg" ,rust-xdg-2.2)
1173 ("rust-image" ,rust-image-0.22)
1174 ("rust-dirs" ,rust-dirs-2.0)
1175 ("rust-x11-dl" ,rust-x11-dl-2)
1176 ("rust-winapi" ,rust-winapi-0.3)
1177 ("rust-base64" ,rust-base64-0.11)
1178 ("rust-bigflags" ,rust-bitflags-1)
1179 ("rust-fnv" ,rust-fnv-1.0)
1180 ("rust-mio" ,rust-mio-0.6)
1181 ("rust-mio-extras" ,rust-mio-extras-2)
1182 ("rust-terminfo" ,rust-terminfo-0.6)
1183 ("rust-url" ,rust-url-2.1)
1184 ("rust-vte" ,rust-vte-0.3)
1185 ("rust-nix" ,rust-nix-0.15)
1186 ("rust-miow" ,rust-miow-0.3)
1187 ("rust-mio-anonymous-pipes" ,rust-mio-anonymous-pipes-0.1)
1188 ("rust-mio-named-pipes" ,rust-mio-named-pipes-0.1)
1189 ("rust-signal-hook" ,rust-signal-hook-0.1)
1190 ("rust-clipboard-win" ,rust-clipboard-win-2.1)
1191 ("rust-objc" ,rust-objc-0.2)
1192 ("rust-objc-id" ,rust-objc-id-0.1)
1193 ("rust-objc-foundation" ,rust-objc-foundation-0.1)
1194 ("rust-x11-clipboard" ,rust-x11-clipboard-0.4)
1195 ("rust-smithay-clipboard" ,rust-smithay-clipboard-0.3)
1196 ("rust-wayland-client" ,rust-wayland-client-0.23)
1197 ("rust-euclid" ,rust-euclid-0.20)
1198 ("rust-foreign-types" ,rust-foreign-types-0.5)
1199 ("rust-servo-fontconfig" ,rust-servo-fontconfig-0.4)
1200 ("rust-freetype-rs" ,rust-freetype-rs-0.23)
1201 ("rust-core-foundation" ,rust-core-foundation-0.6)
1202 ("rust-core-foundation-sys" ,rust-core-foundation-sys-0.6)
1203 ("rust-core-text" ,rust-core-text-13)
1204 ("rust-core-graphics" ,rust-core-graphics-0.17)
1205 ("rust-dwrote" ,rust-dwrote-0.9)
1206 ("rust-winpty-sys" ,rust-winpty-sys-0.4))
1207 #:cargo-development-inputs
1208 (("rust-rustc-tools-util" ,rust-rustc-tools-util-0.2)
1209 ("rust-gl-generator" ,rust-gl-generator-0.14)
1210 ("rust-andrew" ,rust-andrew-0.2)
1211 ("rust-smithay-client-toolkit" ,rust-smithay-client-toolkit-0.6)
1212 ("rust-embed-resource" ,rust-embed-resource-1.3)
1213 ("rust-http-req" ,rust-http-req-0.5)
1214 ("rust-zip" ,rust-zip-0.5)
1215 ("rust-tempfile" ,rust-tempfile-3.1)
1216 ("rust-named-pipe" ,rust-named-pipe-0.4)
1217 ("rust-winapi" ,rust-winapi-0.3))
1219 (modify-phases %standard-phases
1220 (add-after 'configure 'patch-glutin-libgl-path
1221 (lambda* (#:key inputs cargo-inputs vendor-dir #:allow-other-keys)
1222 (let* ((glutin-name ,(package-name rust-glutin-0.22))
1223 (glutin-version ,(package-version rust-glutin-0.22))
1226 glutin-name "-" glutin-version ".tar.gz/src/api/"))
1227 (mesa (assoc-ref inputs "mesa")))
1228 (substitute* (string-append vendor-dir "/" src-api "glx/mod.rs")
1229 (("libGL.so") (string-append mesa "/lib/libGL.so")))
1230 (substitute* (string-append vendor-dir "/" src-api "egl/mod.rs")
1231 (("libEGL.so") (string-append mesa "/lib/libEGL.so")))
1233 (add-after 'configure 'remove-alacritty-vendor
1234 (lambda* (#:key vendor-dir #:allow-other-keys)
1235 ;; We don't want Alacritty to be a dependency of itself
1236 ;; If we don't delete it from guix-vendor then build will fail
1237 ;; because Alacritty has a virtual workspace Cargo.toml.
1238 (delete-file-recursively
1239 (string-append vendor-dir "/alacritty-" ,version ".tar.xz"))
1242 (lambda* (#:key inputs outputs #:allow-other-keys)
1243 (let* ((out (assoc-ref outputs "out"))
1244 (share (string-append out "/share"))
1245 (icons (string-append share "/icons/hicolor/scalable/apps"))
1246 (tic (string-append (assoc-ref inputs "ncurses") "/bin/tic"))
1247 (man (string-append share "/man/man1"))
1248 (alacritty-bin "target/release/alacritty"))
1251 (install-file alacritty-bin (string-append out "/bin"))
1253 ;; Install man pages
1255 (copy-file "extra/alacritty.man"
1256 (string-append man "/alacritty.1"))
1258 ;; Install desktop file
1259 (install-file "extra/linux/alacritty.desktop"
1260 (string-append share "/applications"))
1264 (copy-file "extra/logo/alacritty-term.svg"
1265 (string-append icons "/Alacritty.svg"))
1268 (mkdir-p (string-append share "/terminfo"))
1269 ;; We don't compile alacritty-common entry because
1270 ;; it's being used only for inheritance.
1271 (invoke tic "-x" "-e" "alacritty,alacritty-direct"
1272 "-o" (string-append share "/terminfo/")
1273 "extra/alacritty.info")
1275 ;; Install completions
1277 "extra/completions/alacritty.bash"
1278 (string-append out "/etc/bash_completion.d"))
1280 "extra/completions/_alacritty"
1281 (string-append share "/zsh/site-functions"))
1283 "extra/completions/alacritty.fish"
1284 (string-append share "/fish/vendor_completions.d"))
1288 ("fontconfig" ,fontconfig)
1289 ("freetype" ,freetype)
1292 ("libxcursor" ,libxcursor)
1294 ("libxkbcommon" ,libxkbcommon)
1295 ("libxrandr" ,libxrandr)
1296 ("libxxf86vm" ,libxxf86vm)
1297 ("wayland" ,wayland)
1301 ("ncurses" ,ncurses)
1302 ("pkg-config" ,pkg-config)
1303 ("python3" ,python)))
1304 (home-page "https://github.com/alacritty/alacritty")
1305 (synopsis "GPU-accelerated terminal emulator")
1307 "Alacritty is a GPU-accelerated terminal emulator with a strong focus on
1308 simplicity and performance. With such a strong focus on performance, included
1309 features are carefully considered and you can always expect Alacritty to be
1310 blazingly fast. By making sane choices for defaults, Alacritty requires no
1311 additional setup. However, it does allow configuration of many aspects of the
1312 terminal. Note that you need support for OpenGL 3.2 or higher.")
1313 (license license:asl2.0)))