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>
22 ;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de>
24 ;;; This file is part of GNU Guix.
26 ;;; GNU Guix is free software; you can redistribute it and/or modify it
27 ;;; under the terms of the GNU General Public License as published by
28 ;;; the Free Software Foundation; either version 3 of the License, or (at
29 ;;; your option) any later version.
31 ;;; GNU Guix is distributed in the hope that it will be useful, but
32 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
33 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
34 ;;; GNU General Public License for more details.
36 ;;; You should have received a copy of the GNU General Public License
37 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
39 (define-module (gnu packages terminals)
40 #:use-module ((guix licenses) #:prefix license:)
41 #:use-module (guix build-system cargo)
42 #:use-module (guix build-system cmake)
43 #:use-module (guix build-system gnu)
44 #:use-module (guix build-system glib-or-gtk)
45 #:use-module (guix build-system go)
46 #:use-module (guix build-system python)
47 #:use-module (guix download)
48 #:use-module (guix git-download)
49 #:use-module (guix packages)
50 #:use-module (gnu packages)
51 #:use-module (gnu packages autotools)
52 #:use-module (gnu packages check)
53 #:use-module (gnu packages cmake)
54 #:use-module (gnu packages compression)
55 #:use-module (gnu packages crates-io)
56 #:use-module (gnu packages crypto)
57 #:use-module (gnu packages docbook)
58 #:use-module (gnu packages fontutils)
59 #:use-module (gnu packages freedesktop)
60 #:use-module (gnu packages gcc)
61 #:use-module (gnu packages gettext)
62 #:use-module (gnu packages gl)
63 #:use-module (gnu packages glib)
64 #:use-module (gnu packages gnome)
65 #:use-module (gnu packages golang)
66 #:use-module (gnu packages gtk)
67 #:use-module (gnu packages image)
68 #:use-module (gnu packages libcanberra)
69 #:use-module (gnu packages libevent)
70 #:use-module (gnu packages linux)
71 #:use-module (gnu packages ncurses)
72 #:use-module (gnu packages perl)
73 #:use-module (gnu packages perl-check)
74 #:use-module (gnu packages pkg-config)
75 #:use-module (gnu packages popt)
76 #:use-module (gnu packages protobuf)
77 #:use-module (gnu packages python)
78 #:use-module (gnu packages python-web)
79 #:use-module (gnu packages python-xyz)
80 #:use-module (gnu packages qt)
81 #:use-module (gnu packages serialization)
82 #:use-module (gnu packages sphinx)
83 #:use-module (gnu packages ssh)
84 #:use-module (gnu packages textutils)
85 #:use-module (gnu packages xdisorg)
86 #:use-module (gnu packages xml)
87 #:use-module (gnu packages xorg)
88 #:use-module (srfi srfi-26))
97 (url "https://github.com/lanoxx/tilda")
98 (commit (string-append "tilda-" version))))
99 (file-name (git-file-name name version))
102 "0psq0f4s0s92bba6wwcf6b0j7i59b76svqxhvpavwv53yvhmmamn"))))
103 (build-system glib-or-gtk-build-system)
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
141 (add-after 'unpack 'patch-xdg-open
143 (substitute* "termite.cc"
144 (("xdg-open") (which "xdg-open")))
148 ;; This sets the destination when installing the necessary terminal
149 ;; capability data, which are not provided by 'ncurses'. See
150 ;; <https://lists.gnu.org/archive/html/bug-ncurses/2009-10/msg00031.html>.
151 #:make-flags (list "PREFIX="
152 (string-append "VERSION=v" (version))
153 (string-append "DESTDIR="
154 (assoc-ref %outputs "out")))))
158 ("xdg-utils" ,xdg-utils)
159 ("ncurses" ,ncurses)))
161 `(("pkg-config" ,pkg-config)))
163 ;; FIXME: This should only be located in 'ncurses'. Nonetheless it is
164 ;; provided for usability reasons. See <https://bugs.gnu.org/22138>.
166 (list (search-path-specification
167 (variable "TERMINFO_DIRS")
168 (files '("share/terminfo")))))
169 (home-page "https://github.com/thestinger/termite/")
170 (synopsis "Keyboard-centric, VTE-based terminal")
171 (description "Termite is a minimal terminal emulator designed for use with
172 tiling window managers. It is a modal application, similar to Vim, with an
173 insert mode and command mode where keybindings have different functions.")
175 ;; Files under util/ are under the Expat license; the rest is LGPLv2+.
176 (license license:lgpl2.0+)))
178 (define-public asciinema
186 (url "https://github.com/asciinema/asciinema")
187 (commit (string-append "v" version))))
188 (file-name (git-file-name name version))
191 "1a2pysxnp6icyd08mgf66xr6f6j0irnfxdpf3fmzcz31ix7l9kc4"))))
192 (build-system python-build-system)
195 (modify-phases %standard-phases
196 (add-before 'build 'patch-exec-paths
197 (lambda* (#:key inputs #:allow-other-keys)
198 (let ((ncurses (assoc-ref inputs "ncurses")))
199 (substitute* "asciinema/term.py"
201 (string-append "'" ncurses "/bin/tput'"))))
204 (lambda _ (invoke "nosetests" "-v"))))))
205 (inputs `(("ncurses" ,ncurses)))
208 `(("python-nose" ,python-nose)))
209 (home-page "https://asciinema.org")
210 (synopsis "Terminal session recorder")
212 "Use asciinema to record and share your terminal sessions, the right way.
213 Forget screen recording apps and blurry video. Enjoy a lightweight, purely
214 text-based approach to terminal recording.")
215 (license license:gpl3)))
217 (define-public libtsm
218 (let ((commit "f70e37982f382b03c6939dac3d5f814450bda253")
222 (version (git-version "0.0.0" revision commit))
225 ;; The freedesktop repository is no longer maintained.
227 (url (string-append "https://github.com/Aetf/" name))
229 (file-name (git-file-name name version))
232 "0mwn91i5h5d518i1s05y7hzv6bc13vzcvxszpfh77473iwg4wprx"))))
233 (build-system cmake-build-system)
235 `(#:configure-flags '("-DBUILD_TESTING=ON")))
237 `(("pkg-config" ,pkg-config)))
239 `(("libxkbcommon" ,libxkbcommon)
241 (synopsis "Xterm state machine library")
242 (description "TSM is a state machine for DEC VT100-VT520 compatible
243 terminal emulators. It tries to support all common standards while keeping
244 compatibility to existing emulators like xterm, gnome-terminal, konsole, etc.")
245 (home-page "https://www.freedesktop.org/wiki/Software/libtsm")
246 ;; Hash table implementation is lgpl2.1+ licensed.
247 ;; The wcwidth implementation in external/wcwidth.{h,c} uses a license
249 ;; UCS-4 to UTF-8 encoding is copied from "terminology" which is released
250 ;; under the bsd 2 license.
251 (license (list license:expat license:lgpl2.1+ license:isc license:bsd-2)))))
253 (define-public kmscon
254 (let ((commit "01dd0a231e2125a40ceba5f59fd945ff29bf2cdc")
258 (version (git-version "0.0.0" revision commit))
261 ;; The freedesktop repository is no longer maintained.
263 (url (string-append "https://github.com/Aetf/" name))
267 "0q62kjsvy2iwy8adfiygx2bfwlh83rphgxbis95ycspqidg9py87"))
269 (search-patches "kmscon-runtime-keymap-switch.patch"))
270 (modules '((guix build utils)))
271 (file-name (git-file-name name version))))
272 (build-system gnu-build-system)
274 `(;; The closure of MESA is huge so we'd rather avoid it.
275 #:disallowed-references (,mesa)
277 #:phases (modify-phases %standard-phases
278 ;; Use elogind instead of systemd.
279 (add-before 'configure 'remove-systemd
281 (substitute* "configure"
282 (("libsystemd-daemon libsystemd-login")
284 (substitute* "src/uterm_systemd.c"
285 (("#include <systemd/sd-login.h>")
286 "#include <elogind/sd-login.h>")
287 ;; We don't have this header.
288 (("#include <systemd/sd-daemon\\.h>")
290 ;; Replace the call to 'sd_booted' by the truth value.
294 `(("pkg-config" ,pkg-config)
295 ("autoconf" ,autoconf)
296 ("automake" ,automake)
298 ("libxslt" ,libxslt) ;to build the man page
299 ("libxml2" ,libxml2) ;for XML_CATALOG_FILES
300 ("docbook-xsl" ,docbook-xsl)))
304 ("libxkbcommon" ,libxkbcommon)
306 ;; MESA can be used for accelerated video output via OpenGLESv2, but
307 ;; it's a bit dependency that we'd rather avoid in the installation
312 (synopsis "Linux KMS-based terminal emulator")
313 (description "Kmscon is a terminal emulator based on Linux's @dfn{kernel
314 mode setting} (KMS). It can replace the in-kernel virtual terminal (VT)
315 implementation with a user-space console. Compared to the Linux console,
316 kmscon provides enhanced features including XKB-compatible internationalized
317 keyboard support, UTF-8 input/font support, hardware-accelerated rendering,
318 multi-seat support, a replacement for @command{mingetty}, and more.")
319 (home-page "https://www.freedesktop.org/wiki/Software/kmscon")
320 ;; Hash table implementation is lgpl2.1+ licensed.
321 ;; The wcwidth implementation in external/wcwidth.{h,c} uses a license
323 ;; UCS-4 to UTF-8 encoding is copied from "terminology" which is released
324 ;; under the bsd 2 license.
325 ;; Unifont-Font is from http://unifoundry.com/unifont.html and licensed
326 ;; under the terms of the GNU GPL.
327 (license (list license:expat license:lgpl2.1+ license:bsd-2
329 (supported-systems (filter (cut string-suffix? "-linux" <>)
330 %supported-systems)))))
332 (define-public libtermkey
338 (uri (string-append "http://www.leonerd.org.uk/code/libtermkey/"
339 "libtermkey-" version ".tar.gz"))
341 (base32 "0psd0kf10q5ixfima0mxz10syy7qq1ilz1npr0rz862xycvzgjyf"))))
342 (build-system gnu-build-system)
346 (string-append "PREFIX=" (assoc-ref %outputs "out")))
347 #:phases (modify-phases %standard-phases
348 (delete 'configure)) ; no configure script
349 #:test-target "test"))
350 (inputs `(("ncurses" ,ncurses)))
351 (native-inputs `(("libtool" ,libtool)
352 ("perl-test-harness" ,perl-test-harness)
353 ("pkg-config" ,pkg-config)))
354 (synopsis "Keyboard entry processing library for terminal-based programs")
356 "Libtermkey handles all the necessary logic to recognise special keys, UTF-8
357 combining, and so on, with a simple interface.")
358 (home-page "http://www.leonerd.org.uk/code/libtermkey")
359 (license license:expat)))
361 (define-public picocom
368 (url "https://github.com/npat-efault/picocom")
370 (file-name (git-file-name name version))
373 "1vvjydqf0ax47nvdyyl67jafw5b3sfsav00xid6qpgia1gs2r72n"))))
374 (build-system gnu-build-system)
376 `(#:make-flags '("CC=gcc")
377 #:tests? #f ; no tests
379 (modify-phases %standard-phases
380 (delete 'configure) ; no configure script
382 ;; The Makefile lacks an ‘install’ target.
383 (lambda* (#:key outputs #:allow-other-keys)
384 (let* ((out (assoc-ref outputs "out"))
385 (bin (string-append out "/bin"))
386 (man (string-append out "/share/man/man1")))
387 (install-file "picocom" bin)
388 (install-file "picocom.1" man)))))))
389 (home-page "https://github.com/npat-efault/picocom")
390 (synopsis "Minimal dumb-terminal emulator")
392 "Picocom is a minimal dumb-terminal emulation program. It was designed to
393 serve as a simple and manual modem configuration, testing, and debugging tool.
394 It also serves well as a low-tech serial communications program to allow access
395 to all types of devices that provide serial consoles.")
396 (license license:gpl2+)))
406 ;; The original beep 1.3 at <http://www.johnath.com/beep> has been
407 ;; unmaintained for some time, and vulnerable to at least two CVEs:
408 ;; https://github.com/johnath/beep/issues/11#issuecomment-454056858
409 ;; Use this maintained fork instead.
410 (url "https://github.com/spkr-beep/beep")
411 (commit (string-append "v" version))))
412 (file-name (git-file-name name version))
414 (base32 "0jmvqk6g5n0wzj9znw42njxq3mzw1769f4db99b83927hf4aidi4"))))
415 (build-system gnu-build-system)
417 `(#:tests? #f ; no tests
419 (list (string-append "prefix=" (assoc-ref %outputs "out"))
420 (string-append "pkgdocdir=$(docdir)/" ,name "-" ,version))
422 (modify-phases %standard-phases
423 (delete 'configure)))) ; no configure script
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")
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 "1pfkhbbihd2kvaza707vl2nvk7bxaawmb37wf9v6d72mjng38w5w"))))
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/sakura/trunk/"
680 version "/+download/sakura-" version
684 "12wjmckf03qbnm8cb7qma0980anzajn3l92rj2yr8hhafl74x6kj"))))
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")
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")
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")
907 (file-name (git-file-name name version))
910 "0x5c31yq7ansmiy20a0qf59wagba9v3pq97mlkxrqxn4n1gcc6vi"))))
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")
938 (commit (string-append "v" version))))
939 (file-name (git-file-name name version))
941 (base32 "1bszyddar0g1gdz67h8rd3gbrdhi6ahjg7j14cjiqxm1938z9ajf"))
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")
1045 (commit (string-append "et-v" version))))
1046 (file-name (git-file-name name version))
1048 (base32 "03pdspggqxkmz95qb96pig5x0xw18hy9a7ivszydr32ry6kxxx1h"))))
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"))
1060 `(("gflags" ,gflags)
1061 ("libsodium" ,libsodium)
1062 ("protobuf" ,protobuf)))
1064 `(("googletest" ,(package-source googletest))))
1065 (home-page "https://mistertea.github.io/EternalTerminal/")
1066 (synopsis "Remote shell that reconnects without interrupting the session")
1067 (description "@dfn{Eternal Terminal} (ET) is a remote shell that
1068 automatically reconnects without interrupting the session. ET uses SSH to
1069 initialize a secure connection. Unlike SSH sessions, which must be killed and
1070 reconnected after a network outage an ET session will survive network outages
1071 and IP roaming. ET provides the same core functionality as @command{mosh},
1072 while also supporting native scrolling and @command{tmux} control mode
1073 (@code{tmux -CC}).")
1074 (license license:asl2.0)))
1076 (define-public wterm
1084 (url "https://github.com/majestrate/wterm")
1085 (commit "0ae42717c08a85a6509214e881422c7fbe7ecc45")))
1088 "0g4lzmc1w6na81i6hny32xds4xfig4xzswzfijyi6p93a1226dv0"))
1089 (file-name (git-file-name name version))))
1090 (build-system gnu-build-system)
1092 `(("pkg-config" ,pkg-config)))
1094 `(("fontconfig" ,fontconfig)
1095 ("freetype" ,freetype)
1097 ("libxkbcommon" ,libxkbcommon)
1098 ("ncurses" ,ncurses)
1100 ("wayland" ,wayland)))
1104 ;; Without -j1 it fails to find file libwld.a.
1105 #:parallel-build? #f
1107 #:make-flags (list "CC=gcc"
1108 (string-append "PREFIX=" %output)
1109 (string-append "TERMINFO="
1110 (assoc-ref %outputs "out")
1113 (modify-phases %standard-phases
1115 (add-after 'unpack 'terminfo-fix
1117 (substitute* "Makefile"
1118 (("\ttic .*") "\tmkdir -p $(SHARE_PREFIX)/share/terminfo
1119 \ttic -o $(SHARE_PREFIX)/share/terminfo -s wterm.info\n"))
1121 (native-search-paths
1122 (list (search-path-specification
1123 (variable "TERMINFO_DIRS")
1124 (files '("share/terminfo")))))
1125 (home-page "https://github.com/majestrate/wterm")
1126 (synopsis "Terminal emulator for Wayland")
1127 (description "wterm is a native Wayland terminal emulator based on
1128 an st fork using wld. st is a simple terminal emulator for X originally
1130 (license license:x11)))
1132 (define-public alacritty
1140 (url "https://github.com/jwilm/alacritty")
1141 (commit (string-append "v" version))))
1142 (file-name (git-file-name name version))
1144 (base32 "05jcg33ifngpzw2hdhgb614j87ihhhlqgar0kky183rywg0dxikg"))
1145 (modules '((guix build utils)))
1147 ;; Don't use a custom location for winit-0.20-alpha6.
1148 '(begin (substitute* "Cargo.toml"
1151 (build-system cargo-build-system)
1154 (("rust-clap" ,rust-clap-2)
1155 ("rust-log" ,rust-log-0.4)
1156 ("rust-time" ,rust-time-0.1)
1157 ("rust-env-logger" ,rust-env-logger-0.7)
1158 ("rust-serde" ,rust-serde-1)
1159 ("rust-serde-yaml" ,rust-serde-yaml-0.8)
1160 ("rust-serde-json" ,rust-serde-json-1)
1161 ("rust-glutin" ,rust-glutin-0.22) ; adjust 'patch-glutin-libgl-path as needed
1162 ("rust-notify" ,rust-notify-4)
1163 ("rust-libc" ,rust-libc-0.2)
1164 ("rust-unicode-width" ,rust-unicode-width-0.1)
1165 ("rust-parking-lot" ,rust-parking-lot-0.9)
1166 ("rust-urlocator" ,rust-urlocator-0.1)
1167 ("rust-xdg" ,rust-xdg-2.2)
1168 ("rust-image" ,rust-image-0.22)
1169 ("rust-dirs" ,rust-dirs-2.0)
1170 ("rust-x11-dl" ,rust-x11-dl-2)
1171 ("rust-winapi" ,rust-winapi-0.3)
1172 ("rust-base64" ,rust-base64-0.11)
1173 ("rust-bigflags" ,rust-bitflags-1)
1174 ("rust-fnv" ,rust-fnv-1)
1175 ("rust-mio" ,rust-mio-0.6)
1176 ("rust-mio-extras" ,rust-mio-extras-2)
1177 ("rust-terminfo" ,rust-terminfo-0.6)
1178 ("rust-url" ,rust-url-2.1)
1179 ("rust-vte" ,rust-vte-0.3)
1180 ("rust-nix" ,rust-nix-0.15)
1181 ("rust-miow" ,rust-miow-0.3)
1182 ("rust-mio-anonymous-pipes" ,rust-mio-anonymous-pipes-0.1)
1183 ("rust-mio-named-pipes" ,rust-mio-named-pipes-0.1)
1184 ("rust-signal-hook" ,rust-signal-hook-0.1)
1185 ("rust-clipboard-win" ,rust-clipboard-win-2.1)
1186 ("rust-objc" ,rust-objc-0.2)
1187 ("rust-objc-id" ,rust-objc-id-0.1)
1188 ("rust-objc-foundation" ,rust-objc-foundation-0.1)
1189 ("rust-x11-clipboard" ,rust-x11-clipboard-0.4)
1190 ("rust-smithay-clipboard" ,rust-smithay-clipboard-0.3)
1191 ("rust-wayland-client" ,rust-wayland-client-0.23)
1192 ("rust-euclid" ,rust-euclid-0.20)
1193 ("rust-foreign-types" ,rust-foreign-types-0.5)
1194 ("rust-servo-fontconfig" ,rust-servo-fontconfig-0.4)
1195 ("rust-freetype-rs" ,rust-freetype-rs-0.23)
1196 ("rust-core-foundation" ,rust-core-foundation-0.6)
1197 ("rust-core-foundation-sys" ,rust-core-foundation-sys-0.6)
1198 ("rust-core-text" ,rust-core-text-13)
1199 ("rust-core-graphics" ,rust-core-graphics-0.17)
1200 ("rust-dwrote" ,rust-dwrote-0.9)
1201 ("rust-winpty-sys" ,rust-winpty-sys-0.4))
1202 #:cargo-development-inputs
1203 (("rust-rustc-tools-util" ,rust-rustc-tools-util-0.2)
1204 ("rust-gl-generator" ,rust-gl-generator-0.14)
1205 ("rust-andrew" ,rust-andrew-0.2)
1206 ("rust-smithay-client-toolkit" ,rust-smithay-client-toolkit-0.6)
1207 ("rust-embed-resource" ,rust-embed-resource-1.3)
1208 ("rust-http-req" ,rust-http-req-0.5)
1209 ("rust-zip" ,rust-zip-0.5)
1210 ("rust-tempfile" ,rust-tempfile-3)
1211 ("rust-named-pipe" ,rust-named-pipe-0.4)
1212 ("rust-winapi" ,rust-winapi-0.3))
1214 (modify-phases %standard-phases
1215 (add-after 'configure 'patch-glutin-libgl-path
1216 (lambda* (#:key inputs cargo-inputs vendor-dir #:allow-other-keys)
1217 (let* ((glutin-name ,(package-name rust-glutin-0.22))
1218 (glutin-version ,(package-version rust-glutin-0.22))
1221 glutin-name "-" glutin-version ".tar.gz/src/api/"))
1222 (mesa (assoc-ref inputs "mesa")))
1223 (substitute* (string-append vendor-dir "/" src-api "glx/mod.rs")
1224 (("libGL.so") (string-append mesa "/lib/libGL.so")))
1225 (substitute* (string-append vendor-dir "/" src-api "egl/mod.rs")
1226 (("libEGL.so") (string-append mesa "/lib/libEGL.so")))
1228 (add-after 'configure 'remove-alacritty-vendor
1229 (lambda* (#:key vendor-dir #:allow-other-keys)
1230 ;; We don't want Alacritty to be a dependency of itself
1231 ;; If we don't delete it from guix-vendor then build will fail
1232 ;; because Alacritty has a virtual workspace Cargo.toml.
1233 (delete-file-recursively
1234 (string-append vendor-dir "/alacritty-" ,version ".tar.xz"))
1237 (lambda* (#:key inputs outputs #:allow-other-keys)
1238 (let* ((out (assoc-ref outputs "out"))
1239 (bin (string-append out "/bin"))
1240 (share (string-append out "/share"))
1241 (icons (string-append share "/icons/hicolor/scalable/apps"))
1242 (tic (string-append (assoc-ref inputs "ncurses") "/bin/tic"))
1243 (man (string-append share "/man/man1"))
1244 (alacritty-bin "target/release/alacritty"))
1246 ;; Install and wrap the binary.
1247 (install-file alacritty-bin bin)
1248 (wrap-program (string-append bin "/alacritty")
1249 ;; Both libraries are dlopen()d by cargo dependencies above
1250 ;; when running Alacritty on pure Wayland.
1251 ;; XXX Find out how to patch these at the source.
1252 `("LD_LIBRARY_PATH" ":" prefix
1253 (,(string-append (assoc-ref inputs "libxkbcommon") "/lib:"
1254 (assoc-ref inputs "wayland") "/lib"))))
1256 ;; Install man pages.
1258 (copy-file "extra/alacritty.man"
1259 (string-append man "/alacritty.1"))
1261 ;; Install desktop file.
1262 (install-file "extra/linux/alacritty.desktop"
1263 (string-append share "/applications"))
1267 (copy-file "extra/logo/alacritty-term.svg"
1268 (string-append icons "/Alacritty.svg"))
1270 ;; Install terminfo.
1271 (mkdir-p (string-append share "/terminfo"))
1272 ;; We don't compile alacritty-common entry because
1273 ;; it's being used only for inheritance.
1274 (invoke tic "-x" "-e" "alacritty,alacritty-direct"
1275 "-o" (string-append share "/terminfo/")
1276 "extra/alacritty.info")
1278 ;; Install completions.
1280 "extra/completions/alacritty.bash"
1281 (string-append out "/etc/bash_completion.d"))
1283 "extra/completions/_alacritty"
1284 (string-append share "/zsh/site-functions"))
1286 "extra/completions/alacritty.fish"
1287 (string-append share "/fish/vendor_completions.d"))
1291 ("fontconfig" ,fontconfig)
1292 ("freetype" ,freetype)
1295 ("libxcursor" ,libxcursor)
1297 ("libxkbcommon" ,libxkbcommon)
1298 ("libxrandr" ,libxrandr)
1299 ("libxxf86vm" ,libxxf86vm)
1300 ("wayland" ,wayland)
1304 ("ncurses" ,ncurses)
1305 ("pkg-config" ,pkg-config)
1306 ("python3" ,python)))
1307 (home-page "https://github.com/alacritty/alacritty")
1308 (synopsis "GPU-accelerated terminal emulator")
1310 "Alacritty is a GPU-accelerated terminal emulator with a strong focus on
1311 simplicity and performance. With such a strong focus on performance, included
1312 features are carefully considered and you can always expect Alacritty to be
1313 blazingly fast. By making sane choices for defaults, Alacritty requires no
1314 additional setup. However, it does allow configuration of many aspects of the
1315 terminal. Note that you need support for OpenGL 3.2 or higher.")
1316 (license license:asl2.0)))