1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020, 2021 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–2022 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, 2021 Eric Bavier <bavier@posteo.net>
17 ;;; Copyright © 2019 Julien Lepiller <julien@lepiller.eu>
18 ;;; Copyright © 2019, 2021 Pierre Langlois <pierre.langlois@gmx.com>
19 ;;; Copyright © 2019, 2020 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>
23 ;;; Copyright © 2020, 2021 Marius Bakke <marius@gnu.org>
24 ;;; Copyright © 2020, 2021 Nicolas Goaziou <mail@nicolasgoaziou.fr>
25 ;;; Copyright © 2020 Leo Famulari <leo@famulari.name>
26 ;;; Copyright @ 2020 luhux <luhux@outlook.com>
27 ;;; Copyright © 2021 Ekaitz Zarraga <ekaitz@elenq.tech>
28 ;;; Copyright © 2021, 2022 Raphaël Mélotte <raphael.melotte@mind.be>
29 ;;; Copyright © 2021 ikasero <ahmed@ikasero.com>
30 ;;; Copyright © 2021 Brice Waegeneire <brice@waegenei.re>
31 ;;; Copyright © 2021 Solene Rapenne <solene@perso.pw>
32 ;;; Copyright © 2021 Petr Hodina <phodina@protonmail.com>
33 ;;; Copyright © 2022 Felipe Balbi <balbi@kernel.org>
34 ;;; Copyright © 2022 ( <paren@disroot.org>
36 ;;; This file is part of GNU Guix.
38 ;;; GNU Guix is free software; you can redistribute it and/or modify it
39 ;;; under the terms of the GNU General Public License as published by
40 ;;; the Free Software Foundation; either version 3 of the License, or (at
41 ;;; your option) any later version.
43 ;;; GNU Guix is distributed in the hope that it will be useful, but
44 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
45 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
46 ;;; GNU General Public License for more details.
48 ;;; You should have received a copy of the GNU General Public License
49 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
51 (define-module (gnu packages terminals)
52 #:use-module ((guix licenses) #:prefix license:)
53 #:use-module (guix build-system cargo)
54 #:use-module (guix build-system cmake)
55 #:use-module (guix build-system gnu)
56 #:use-module (guix build-system glib-or-gtk)
57 #:use-module (guix build-system go)
58 #:use-module (guix build-system meson)
59 #:use-module (guix build-system python)
60 #:use-module (guix download)
61 #:use-module (guix git-download)
62 #:use-module (guix gexp)
63 #:use-module (guix packages)
64 #:use-module (guix utils)
65 #:use-module (gnu packages)
66 #:use-module (gnu packages autotools)
67 #:use-module (gnu packages base)
68 #:use-module (gnu packages bash)
69 #:use-module (gnu packages check)
70 #:use-module (gnu packages cmake)
71 #:use-module (gnu packages compression)
72 #:use-module (gnu packages crates-io)
73 #:use-module (gnu packages crates-graphics)
74 #:use-module (gnu packages crypto)
75 #:use-module (gnu packages docbook)
76 #:use-module (gnu packages fontutils)
77 #:use-module (gnu packages freedesktop)
78 #:use-module (gnu packages fribidi)
79 #:use-module (gnu packages gettext)
80 #:use-module (gnu packages ghostscript)
81 #:use-module (gnu packages gl)
82 #:use-module (gnu packages glib)
83 #:use-module (gnu packages gnome)
84 #:use-module (gnu packages golang)
85 #:use-module (gnu packages gtk)
86 #:use-module (gnu packages image)
87 #:use-module (gnu packages libcanberra)
88 #:use-module (gnu packages libevent)
89 #:use-module (gnu packages linux)
90 #:use-module (gnu packages man)
91 #:use-module (gnu packages ncurses)
92 #:use-module (gnu packages perl)
93 #:use-module (gnu packages perl-check)
94 #:use-module (gnu packages pkg-config)
95 #:use-module (gnu packages popt)
96 #:use-module (gnu packages protobuf)
97 #:use-module (gnu packages python)
98 #:use-module (gnu packages python-web)
99 #:use-module (gnu packages python-xyz)
100 #:use-module (gnu packages qt)
101 #:use-module (gnu packages serialization)
102 #:use-module (gnu packages sphinx)
103 #:use-module (gnu packages ssh)
104 #:use-module (gnu packages textutils)
105 #:use-module (gnu packages xdisorg)
106 #:use-module (gnu packages xml)
107 #:use-module (gnu packages xorg)
108 #:use-module (srfi srfi-26))
110 (define-public libptytty
118 (url "https://github.com/yusiwen/libptytty")
119 (commit "b9694ea18e0dbd78213f55233a430325c13ad63e")))
120 (file-name (git-file-name name version))
122 (base32 "1g8by1m6ya4r47p137mw4ddml40js0zh6mdb9n6ib49ayngv8ak3"))))
123 (build-system cmake-build-system)
125 `(#:tests? #f)) ; no test suite
126 (home-page "https://github.com/yusiwen/libptytty")
128 "Portable, secure PTY/TTY and @file{utmp}/@file{wtmp}/@file{lastlog} handling")
130 "Libptytty is a small C/C++ library to manage pseudo-ttys in a uniform way,
131 created out of frustration over the many differences of PTY/TTY handling in
132 different operating systems.
134 In addition to mere PTY/TTY management, it supports updating the session
135 database at @file{utmp}, and @file{wtmp}/@file{lastlog} for login shells.
137 It also supports @code{fork}ing after start-up and dropping privileges in the
138 calling process. This reduces the potential attack surface: if the calling
139 process were to be compromised by the user starting the program, there would be
140 less to gain, as only the helper process is running with privileges (e.g.,
141 @code{setuid}/@code{setgid}).")
142 (license license:gpl2+)))
151 (url "https://github.com/lanoxx/tilda")
152 (commit (string-append "tilda-" version))))
153 (file-name (git-file-name name version))
156 "0q2i9ny8sh7zjzgvkx8vcvk593wcvchjc4xq4nrlqdd377r7cg5q"))))
157 (build-system glib-or-gtk-build-system)
160 (modify-phases %standard-phases
161 (add-after 'unpack 'make-po-writable
163 (for-each make-file-writable (find-files "po" "."))
166 `(("autoconf" ,autoconf)
167 ("automake" ,automake)
168 ("gettext" ,gettext-minimal)
169 ("pkg-config" ,pkg-config)))
171 (list libconfuse vte))
172 (synopsis "GTK+-based drop-down terminal")
173 (description "Tilda is a terminal emulator similar to normal terminals like
174 gnome-terminal (GNOME) or Konsole (KDE), with the difference that it drops down
175 from the edge of a screen when a certain configurable hotkey is pressed. This
176 is similar to the built-in consoles in some applications. Tilda is highly
177 configurable through a graphical wizard.")
178 (home-page "https://github.com/lanoxx/tilda")
179 (license license:gpl2+)))
181 (define-public termite
189 (url (string-append "https://github.com/thestinger/"
191 (commit (string-append "v" version))
193 (file-name (string-append name "-" version "-checkout"))
196 "0hp1x6lj098m3jgna274wv5dv60lnzg22297di68g4hw9djjyd2k"))))
197 (build-system gnu-build-system)
200 (modify-phases %standard-phases
201 (add-after 'unpack 'patch-xdg-open
203 (substitute* "termite.cc"
204 (("xdg-open") (which "xdg-open")))
208 ;; This sets the destination when installing the necessary terminal
209 ;; capability data, which are not provided by 'ncurses'. See
210 ;; <https://lists.gnu.org/archive/html/bug-ncurses/2009-10/msg00031.html>.
211 #:make-flags (list "PREFIX="
212 (string-append "VERSION=v" (version))
213 (string-append "DESTDIR="
214 (assoc-ref %outputs "out")))))
218 ("xdg-utils" ,xdg-utils)
219 ("ncurses" ,ncurses)))
223 ;; FIXME: This should only be located in 'ncurses'. Nonetheless it is
224 ;; provided for usability reasons. See <https://bugs.gnu.org/22138>.
226 (list (search-path-specification
227 (variable "TERMINFO_DIRS")
228 (files '("share/terminfo")))))
229 (home-page "https://github.com/thestinger/termite/")
230 (synopsis "Keyboard-centric, VTE-based terminal")
231 (description "Termite is a minimal terminal emulator. It is no longer
232 maintained as the author considers it obsoleted by Alacritty.
234 It was designed for use with tiling window managers. It is a modal
235 application, similar to Vim, with an insert mode and command mode where
236 keybindings have different functions.")
238 ;; Files under util/ are under the Expat license; the rest is LGPLv2+.
239 (license license:lgpl2.0+)))
241 (define-public asciinema
249 (url "https://github.com/asciinema/asciinema")
250 (commit (string-append "v" version))))
251 (file-name (git-file-name name version))
253 (base32 "1alcz018jrrpasrmgs8nw775a6pf62xq2xgs54c4mb396prdqy4x"))))
254 (build-system python-build-system)
257 (modify-phases %standard-phases
259 (lambda _ (invoke "nosetests" "-v"))))))
263 (home-page "https://asciinema.org")
264 (synopsis "Terminal session recorder")
266 "Use asciinema to record and share your terminal sessions, the right way.
267 Forget screen recording apps and blurry video. Enjoy a lightweight, purely
268 text-based approach to terminal recording.")
269 (license license:gpl3)))
271 (define-public libtsm
272 (let ((commit "f70e37982f382b03c6939dac3d5f814450bda253")
276 (version (git-version "0.0.0" revision commit))
280 ;; The freedesktop repository is no longer maintained.
282 (url (string-append "https://github.com/Aetf/" name))
284 (file-name (git-file-name name version))
286 (base32 "0mwn91i5h5d518i1s05y7hzv6bc13vzcvxszpfh77473iwg4wprx"))
287 (modules '((guix build utils)))
290 ;; Remove a bundled copy of libxkbcommon's xkbcommon-keysyms.h.
291 (delete-file-recursively "external/xkbcommon")
293 (build-system cmake-build-system)
295 `(#:configure-flags '("-DBUILD_TESTING=ON")))
297 (list check libxkbcommon ; for xkbcommon-keysyms.h
299 (synopsis "Xterm state machine library")
300 (description "TSM is a state machine for DEC VT100-VT520 compatible
301 terminal emulators. It tries to support all common standards while keeping
302 compatibility to existing emulators like xterm, gnome-terminal, konsole, etc.")
303 (home-page "https://www.freedesktop.org/wiki/Software/libtsm")
304 ;; Hash table implementation is lgpl2.1+ licensed.
305 ;; The wcwidth implementation in external/wcwidth.{h,c} uses a license
307 ;; UCS-4 to UTF-8 encoding is copied from "terminology" which is released
308 ;; under the bsd 2 license.
309 (license (list license:expat license:lgpl2.1+ license:isc license:bsd-2)))))
311 (define-public kmscon
312 (let ((commit "01dd0a231e2125a40ceba5f59fd945ff29bf2cdc")
316 (version (git-version "0.0.0" revision commit))
319 ;; The freedesktop repository is no longer maintained.
321 (url (string-append "https://github.com/Aetf/" name))
325 "0q62kjsvy2iwy8adfiygx2bfwlh83rphgxbis95ycspqidg9py87"))
327 (search-patches "kmscon-runtime-keymap-switch.patch"))
328 (modules '((guix build utils)))
329 (file-name (git-file-name name version))))
330 (build-system gnu-build-system)
332 `(;; The closure of MESA is huge so we'd rather avoid it.
333 #:disallowed-references (,mesa)
335 #:phases (modify-phases %standard-phases
336 ;; Use elogind instead of systemd.
337 (add-before 'configure 'remove-systemd
339 (substitute* "configure"
340 (("libsystemd-daemon libsystemd-login")
342 (substitute* "src/uterm_systemd.c"
343 (("#include <systemd/sd-login.h>")
344 "#include <elogind/sd-login.h>")
345 ;; We don't have this header.
346 (("#include <systemd/sd-daemon\\.h>")
348 ;; Replace the call to 'sd_booted' by the truth value.
356 libxslt ;to build the man page
357 libxml2 ;for XML_CATALOG_FILES
362 ("libxkbcommon" ,libxkbcommon)
364 ;; MESA can be used for accelerated video output via OpenGLESv2, but
365 ;; it's a big dependency that we'd rather avoid in the installation
370 (synopsis "Linux KMS-based terminal emulator")
371 (description "Kmscon is a terminal emulator based on Linux's @dfn{kernel
372 mode setting} (KMS). It can replace the in-kernel virtual terminal (VT)
373 implementation with a user-space console. Compared to the Linux console,
374 kmscon provides enhanced features including XKB-compatible internationalized
375 keyboard support, UTF-8 input/font support, hardware-accelerated rendering,
376 multi-seat support, a replacement for @command{mingetty}, and more.")
377 (home-page "https://www.freedesktop.org/wiki/Software/kmscon")
378 ;; Hash table implementation is lgpl2.1+ licensed.
379 ;; The wcwidth implementation in external/wcwidth.{h,c} uses a license
381 ;; UCS-4 to UTF-8 encoding is copied from "terminology" which is released
382 ;; under the bsd 2 license.
383 ;; Unifont-Font is from http://unifoundry.com/unifont.html and licensed
384 ;; under the terms of the GNU GPL.
385 (license (list license:expat license:lgpl2.1+ license:bsd-2
387 (supported-systems (filter (cut string-suffix? "-linux" <>)
388 %supported-systems)))))
390 (define-public libtermkey
396 (uri (string-append "http://www.leonerd.org.uk/code/libtermkey/"
397 "libtermkey-" version ".tar.gz"))
399 (base32 "002606rrxh5f6l6jrikl0dyxsknscdamq10av21xm0xa98ybsib9"))))
400 (build-system gnu-build-system)
403 (string-append "CC=" ,(cc-for-target))
404 (string-append "PREFIX=" (assoc-ref %outputs "out")))
406 (modify-phases %standard-phases
407 (delete 'configure) ; no configure script
408 (add-before 'check 'patch-failing-test
409 ;; XXX This undoes an upstream change in version 0.22 which ‘ensures
410 ;; that the hooked function can invent TI strings for new terminal
411 ;; types’. That fails in the build environment. Why?
413 (substitute* "t/40ti-override.c"
414 (("vt750") "vt100")))))
415 #:test-target "test"))
416 (inputs (list ncurses))
417 (native-inputs (list libtool perl-test-harness pkg-config))
418 (synopsis "Keyboard entry processing library for terminal-based programs")
420 "Libtermkey handles all the necessary logic to recognise special keys, UTF-8
421 combining, and so on, with a simple interface.")
422 (home-page "http://www.leonerd.org.uk/code/libtermkey")
423 (license license:expat)))
425 (define-public mlterm
432 (uri (string-append "mirror://sourceforge/mlterm/01release/mlterm-"
433 version "/mlterm-" version ".tar.gz"))
435 (base32 "0br1sdpxw3r7qv814b3qjb8mpigljr9wd5c5422ah76f09zh0h5r"))))
436 (build-system gnu-build-system)
438 `(#:tests? #f ; no tests
440 (list "--disable-static"
441 "--enable-optimize-redrawing"
442 "--with-imagelib=gdk-pixbuf")))
443 (native-inputs (list gettext-minimal pkg-config))
454 (home-page "http://mlterm.sourceforge.net/")
455 (synopsis "Multi-Lingual TERMinal emulator")
457 "mlterm is a multi-lingual terminal emulator. It supports various complex
458 character sets and encodings from around the world. It can display double-width
459 (e.g. East Asian) glyphs, combining characters used for, e.g., Thai and
460 Vietnamese, and bi-directional scripts like Arabic and Hebrew.")
461 (license license:bsd-3)))
470 (url "https://github.com/deadpixi/mtm")
474 (base32 "0gibrvah059z37jvn1qs4b6kvd4ivk2mfihmcpgx1vz6yg70zghv"))
475 (file-name (git-file-name name version))))
476 (build-system gnu-build-system)
478 `(#:tests? #f ; no tests
480 (list (string-append "CC=" ,(cc-for-target))
481 (string-append "DESTDIR=" (assoc-ref %outputs "out")))
483 (modify-phases %standard-phases
484 (delete 'configure) ;no configure script
485 (add-before 'build 'fix-headers
487 (substitute* "config.def.h"
488 (("ncursesw/curses.h") "curses.h"))))
490 (lambda* (#:key inputs outputs #:allow-other-keys)
491 (let* ((out (assoc-ref outputs "out")))
493 (mkdir-p (string-append out "bin/"))
494 (install-file "mtm" (string-append out "/bin"))
496 (mkdir-p (string-append out "share/man/man1"))
497 (install-file "mtm.1" (string-append out "/share/man/man1"))
499 (mkdir-p (string-append out "share/terminfo"))
500 (invoke (string-append (assoc-ref inputs "ncurses") "/bin/tic")
503 out "/share/terminfo")
507 ;; FIXME: This should only be located in 'ncurses'. Nonetheless it is
508 ;; provided for usability reasons. See <https://bugs.gnu.org/22138>.
510 (list (search-path-specification
511 (variable "TERMINFO_DIRS")
512 (files '("share/terminfo")))))
513 (home-page "https://github.com/deadpixi/mtm")
514 (synopsis "Micro Terminal Multiplexer")
516 "This package provides multiplexer for the terminal focused on simplicity,
517 compatibility, size and stability.")
518 (license (list license:gpl3+
519 license:bsd-3)))) ;vtparser.c
521 (define-public picocom
528 (url "https://github.com/npat-efault/picocom")
530 (file-name (git-file-name name version))
533 "1vvjydqf0ax47nvdyyl67jafw5b3sfsav00xid6qpgia1gs2r72n"))))
534 (build-system gnu-build-system)
536 `(#:make-flags (list (string-append "CC=" ,(cc-for-target)))
537 #:tests? #f ; no tests
539 (modify-phases %standard-phases
540 (delete 'configure) ; no configure script
542 ;; The Makefile lacks an ‘install’ target.
543 (lambda* (#:key outputs #:allow-other-keys)
544 (let* ((out (assoc-ref outputs "out"))
545 (bin (string-append out "/bin"))
546 (man (string-append out "/share/man/man1")))
547 (install-file "picocom" bin)
548 (install-file "picocom.1" man)))))))
549 (home-page "https://github.com/npat-efault/picocom")
550 (synopsis "Minimal dumb-terminal emulator")
552 "Picocom is a minimal dumb-terminal emulation program. It was designed to
553 serve as a simple and manual modem configuration, testing, and debugging tool.
554 It also serves well as a low-tech serial communications program to allow access
555 to all types of devices that provide serial consoles.")
556 (license license:gpl2+)))
566 ;; The original beep 1.3 at <http://www.johnath.com/beep> has been
567 ;; unmaintained for some time, and vulnerable to at least two CVEs:
568 ;; https://github.com/johnath/beep/issues/11#issuecomment-454056858
569 ;; Use this maintained fork instead.
570 (url "https://github.com/spkr-beep/beep")
571 (commit (string-append "v" version))))
572 (file-name (git-file-name name version))
574 (base32 "0dgrb5yg4ys1fa4hs95iz3m2yhryfzzw0j6g6yf6vhbys4ihcf40"))))
575 (build-system gnu-build-system)
578 #~(list (string-append "CC=" #$(cc-for-target))
579 (string-append "prefix=" #$output))
581 #~(modify-phases %standard-phases
582 (delete 'configure) ; no configure script
583 (add-before 'check 'patch-tests
585 (substitute* "GNUmakefile"
588 ;; XXX In the build environment, $(PWD) is the *parent* directory
589 ;; /tmp/guix-build-beep-x.y.drv-0! A pure guix shell works fine.
590 (("\\$\\(PWD\\)" pwd)
591 (string-append pwd "/source")))
592 (substitute* (find-files "tests" "\\.expected")
593 ;; The build environment lacks /dev/{console,tty*}.
594 ;; In fact, even nckx's regular Guix System lacks ttyS1…
595 ((": Permission denied")
596 ": No such file or directory")))))))
597 (synopsis "Linux command-line utility to control the PC speaker")
598 (description "beep allows the user to control the PC speaker with precision,
599 allowing different sounds to indicate different events. While it can be run
600 quite happily on the command line, its intended place of residence is within
601 scripts, notifying the user when something interesting occurs. Of course, it
602 has no notion of what's interesting, but it's very good at that notifying part.")
603 (home-page "https://github.com/spkr-beep/beep")
604 (license license:gpl2+)))
606 (define-public unibilium
614 (url "https://github.com/mauke/unibilium")
615 (commit (string-append "v" version))))
616 (file-name (git-file-name name version))
619 "1wa9a32wzqnxqh1jh554afj13dzjr6mw2wzqzw8d08nza9pg2ra2"))))
620 (build-system gnu-build-system)
624 (string-append "PREFIX=" (assoc-ref %outputs "out")))
626 ;; FIXME: tests require "prove"
629 (modify-phases %standard-phases
630 (delete 'configure))))
633 (home-page "https://github.com/mauke/unibilium")
634 (synopsis "Terminfo parsing library")
635 (description "Unibilium is a basic C terminfo library. It doesn't depend
636 on curses or any other library. It also doesn't use global variables, so it
637 should be thread-safe.")
638 (license license:lgpl3+)))
640 (define-public libvterm
647 (uri (string-append "http://www.leonerd.org.uk/code/libvterm/"
648 "libvterm-" version ".tar.gz"))
651 "0n1k923ii618ffkbifi8a89ag8c6m9l49z8dj01dyay551k0vsv1"))))
652 (build-system gnu-build-system)
656 (string-append "PREFIX=" (assoc-ref %outputs "out")))
659 (modify-phases %standard-phases
660 (delete 'configure))))
663 (home-page "http://www.leonerd.org.uk/code/libvterm/")
664 (synopsis "VT220/xterm/ECMA-48 terminal emulator library")
665 (description "Libvterm is an abstract C99 library which implements a VT220
666 or xterm-like terminal emulator. It doesn't use any particular graphics
667 toolkit or output system, instead it invokes callback function pointers that
668 its embedding program should provide it to draw on its behalf. It avoids
669 calling @code{malloc} during normal running state, allowing it to be used in
670 embedded kernel situations.")
671 (license license:expat)))
673 (define-public cool-retro-term
675 (name "cool-retro-term")
679 (file-name (string-append name "-" version "-checkout"))
681 (url (string-append "https://github.com/Swordfish90/" name))
685 (base32 "02mj70gcpx9fvrhsy6iqwp399dya9iyakx940b6ws952d23xn337"))
686 (modules '((guix build utils)
691 (patches (search-patches "cool-retro-term-wctype.patch"))
693 '(let* ((fonts '(;"1971-ibm-3278" ; BSD 3-clause
694 "1977-apple2" ; Non-Free
695 "1977-commodore-pet" ; Non-Free
696 "1979-atari-400-800" ; Non-Free
697 ;"1981-ibm-pc ; CC-SA 4.0
698 "1982-commodore64")) ; Non-Free
699 ;"1985-ibm-pc-vga" ; CC-SA 4.0
700 ;"modern-fixedsys-excelsior" ; Redistributable
701 ;"modern-hermit" ; SIL
702 ;"modern-inconsolata"; SIL
703 ;"modern-pro-font-win-tweaked" ; X11
704 ;"modern-proggy-tiny"; X11
705 ;"modern-terminus" ; SIL
706 (name-rx (make-regexp " *name: *\"([^\"]*)\""))
707 (source-rx (make-regexp " *source: \"fonts/([^/]*)[^\"]*\""))
708 (fontname-rx (make-regexp "\"fontName\":\"([^\"]*).*"))
710 ;; Gather font names from all Fonts*.qml files.
711 ;; These will be used to remove items from the
714 (lambda (font-file names)
715 (call-with-input-file font-file
717 (let loop ((name #f) (names names))
718 (let ((line (read-line port)))
720 ((eof-object? line) (pk 'names names))
721 ((regexp-exec name-rx line)
723 (loop (match:substring m 1) names)))
724 ((regexp-exec source-rx line)
726 (let ((font (match:substring m 1)))
727 (if (member font fonts)
728 (loop #f (lset-adjoin string=?
731 (else (loop name names))))))))
732 '() (find-files "app/qml" "Font.*\\.qml"))))
733 ;; Remove the font files themselves
734 (for-each (lambda (font)
735 (delete-file-recursively
736 (string-append "app/qml/fonts/" font)))
738 ;; Remove mention of those fonts in the source
739 (substitute* "app/qml/resources.qrc"
740 (((string-append " *<file>fonts/("
741 (string-join fonts "|")
746 (let ((start-rx (make-regexp " *ListElement *\\{"))
747 (end-rx (make-regexp " *\\}")))
748 (with-atomic-file-replacement file
750 (let loop ((line-buffer '())
753 (let ((line (read-line in 'concat)))
755 ((eof-object? line) #t) ;done
756 ((regexp-exec start-rx line)
757 (loop (cons line line-buffer) #t #f))
758 ((or (regexp-exec source-rx line)
759 (regexp-exec fontname-rx line))
761 (let ((font-or-name (match:substring m 1)))
762 (if (or (member font-or-name fonts)
763 (member font-or-name names))
765 (loop (cons line line-buffer)
767 ((regexp-exec end-rx line)
769 (for-each (cut display <> out)
770 (reverse line-buffer))
773 (hold? (loop (cons line line-buffer)
775 (discard? (loop line-buffer #f #t))
776 (else (display line out)
777 (loop '() #f #f)))))))))
778 '("app/qml/FontPixels.qml"
779 "app/qml/FontScanlines.qml"
781 "app/qml/ApplicationSettings.qml"))
782 ;; Final substitution for default scanline and pixel fonts
783 (substitute* "app/qml/ApplicationSettings.qml"
784 (("COMMODORE_PET") "PROGGY_TINY"))))))
785 (build-system gnu-build-system)
787 (list qtbase-5 qtdeclarative-5 qtgraphicaleffects
788 qtquickcontrols-5 qtquickcontrols2-5 bash-minimal))
791 (modify-phases %standard-phases
793 (lambda* (#:key outputs #:allow-other-keys)
794 (let ((out (assoc-ref outputs "out")))
795 (substitute* '("qmltermwidget/qmltermwidget.pro")
796 (("INSTALL_DIR = \\$\\$\\[QT_INSTALL_QML\\]")
797 (string-append "INSTALL_DIR = " out "/lib/qt5/qml")))
798 (substitute* '("cool-retro-term.pro" "app/app.pro")
801 (add-after 'install 'wrap-executable
802 (lambda* (#:key inputs outputs #:allow-other-keys)
803 (let ((out (assoc-ref outputs "out"))
804 (qml "/lib/qt5/qml"))
805 (wrap-program (string-append out "/bin/cool-retro-term")
806 `("QML2_IMPORT_PATH" ":" prefix
807 (,(string-append out qml)
809 (string-append (assoc-ref inputs i) qml))
813 "qtquickcontrols2"))))))))
814 (add-after 'install 'add-alternate-name
815 (lambda* (#:key outputs #:allow-other-keys)
816 (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
817 (symlink (string-append bin "/cool-retro-term")
818 (string-append bin "/crt")))))
819 (add-after 'install 'install-man
820 (lambda* (#:key outputs #:allow-other-keys)
821 (let ((mandir (string-append (assoc-ref outputs "out")
823 (install-file "packaging/debian/cool-retro-term.1" mandir)))))))
824 (synopsis "Terminal emulator")
826 "Cool-retro-term (crt) is a terminal emulator which mimics the look and
827 feel of the old cathode ray tube (CRT) screens. It has been designed to be
828 eye-candy, customizable, and reasonably lightweight.")
829 (home-page "https://github.com/Swordfish90/cool-retro-term")
831 license:gpl2+ ; qmltermwidget
832 license:gpl3+ ; cool-retro-term
842 (home-page "https://codeberg.org/dnkl/foot")
845 (uri (git-reference (url home-page) (commit version)))
846 (file-name (git-file-name name version))
849 "0k0zbh6adwr99y9aazlyvp6s1k8zaq2j6x8kqb8q9a5qjjg56lay"))))
850 (build-system meson-build-system)
852 `(;; Using a "release" build is recommended both for performance, and
853 ;; also to address a GCC 10 issue when doing PGO builds.
854 #:build-type "release"
855 ;; Enable LTO as recommended by INSTALL.md.
856 #:configure-flags '("-Db_lto=true")))
858 (list ncurses ;for 'tic'
859 pkg-config scdoc wayland-protocols))
861 (list fcft libxkbcommon wayland))
862 (synopsis "Wayland-native terminal emulator")
864 "@command{foot} is a terminal emulator for systems using the Wayland
865 display server. It is designed to be fast, lightweight, and independent of
866 desktop environments. It can be used as a standalone terminal and also has
867 a server/client mode.")
868 (license license:expat)))
870 (define-public sakura
876 (uri (string-append "https://launchpad.net/sakura/trunk/"
877 version "/+download/sakura-" version
881 "1d8n32xnj21q2xx13xs2r9cfjaq31mxiyhx6d57x9cwnhwb11xn3"))))
882 (build-system cmake-build-system)
884 '(#:tests? #f)) ; no check phase
886 `(("gettext" ,gettext-minimal)
887 ("perl" ,perl) ; for pod2man
888 ("pkg-config" ,pkg-config)))
891 (home-page "https://launchpad.net/sakura")
892 (synopsis "Simple but powerful libvte-based terminal emulator")
893 (description "@code{Sakura} is a terminal emulator based on GTK+ and VTE.
894 It's a terminal emulator with few dependencies, so you don't need a full GNOME
895 desktop installed to have a decent terminal emulator.")
896 (license license:gpl2)))
898 (define-public go-github.com-nsf-termbox-go
899 (let ((commit "288510b9734e30e7966ec2f22b87c5f8e67345e3")
902 (name "go-github.com-nsf-termbox-go")
903 (version (git-version "0.0.0" revision commit))
907 (url "https://github.com/nsf/termbox-go")
909 (file-name (git-file-name name version))
912 "0hdyisfaf8yb55h3p03p4sbq19546mp9fy28f2kn659mycmhxqk4"))))
913 (build-system go-build-system)
915 '(#:import-path "github.com/nsf/termbox-go"))
917 (list go-github.com-mattn-go-runewidth))
918 (synopsis "@code{termbox} provides a minimal API for text-based user
921 "Termbox is a library that provides a minimalistic API which allows the
922 programmer to write text-based user interfaces.")
923 (home-page "https://github.com/nsf/termbox-go")
924 (license license:expat))))
926 (define-public go-github-com-junegunn-fzf
928 (name "go-github-com-junegunn-fzf")
934 (url "https://github.com/junegunn/fzf")
936 (file-name (git-file-name name version))
939 "1j5bfxl4w8w3n89p051y8dhxg0py9l98v7r2gkr63bg4lj32faz8"))))
940 (build-system go-build-system)
942 `(#:import-path "github.com/junegunn/fzf"))
944 (list go-github.com-mattn-go-runewidth
945 go-github-com-mattn-go-shellwords
946 go-github-com-mattn-go-isatty
947 go-github-com-gdamore-tcell
948 go-github-com-saracen-walker
949 go-golang.org-x-sync-errgroup
950 go-golang-org-x-crypto))
951 (home-page "https://github.com/junegunn/fzf")
952 (synopsis "Command-line fuzzy-finder")
953 (description "This package provides an interactive command-line filter
954 usable with any list--including files, command history, processes and more.")
955 (license license:expat)))
959 (inherit go-github-com-junegunn-fzf)
962 (ensure-keyword-arguments
963 (package-arguments go-github-com-junegunn-fzf)
964 `(#:install-source? #f
966 (modify-phases %standard-phases
967 (add-after 'install 'copy-binaries
968 (lambda* (#:key outputs #:allow-other-keys)
969 (let ((out (assoc-ref outputs "out")))
970 (with-directory-excursion "src/github.com/junegunn/fzf"
971 (install-file "bin/fzf-tmux"
972 (string-append out "/bin"))))))
973 (add-after 'copy-binaries 'wrap-programs
974 (lambda* (#:key outputs inputs #:allow-other-keys)
975 (let* ((out (assoc-ref outputs "out"))
976 (bin (string-append out "/bin"))
977 (findutils (assoc-ref inputs "findutils"))
978 (ncurses (assoc-ref inputs "ncurses")))
979 (wrap-program (string-append bin "/fzf")
980 `("PATH" ":" prefix (,(string-append findutils "/bin"))))
981 (wrap-program (string-append bin "/fzf-tmux")
982 `("PATH" ":" prefix (,(string-append ncurses "/bin")))))))
983 (add-after 'install 'install-completions
984 (lambda* (#:key outputs #:allow-other-keys)
985 (let* ((out (assoc-ref outputs "out"))
986 (bash-completion (string-append out "/etc/bash_completion.d"))
988 (string-append out "/share/fish/vendor_functions.d"))
989 (zsh-completion (string-append out "/share/zsh/site-functions")))
990 (with-directory-excursion "src/github.com/junegunn/fzf"
991 (mkdir-p bash-completion)
992 (copy-file "shell/completion.bash"
993 (string-append bash-completion "/fzf"))
994 (mkdir-p fish-functions)
995 (copy-file "shell/key-bindings.fish"
996 (string-append fish-functions "/fzf_key_bindings.fish"))
997 (mkdir-p zsh-completion)
998 (copy-file "shell/completion.zsh"
999 (string-append zsh-completion "/_fzf"))))))))))
1001 `(,@(package-inputs go-github-com-junegunn-fzf)
1002 ("findutils" ,findutils)
1003 ("ncurses" ,ncurses)))))
1005 (define-public go-github.com-howeyc-gopass
1006 (let ((commit "bf9dde6d0d2c004a008c27aaee91170c786f6db8")
1009 (name "go-github.com-howeyc-gopass")
1010 (version (git-version "0.0.0" revision commit))
1014 (url "https://github.com/howeyc/gopass")
1016 (file-name (git-file-name name version))
1019 "1jxzyfnqi0h1fzlsvlkn10bncic803bfhslyijcxk55mgh297g45"))))
1020 (build-system go-build-system)
1022 '(#:import-path "github.com/howeyc/gopass"))
1024 (list go-golang-org-x-crypto))
1025 (synopsis "Retrieve password from a terminal or piped input in Go")
1027 "@code{gopass} is a Go package for retrieving a password from user
1028 terminal or piped input.")
1029 (home-page "https://github.com/howeyc/gopass")
1030 (license license:isc))))
1032 (define-public python-pyte
1034 (name "python-pyte")
1039 (uri (pypi-uri "pyte" version))
1042 "1an54hvyjm8gncx8cgabz9mkpgjkdb0bkyjlkh7g7f94nr3wnfl7"))))
1043 (build-system python-build-system)
1046 (modify-phases %standard-phases
1047 (add-after 'unpack 'remove-failing-test
1048 ;; TODO: Reenable when the `captured` files required by this test
1049 ;; are included in the archive.
1051 (delete-file "tests/test_input_output.py")
1054 (list python-wcwidth))
1056 (list python-pytest-runner python-pytest))
1057 (home-page "https://pyte.readthedocs.io/")
1058 (synopsis "Simple VTXXX-compatible terminal emulator")
1059 (description "@code{pyte} is an in-memory VTxxx-compatible terminal
1060 emulator. @var{VTxxx} stands for a series of video terminals, developed by
1061 DEC between 1970 and 1995. The first and probably most famous one was the
1062 VT100 terminal, which is now a de-facto standard for all virtual terminal
1065 pyte is a fork of vt102, which was an incomplete pure Python implementation
1066 of VT100 terminal.")
1067 (license license:lgpl3+)))
1069 (define-public python-blessings
1071 (name "python-blessings")
1076 (uri (pypi-uri "blessings" version))
1079 "0z8mgkbmisxs10rz88qg46l1c9a8n08k8cy2iassal2zh16qbrcq"))))
1080 (build-system python-build-system)
1082 ;; FIXME: Test suite is unable to detect TTY conditions.
1085 (list python-nose python-six))
1086 (home-page "https://github.com/erikrose/blessings")
1087 (synopsis "Python module to manage terminal color, styling, and
1089 (description "Blessings is a pythonic API to manipulate terminal color,
1090 styling, and positioning. It provides similar features to curses but avoids
1091 some of curses’s limitations: it does not require clearing the whole screen
1092 for little changes, provides a scroll-back buffer after the program exits, and
1093 avoids styling altogether when the output is redirected to something other
1095 (license license:expat)))
1097 (define-public python-curtsies
1099 (name "python-curtsies")
1104 (uri (pypi-uri "curtsies" version))
1106 (base32 "1zj284kacv0d10ab3amkkx37hcciylkqympsksi9bwzy6g7fyafb"))))
1107 (build-system python-build-system)
1110 (modify-phases %standard-phases
1113 (invoke "nosetests" "-v"))))))
1115 (list python-blessed python-cwcwidth))
1117 (list python-pyte python-nose))
1118 (home-page "https://github.com/bpython/curtsies")
1119 (synopsis "Library for curses-like terminal interaction with colored
1121 (description "Curtsies is a Python library for interacting with the
1122 terminal. It features string-like objects which carry formatting information,
1123 per-line fullscreen terminal rendering, and keyboard input event reporting.")
1124 (license license:expat)))
1126 (define-public tmate
1134 (url "https://github.com/tmate-io/tmate")
1136 (file-name (git-file-name name version))
1139 "0x5c31yq7ansmiy20a0qf59wagba9v3pq97mlkxrqxn4n1gcc6vi"))))
1140 (build-system gnu-build-system)
1142 (list libevent libssh msgpack ncurses))
1144 (list autoconf automake pkg-config))
1145 (home-page "https://tmate.io/")
1146 (synopsis "Terminal sharing application")
1147 (description "tmate is a terminal sharing application that allows you to
1148 share your terminal with other users over the Internet. tmate is a fork of
1150 (license license:isc)))
1152 (define-public kitty
1156 (home-page "https://sw.kovidgoyal.net/kitty/")
1161 (url "https://github.com/kovidgoyal/kitty")
1162 (commit (string-append "v" version))))
1163 (file-name (git-file-name name version))
1165 (base32 "13qv4469q9q2xdrb77lbyw4dz491zf1qvqx4adp0dd9annnlir5c"))
1166 (modules '((guix build utils)))
1169 ;; patch needed as sphinx-build is used as a python script
1170 ;; whereas the guix package uses a bash script launching the
1172 (substitute* "docs/conf.py"
1173 (("(from kitty.constants import str_version)" kitty-imp)
1174 (string-append "sys.path.append(\"..\")\n" kitty-imp)))
1175 (substitute* "docs/Makefile"
1176 (("^SPHINXBUILD[[:space:]]+= (python3.*)$")
1177 "SPHINXBUILD = sphinx-build\n"))
1179 (build-system gnu-build-system)
1182 ("libgl1-mesa" ,mesa)
1183 ("libxcursor" ,libxcursor)
1185 ("libxinerama" ,libxinerama)
1186 ("libxkbcommon" ,libxkbcommon)
1187 ("libxrandr" ,libxrandr)
1188 ("ncurses" ,ncurses) ;; for tic command
1189 ("pkg-config" ,pkg-config)
1190 ("sphinx" ,python-sphinx)
1191 ("wayland-protocols" ,wayland-protocols)))
1193 `(("fontconfig" ,fontconfig)
1194 ("freetype" ,freetype)
1195 ("harfbuzz" ,harfbuzz)
1197 ("libcanberra" ,libcanberra)
1199 ("pygments" ,python-pygments)
1200 ("python" ,python-wrapper)
1201 ("wayland" ,wayland)
1204 '(#:phases (modify-phases %standard-phases
1205 (delete 'configure) ;no configure script
1207 (lambda* (#:key inputs #:allow-other-keys)
1208 ;; The "kitty" sub-directory must be writable prior to
1209 ;; configuration (e.g., un-setting updates).
1210 (for-each make-file-writable (find-files "kitty"))
1212 (invoke "python3" "setup.py" "linux-package"
1213 ;; Do not phone home.
1214 "--update-check-interval=0"
1215 ;; Wayland backend requires EGL, which isn't
1216 ;; found out-of-the-box for some reason.
1217 (string-append "--egl-library="
1218 (assoc-ref inputs "libgl1-mesa")
1219 "/lib/libEGL.so.1"))))
1222 ;; Fix "cannot find kitty executable" error when running
1224 (setenv "PATH" (string-append "linux-package/bin:"
1226 (invoke "python3" "test.py")))
1227 (add-before 'install 'rm-pycache
1228 ;; created python cache __pycache__ are non deterministic
1230 (let ((pycaches (find-files "linux-package/"
1232 #:directories? #t)))
1233 (for-each delete-file-recursively pycaches)
1237 (let* ((out (assoc-ref %outputs "out"))
1238 (obin (string-append out "/bin"))
1239 (olib (string-append out "/lib"))
1240 (oshare (string-append out "/share")))
1241 (copy-recursively "linux-package/bin" obin)
1242 (copy-recursively "linux-package/share" oshare)
1243 (copy-recursively "linux-package/lib" olib)
1245 (synopsis "Fast, featureful, GPU based terminal emulator")
1246 (description "Kitty is a fast and featureful GPU-based terminal emulator:
1248 @item Offloads rendering to the GPU for lower system load and buttery smooth
1249 scrolling. Uses threaded rendering to minimize input latency.
1250 @item Supports all modern terminal features: graphics (images), unicode,
1251 true-color, OpenType ligatures, mouse protocol, focus tracking, bracketed
1252 paste and several new terminal protocol extensions.
1253 @item Supports tiling multiple terminal windows side by side in different
1254 layouts without needing to use an extra program like tmux.
1255 @item Can be controlled from scripts or the shell prompt, even over SSH.
1256 @item Has a framework for Kittens, small terminal programs that can be used to
1257 extend kitty's functionality. For example, they are used for Unicode input,
1258 hints, and side-by-side diff.
1259 @item Supports startup sessions which allow you to specify the window/tab
1260 layout, working directories and programs to run on startup.
1261 @item Allows you to open the scrollback buffer in a separate window using
1262 arbitrary programs of your choice. This is useful for browsing the history
1263 comfortably in a pager or editor.
1265 (license license:gpl3+)))
1267 (define-public eternalterminal
1269 (name "eternalterminal")
1275 (url "https://github.com/MisterTea/EternalTerminal")
1276 (commit (string-append "et-v" version))))
1277 (file-name (git-file-name name version))
1279 (base32 "0sb1hypg2276y8c2a5vivrkcxp70swddvhnd9h273if3kv6j879r"))))
1280 (build-system cmake-build-system)
1282 '(#:configure-flags '("-DBUILD_TEST=ON")
1284 (modify-phases %standard-phases
1285 (add-after 'unpack 'insert-googletests
1286 (lambda* (#:key inputs #:allow-other-keys)
1287 (let ((tests (assoc-ref inputs "googletest")))
1288 (copy-recursively tests "external/googletest"))
1291 (list gflags libsodium protobuf))
1293 `(("googletest" ,(package-source googletest))))
1294 (home-page "https://mistertea.github.io/EternalTerminal/")
1295 (synopsis "Remote shell that reconnects without interrupting the session")
1296 (description "@dfn{Eternal Terminal} (ET) is a remote shell that
1297 automatically reconnects without interrupting the session. ET uses SSH to
1298 initialize a secure connection. Unlike SSH sessions, which must be killed and
1299 reconnected after a network outage an ET session will survive network outages
1300 and IP roaming. ET provides the same core functionality as @command{mosh},
1301 while also supporting native scrolling and @command{tmux} control mode
1302 (@code{tmux -CC}).")
1303 (license license:asl2.0)))
1305 (define-public wterm
1306 (deprecated-package "wterm" foot))
1316 "https://github.com/tio/tio/releases/download/v"
1317 version "/tio-" version ".tar.xz"))
1319 (base32 "0z27ghxjiw7y587l49jsb0anylm08m7imqjiwr21k1frxvydswsa"))))
1320 (build-system meson-build-system)
1321 (native-inputs (list pkg-config))
1322 (inputs (list libinih))
1323 (home-page "https://tio.github.io/")
1324 (synopsis "Simple TTY terminal I/O application")
1325 (description "tio is a simple TTY terminal application which features a
1326 straightforward commandline interface to easily connect to TTY devices for
1327 basic input/output.")
1328 (license license:gpl2+)))
1330 (define-public alacritty
1336 ;; XXX: The crate at "crates.io" has limited contents. In particular,
1337 ;; it does not contain "extra" directory with completions, icon, etc.
1340 (url "https://github.com/jwilm/alacritty")
1341 (commit (string-append "v" version))))
1342 (file-name (git-file-name name version))
1344 (base32 "068y0b1a0m33r7a3j2xf6k602sc8062gm4d5568ynfx6w5n481lj"))))
1345 (build-system cargo-build-system)
1347 `(#:install-source? #f ; virtual manifest
1348 #:cargo-test-flags '("--release" "--" "--skip=config_read_eof")
1350 (("rust-alacritty-config-derive" ,rust-alacritty-config-derive-0.1)
1351 ("rust-alacritty-terminal" ,rust-alacritty-terminal-0.15)
1352 ("rust-clap" ,rust-clap-2)
1353 ("rust-cocoa" ,rust-cocoa-0.24)
1354 ("rust-copypasta" ,rust-copypasta-0.7)
1355 ("rust-crossfont" ,rust-crossfont-0.3)
1356 ("rust-embed-resource" ,rust-embed-resource-1)
1357 ("rust-fnv" ,rust-fnv-1)
1358 ("rust-gl-generator" ,rust-gl-generator-0.14)
1359 ;; XXX: Adjust `add-absolute-library-references' phase when updating
1361 ("rust-glutin" ,rust-glutin-0.26)
1362 ("rust-log" ,rust-log-0.4)
1363 ("rust-notify" ,rust-notify-4)
1364 ("rust-objc" ,rust-objc-0.2)
1365 ("rust-parking-lot" ,rust-parking-lot-0.11)
1366 ("rust-png" ,rust-png-0.16)
1367 ("rust-raw-window-handle" ,rust-raw-window-handle-0.3)
1368 ("rust-serde" ,rust-serde-1)
1369 ("rust-serde-json" ,rust-serde-json-1)
1370 ("rust-serde-yaml" ,rust-serde-yaml-0.8)
1371 ("rust-time" ,rust-time-0.1)
1372 ("rust-urlocator" ,rust-urlocator-0.1)
1373 ("rust-x11-dl" ,rust-x11-dl-2)
1374 ("rust-xdg" ,rust-xdg-2))
1376 (modify-phases %standard-phases
1377 (add-after 'unpack 'use-new-nix
1378 (lambda* (#:key inputs outputs #:allow-other-keys)
1379 (substitute* "alacritty_terminal/Cargo.toml"
1380 (("0.22.0") "^0.23.0"))))
1381 (add-after 'configure 'add-absolute-library-references
1382 (lambda* (#:key inputs cargo-inputs vendor-dir #:allow-other-keys)
1383 (let* ((glutin-name ,(package-name rust-glutin-0.26))
1384 (glutin-version ,(package-version rust-glutin-0.26))
1385 (glutin-api (string-append glutin-name "-" glutin-version
1386 ".tar.gz/src/api/"))
1387 (smithay-client-toolkit-name
1388 ,(package-name rust-smithay-client-toolkit-0.12))
1389 (smithay-client-toolkit-version
1390 ,(package-version rust-smithay-client-toolkit-0.12))
1391 (smithay-client-toolkit-src
1392 (string-append smithay-client-toolkit-name "-"
1393 smithay-client-toolkit-version ".tar.gz/src"))
1394 (libxkbcommon (assoc-ref inputs "libxkbcommon"))
1395 (mesa (assoc-ref inputs "mesa")))
1396 ;; Fix dlopen()ing some libraries on pure Wayland (no $DISPLAY):
1397 ;; Failed to initialize any backend! Wayland status: NoWaylandLib
1398 ;; XXX We patch transitive dependencies that aren't even direct
1399 ;; inputs to this package, because of the way Guix's Rust build
1400 ;; system currently works. <http://issues.guix.gnu.org/46399>
1401 ;; might fix this and allow patching them directly.
1402 (substitute* (string-append vendor-dir "/"
1403 smithay-client-toolkit-src
1404 "/seat/keyboard/ffi.rs")
1405 (("libxkbcommon\\.so")
1406 (string-append libxkbcommon "/lib/libxkbcommon.so")))
1408 ;; Mesa is needed everywhere.
1410 (string-append vendor-dir "/" glutin-api "glx/mod.rs")
1411 (("libGL.so") (string-append mesa "/lib/libGL.so")))
1413 (string-append vendor-dir "/" glutin-api "egl/mod.rs")
1414 (("libEGL.so") (string-append mesa "/lib/libEGL.so")))
1417 ;; Upstream install script only takes care of executable.
1418 (lambda* (#:key inputs outputs #:allow-other-keys)
1419 (let* ((out (assoc-ref outputs "out"))
1420 (bin (string-append out "/bin"))
1421 (share (string-append out "/share"))
1422 (icons (string-append share "/icons/hicolor/scalable/apps"))
1423 (tic (search-input-file inputs "/bin/tic"))
1424 (man (string-append share "/man/man1"))
1425 (alacritty-bin "target/release/alacritty"))
1426 ;; Install the executable.
1427 (install-file alacritty-bin bin)
1428 ;; Install man pages.
1430 (copy-file "extra/alacritty.man"
1431 (string-append man "/alacritty.1"))
1432 ;; Install desktop file.
1433 (install-file "extra/linux/Alacritty.desktop"
1434 (string-append share "/applications"))
1437 (copy-file "extra/logo/alacritty-term.svg"
1438 (string-append icons "/Alacritty.svg"))
1439 ;; Install terminfo.
1440 (mkdir-p (string-append share "/terminfo"))
1441 ;; We don't compile alacritty-common entry because
1442 ;; it's being used only for inheritance.
1443 (invoke tic "-x" "-e" "alacritty,alacritty-direct"
1444 "-o" (string-append share "/terminfo/")
1445 "extra/alacritty.info")
1446 ;; Install completions.
1447 (install-file "extra/completions/alacritty.bash"
1448 (string-append out "/etc/bash_completion.d"))
1449 (install-file "extra/completions/_alacritty"
1450 (string-append share "/zsh/site-functions"))
1451 (install-file "extra/completions/alacritty.fish"
1452 (string-append share "/fish/vendor_completions.d"))
1456 ("ncurses" ,ncurses)
1457 ("pkg-config" ,pkg-config)
1458 ("python3" ,python)))
1461 ("fontconfig" ,fontconfig)
1462 ("freetype" ,freetype)
1465 ("libxcursor" ,libxcursor)
1467 ("libxkbcommon" ,libxkbcommon)
1468 ("libxrandr" ,libxrandr)
1469 ("libxxf86vm" ,libxxf86vm)
1471 ("rust-bitflags" ,rust-bitflags-1)
1472 ("rust-dirs" ,rust-dirs-3)
1473 ("rust-libc" ,rust-libc-0.2)
1474 ("rust-unicode-width" ,rust-unicode-width-0.1)
1475 ("rust-wayland-client" ,rust-wayland-client-0.28)
1476 ("rust-winapi" ,rust-winapi-0.3)
1477 ("wayland" ,wayland)))
1478 (native-search-paths
1479 ;; FIXME: This should only be located in 'ncurses'. Nonetheless it is
1480 ;; provided for usability reasons. See <https://bugs.gnu.org/22138>.
1481 (list (search-path-specification
1482 (variable "TERMINFO_DIRS")
1483 (files '("share/terminfo")))))
1484 (home-page "https://github.com/alacritty/alacritty")
1485 (synopsis "GPU-accelerated terminal emulator")
1487 "Alacritty is a GPU-accelerated terminal emulator with a strong focus on
1488 simplicity and performance. With such a strong focus on performance, included
1489 features are carefully considered and you can always expect Alacritty to be
1490 blazingly fast. By making sane choices for defaults, Alacritty requires no
1491 additional setup. However, it does allow configuration of many aspects of the
1492 terminal. Note that you need support for OpenGL 3.2 or higher.")
1493 (license license:asl2.0)))
1495 (define-public bootterm
1502 (url "https://github.com/wtarreau/bootterm")
1503 (commit (string-append "v" version))))
1504 (file-name (git-file-name name version))
1507 "1k3jacld98za41dbpr10sjms77hrw91sb10m0cnwv3h7aifiwmrs"))))
1508 (build-system gnu-build-system)
1510 `(#:tests? #f ; no test suite
1511 #:make-flags (list (string-append "CC=" ,(cc-for-target))
1512 (string-append "PREFIX=" (assoc-ref %outputs "out")))
1514 (modify-phases %standard-phases
1515 ;; No ./configure script
1517 (add-after 'install 'install-doc
1518 (lambda* (#:key outputs #:allow-other-keys)
1519 (let* ((out (assoc-ref outputs "out"))
1520 (doc (string-append out "/share/doc/" ,name "-" ,version)))
1521 (install-file "README.md" doc)
1523 (home-page "https://github.com/wtarreau/bootterm")
1524 (synopsis "Serial terminal")
1525 (description "Bootterm is a terminal designed to ease connection to
1526 ephemeral serial ports. It features automatic port detection, port enumeration,
1527 support for non-standard baud rates, the ability to wait for ports to appear,
1528 and the ability to read and write via stdin and stdout.")
1529 (license license:expat)))