gnu: emacs-svg-icon: Fix grammar.
[jackhill/guix/guix.git] / gnu / packages / terminals.scm
CommitLineData
6a7e1a18 1;;; GNU Guix --- Functional package management for GNU
4e2a7cc1 2;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020, 2021 Efraim Flashner <efraim@flashner.co.il>
89978a0a 3;;; Copyright © 2016 Mckinley Olsen <mck.olsen@gmail.com>
ab1c063a 4;;; Copyright © 2016, 2017, 2019 Alex Griffin <a@ajgrf.com>
af39609b 5;;; Copyright © 2016 David Craven <david@craven.ch>
e5059c95 6;;; Copyright © 2016, 2017, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
abe2ec73 7;;; Copyright © 2016, 2017 José Miguel Sánchez García <jmi2k@openmailbox.org>
f5b87338 8;;; Copyright © 2017–2021 Tobias Geerinckx-Rice <me@tobias.gr>
90bf2608 9;;; Copyright © 2017 Kei Kebreau <kkebreau@posteo.net>
456da45c 10;;; Copyright © 2017, 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
f9ff014b 11;;; Copyright © 2017 Petter <petter@mykolab.ch>
46ddcf4a 12;;; Copyright © 2018 Hartmut Goebel <h.goebel@crazy-compilers.com>
40c1b61a 13;;; Copyright © 2018 Arun Isaac <arunisaac@systemreboot.net>
b7ec276e 14;;; Copyright © 2018 Gabriel Hondet <gabrielhondet@gmail.com>
b412ddcb 15;;; Copyright © 2019 Rutger Helling <rhelling@mykolab.com>
68a116bd 16;;; Copyright © 2018, 2019 Eric Bavier <bavier@member.fsf.org>
7c1c42c4 17;;; Copyright © 2019 Julien Lepiller <julien@lepiller.eu>
9d282fb1 18;;; Copyright © 2019 Pierre Langlois <pierre.langlois@gmx.com>
02312f7b 19;;; Copyright © 2019, 2020 Brett Gilio <brettg@gnu.org>
e53829be 20;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
22e92800 21;;; Copyright © 2020 Valentin Ignatev <valentignatev@gmail.com>
f71bce9b 22;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de>
034abb77 23;;; Copyright © 2020, 2021 Marius Bakke <marius@gnu.org>
ea7728a4 24;;; Copyright © 2020, 2021 Nicolas Goaziou <mail@nicolasgoaziou.fr>
9bbb4fa1 25;;; Copyright © 2020 Leo Famulari <leo@famulari.name>
6a7e1a18
EF
26;;;
27;;; This file is part of GNU Guix.
28;;;
29;;; GNU Guix is free software; you can redistribute it and/or modify it
30;;; under the terms of the GNU General Public License as published by
31;;; the Free Software Foundation; either version 3 of the License, or (at
32;;; your option) any later version.
33;;;
34;;; GNU Guix is distributed in the hope that it will be useful, but
35;;; WITHOUT ANY WARRANTY; without even the implied warranty of
36;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
37;;; GNU General Public License for more details.
38;;;
39;;; You should have received a copy of the GNU General Public License
40;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
41
42(define-module (gnu packages terminals)
43 #:use-module ((guix licenses) #:prefix license:)
22e92800 44 #:use-module (guix build-system cargo)
90bf2608 45 #:use-module (guix build-system cmake)
6a7e1a18 46 #:use-module (guix build-system gnu)
99e28bbf 47 #:use-module (guix build-system glib-or-gtk)
d0c2f81c 48 #:use-module (guix build-system go)
3f35b09e 49 #:use-module (guix build-system meson)
cb55f9c6 50 #:use-module (guix build-system python)
6a7e1a18 51 #:use-module (guix download)
89978a0a 52 #:use-module (guix git-download)
6a7e1a18 53 #:use-module (guix packages)
ede2e1f4 54 #:use-module (guix utils)
f9ff014b 55 #:use-module (gnu packages)
6a7e1a18 56 #:use-module (gnu packages autotools)
3f35b09e 57 #:use-module (gnu packages build-tools) ;for meson-0.55
46ddcf4a 58 #:use-module (gnu packages check)
22e92800 59 #:use-module (gnu packages cmake)
b7ec276e 60 #:use-module (gnu packages compression)
22e92800 61 #:use-module (gnu packages crates-io)
9f86a6da 62 #:use-module (gnu packages crates-graphics)
2206f236 63 #:use-module (gnu packages crypto)
78a81e37 64 #:use-module (gnu packages docbook)
b7ec276e 65 #:use-module (gnu packages fontutils)
e8bb4336 66 #:use-module (gnu packages freedesktop)
6a7e1a18 67 #:use-module (gnu packages gettext)
153b279e 68 #:use-module (gnu packages ghostscript)
e8bb4336 69 #:use-module (gnu packages gl)
6a7e1a18
EF
70 #:use-module (gnu packages glib)
71 #:use-module (gnu packages gnome)
cb3625bc 72 #:use-module (gnu packages golang)
6a7e1a18 73 #:use-module (gnu packages gtk)
b7ec276e 74 #:use-module (gnu packages image)
932f795c 75 #:use-module (gnu packages libcanberra)
40c1b61a 76 #:use-module (gnu packages libevent)
e8bb4336 77 #:use-module (gnu packages linux)
3f35b09e 78 #:use-module (gnu packages man)
78a81e37 79 #:use-module (gnu packages ncurses)
db913ac4 80 #:use-module (gnu packages perl)
5ccde207 81 #:use-module (gnu packages perl-check)
6a7e1a18 82 #:use-module (gnu packages pkg-config)
2206f236
EF
83 #:use-module (gnu packages popt)
84 #:use-module (gnu packages protobuf)
cb55f9c6 85 #:use-module (gnu packages python)
589e3f4e 86 #:use-module (gnu packages python-web)
44d10b1f 87 #:use-module (gnu packages python-xyz)
78a81e37 88 #:use-module (gnu packages qt)
40c1b61a 89 #:use-module (gnu packages serialization)
9d0c291e 90 #:use-module (gnu packages sphinx)
40c1b61a 91 #:use-module (gnu packages ssh)
cf71edee 92 #:use-module (gnu packages textutils)
78325fa8 93 #:use-module (gnu packages xdisorg)
7326944b 94 #:use-module (gnu packages xml)
90bf2608 95 #:use-module (gnu packages xorg)
78325fa8 96 #:use-module (srfi srfi-26))
6a7e1a18
EF
97
98(define-public tilda
99 (package
100 (name "tilda")
2341480e 101 (version "1.5.4")
6a7e1a18 102 (source (origin
cf8478e5
RW
103 (method git-fetch)
104 (uri (git-reference
b0e7b699 105 (url "https://github.com/lanoxx/tilda")
cf8478e5
RW
106 (commit (string-append "tilda-" version))))
107 (file-name (git-file-name name version))
6a7e1a18
EF
108 (sha256
109 (base32
2341480e 110 "0q2i9ny8sh7zjzgvkx8vcvk593wcvchjc4xq4nrlqdd377r7cg5q"))))
99e28bbf 111 (build-system glib-or-gtk-build-system)
2341480e
EF
112 (arguments
113 `(#:phases
114 (modify-phases %standard-phases
115 (add-after 'unpack 'make-po-writable
116 (lambda _
117 (for-each make-file-writable (find-files "po" "."))
118 #t)))))
6a7e1a18
EF
119 (native-inputs
120 `(("autoconf" ,autoconf)
121 ("automake" ,automake)
b94a6ca0 122 ("gettext" ,gettext-minimal)
d2a52108 123 ("pkg-config" ,pkg-config)))
6a7e1a18 124 (inputs
99e28bbf 125 `(("libconfuse" ,libconfuse)
d2a52108 126 ("vte" ,vte)))
6a7e1a18
EF
127 (synopsis "GTK+-based drop-down terminal")
128 (description "Tilda is a terminal emulator similar to normal terminals like
129gnome-terminal (GNOME) or Konsole (KDE), with the difference that it drops down
130from the edge of a screen when a certain configurable hotkey is pressed. This
131is similar to the built-in consoles in some applications. Tilda is highly
d1e4ad1b 132configurable through a graphical wizard.")
6a7e1a18
EF
133 (home-page "https://github.com/lanoxx/tilda")
134 (license license:gpl2+)))
89978a0a
MO
135
136(define-public termite
137 (package
138 (name "termite")
14da3daa 139 (version "15")
89978a0a
MO
140 (source
141 (origin
142 (method git-fetch)
143 (uri (git-reference
144 (url (string-append "https://github.com/thestinger/"
145 name ".git"))
146 (commit (string-append "v" version))
147 (recursive? #t)))
148 (file-name (string-append name "-" version "-checkout"))
149 (sha256
ebe3515f 150 (base32
14da3daa 151 "0hp1x6lj098m3jgna274wv5dv60lnzg22297di68g4hw9djjyd2k"))))
89978a0a
MO
152 (build-system gnu-build-system)
153 (arguments
66bb5db7
EF
154 `(#:phases
155 (modify-phases %standard-phases
e53829be
JK
156 (add-after 'unpack 'patch-xdg-open
157 (lambda _
158 (substitute* "termite.cc"
159 (("xdg-open") (which "xdg-open")))
160 #t))
66bb5db7 161 (delete 'configure))
89978a0a
MO
162 #:tests? #f
163 ;; This sets the destination when installing the necessary terminal
164 ;; capability data, which are not provided by 'ncurses'. See
165 ;; <https://lists.gnu.org/archive/html/bug-ncurses/2009-10/msg00031.html>.
166 #:make-flags (list "PREFIX="
167 (string-append "VERSION=v" (version))
168 (string-append "DESTDIR="
169 (assoc-ref %outputs "out")))))
170 (inputs
c695fb76
TGR
171 `(("vte" ,vte-ng)
172 ("gtk+" ,gtk+)
e53829be 173 ("xdg-utils" ,xdg-utils)
c695fb76 174 ("ncurses" ,ncurses)))
89978a0a
MO
175 (native-inputs
176 `(("pkg-config" ,pkg-config)))
177
178 ;; FIXME: This should only be located in 'ncurses'. Nonetheless it is
179 ;; provided for usability reasons. See <https://bugs.gnu.org/22138>.
180 (native-search-paths
181 (list (search-path-specification
182 (variable "TERMINFO_DIRS")
183 (files '("share/terminfo")))))
184 (home-page "https://github.com/thestinger/termite/")
185 (synopsis "Keyboard-centric, VTE-based terminal")
186 (description "Termite is a minimal terminal emulator designed for use with
187tiling window managers. It is a modal application, similar to Vim, with an
188insert mode and command mode where keybindings have different functions.")
189
190 ;; Files under util/ are under the Expat license; the rest is LGPLv2+.
191 (license license:lgpl2.0+)))
cb55f9c6
AG
192
193(define-public asciinema
194 (package
195 (name "asciinema")
ab1c063a 196 (version "2.0.2")
cb55f9c6
AG
197 (source
198 (origin
ab1c063a
AG
199 (method git-fetch)
200 (uri (git-reference
201 (url "https://github.com/asciinema/asciinema")
202 (commit (string-append "v" version))))
203 (file-name (git-file-name name version))
cb55f9c6
AG
204 (sha256
205 (base32
ab1c063a 206 "1a2pysxnp6icyd08mgf66xr6f6j0irnfxdpf3fmzcz31ix7l9kc4"))))
cb55f9c6
AG
207 (build-system python-build-system)
208 (arguments
209 `(#:phases
210 (modify-phases %standard-phases
211 (add-before 'build 'patch-exec-paths
212 (lambda* (#:key inputs #:allow-other-keys)
213 (let ((ncurses (assoc-ref inputs "ncurses")))
ab1c063a 214 (substitute* "asciinema/term.py"
cb55f9c6
AG
215 (("'tput'")
216 (string-append "'" ncurses "/bin/tput'"))))
ab1c063a
AG
217 #t))
218 (replace 'check
219 (lambda _ (invoke "nosetests" "-v"))))))
f3b98f4f 220 (inputs `(("ncurses" ,ncurses)))
39d0de33
MB
221 (native-inputs
222 ;; For tests.
ab1c063a 223 `(("python-nose" ,python-nose)))
cb55f9c6
AG
224 (home-page "https://asciinema.org")
225 (synopsis "Terminal session recorder")
226 (description
227 "Use asciinema to record and share your terminal sessions, the right way.
228Forget screen recording apps and blurry video. Enjoy a lightweight, purely
229text-based approach to terminal recording.")
230 (license license:gpl3)))
af39609b
DC
231
232(define-public libtsm
a7903ca1
MO
233 (let ((commit "f70e37982f382b03c6939dac3d5f814450bda253")
234 (revision "1"))
235 (package
236 (name "libtsm")
237 (version (git-version "0.0.0" revision commit))
681bf1b2
TGR
238 (source
239 (origin
240 (method git-fetch)
241 ;; The freedesktop repository is no longer maintained.
242 (uri (git-reference
243 (url (string-append "https://github.com/Aetf/" name))
244 (commit commit)))
245 (file-name (git-file-name name version))
246 (sha256
247 (base32 "0mwn91i5h5d518i1s05y7hzv6bc13vzcvxszpfh77473iwg4wprx"))
248 (modules '((guix build utils)))
249 (snippet
250 '(begin
251 ;; Remove a bundled copy of libxkbcommon's xkbcommon-keysyms.h.
252 (delete-file-recursively "external/xkbcommon")
253 #t))))
a7903ca1
MO
254 (build-system cmake-build-system)
255 (arguments
256 `(#:configure-flags '("-DBUILD_TESTING=ON")))
257 (native-inputs
9bb8a846
TGR
258 `(("check" ,check)
259 ("libxkbcommon" ,libxkbcommon) ; for xkbcommon-keysyms.h
260 ("pkg-config" ,pkg-config)))
a7903ca1
MO
261 (synopsis "Xterm state machine library")
262 (description "TSM is a state machine for DEC VT100-VT520 compatible
af39609b
DC
263terminal emulators. It tries to support all common standards while keeping
264compatibility to existing emulators like xterm, gnome-terminal, konsole, etc.")
a7903ca1
MO
265 (home-page "https://www.freedesktop.org/wiki/Software/libtsm")
266 ;; Hash table implementation is lgpl2.1+ licensed.
267 ;; The wcwidth implementation in external/wcwidth.{h,c} uses a license
268 ;; derived from ISC.
269 ;; UCS-4 to UTF-8 encoding is copied from "terminology" which is released
270 ;; under the bsd 2 license.
271 (license (list license:expat license:lgpl2.1+ license:isc license:bsd-2)))))
e8bb4336
DC
272
273(define-public kmscon
a7903ca1
MO
274 (let ((commit "01dd0a231e2125a40ceba5f59fd945ff29bf2cdc")
275 (revision "1"))
276 (package
277 (name "kmscon")
278 (version (git-version "0.0.0" revision commit))
279 (source (origin
280 (method git-fetch)
281 ;; The freedesktop repository is no longer maintained.
282 (uri (git-reference
283 (url (string-append "https://github.com/Aetf/" name))
284 (commit commit)))
285 (sha256
286 (base32
287 "0q62kjsvy2iwy8adfiygx2bfwlh83rphgxbis95ycspqidg9py87"))
08af580b
MO
288 (patches
289 (search-patches "kmscon-runtime-keymap-switch.patch"))
2c6c002a
LC
290 (modules '((guix build utils)))
291 (file-name (git-file-name name version))))
a7903ca1
MO
292 (build-system gnu-build-system)
293 (arguments
24356427
LC
294 `(;; The closure of MESA is huge so we'd rather avoid it.
295 #:disallowed-references (,mesa)
296
297 #:phases (modify-phases %standard-phases
a7903ca1
MO
298 ;; Use elogind instead of systemd.
299 (add-before 'configure 'remove-systemd
300 (lambda _
301 (substitute* "configure"
302 (("libsystemd-daemon libsystemd-login")
303 "libelogind"))
304 (substitute* "src/uterm_systemd.c"
305 (("#include <systemd/sd-login.h>")
306 "#include <elogind/sd-login.h>")
307 ;; We don't have this header.
308 (("#include <systemd/sd-daemon\\.h>")
309 "")
310 ;; Replace the call to 'sd_booted' by the truth value.
311 (("sd_booted\\(\\)")
312 "1")))))))
313 (native-inputs
314 `(("pkg-config" ,pkg-config)
315 ("autoconf" ,autoconf)
316 ("automake" ,automake)
317 ("libtool" ,libtool)
318 ("libxslt" ,libxslt) ;to build the man page
319 ("libxml2" ,libxml2) ;for XML_CATALOG_FILES
320 ("docbook-xsl" ,docbook-xsl)))
321 (inputs
322 `(("libdrm" ,libdrm)
323 ("libtsm" ,libtsm)
324 ("libxkbcommon" ,libxkbcommon)
325 ("logind" ,elogind)
24356427
LC
326 ;; MESA can be used for accelerated video output via OpenGLESv2, but
327 ;; it's a bit dependency that we'd rather avoid in the installation
328 ;; image.
329 ;; ("mesa" ,mesa)
a7903ca1
MO
330 ("pango" ,pango)
331 ("udev" ,eudev)))
332 (synopsis "Linux KMS-based terminal emulator")
333 (description "Kmscon is a terminal emulator based on Linux's @dfn{kernel
78325fa8
LC
334mode setting} (KMS). It can replace the in-kernel virtual terminal (VT)
335implementation with a user-space console. Compared to the Linux console,
336kmscon provides enhanced features including XKB-compatible internationalized
337keyboard support, UTF-8 input/font support, hardware-accelerated rendering,
338multi-seat support, a replacement for @command{mingetty}, and more.")
a7903ca1
MO
339 (home-page "https://www.freedesktop.org/wiki/Software/kmscon")
340 ;; Hash table implementation is lgpl2.1+ licensed.
341 ;; The wcwidth implementation in external/wcwidth.{h,c} uses a license
342 ;; derived from ISC.
343 ;; UCS-4 to UTF-8 encoding is copied from "terminology" which is released
344 ;; under the bsd 2 license.
345 ;; Unifont-Font is from http://unifoundry.com/unifont.html and licensed
346 ;; under the terms of the GNU GPL.
347 (license (list license:expat license:lgpl2.1+ license:bsd-2
348 license:gpl2+))
349 (supported-systems (filter (cut string-suffix? "-linux" <>)
350 %supported-systems)))))
a3af70ac 351
db913ac4
JMSG
352(define-public libtermkey
353 (package
354 (name "libtermkey")
465a2513 355 (version "0.22")
db913ac4
JMSG
356 (source (origin
357 (method url-fetch)
49093d75
TGR
358 (uri (string-append "http://www.leonerd.org.uk/code/libtermkey/"
359 "libtermkey-" version ".tar.gz"))
db913ac4 360 (sha256
465a2513 361 (base32 "002606rrxh5f6l6jrikl0dyxsknscdamq10av21xm0xa98ybsib9"))))
db913ac4
JMSG
362 (build-system gnu-build-system)
363 (arguments
ede2e1f4
TGR
364 `(#:make-flags (list
365 (string-append "CC=" ,(cc-for-target))
db913ac4 366 (string-append "PREFIX=" (assoc-ref %outputs "out")))
465a2513
TGR
367 #:phases
368 (modify-phases %standard-phases
369 (delete 'configure) ; no configure script
370 (add-before 'check 'patch-failing-test
371 ;; XXX This undoes an upstream change in version 0.22 which ‘ensures
372 ;; that the hooked function can invent TI strings for new terminal
373 ;; types’. That fails in the build environment. Why?
374 (lambda _
375 (substitute* "t/40ti-override.c"
376 (("vt750") "vt100")))))
db913ac4 377 #:test-target "test"))
c695fb76
TGR
378 (inputs `(("ncurses" ,ncurses)))
379 (native-inputs `(("libtool" ,libtool)
db913ac4 380 ("perl-test-harness" ,perl-test-harness)
c695fb76 381 ("pkg-config" ,pkg-config)))
db913ac4
JMSG
382 (synopsis "Keyboard entry processing library for terminal-based programs")
383 (description
384 "Libtermkey handles all the necessary logic to recognise special keys, UTF-8
385combining, and so on, with a simple interface.")
386 (home-page "http://www.leonerd.org.uk/code/libtermkey")
387 (license license:expat)))
388
a3af70ac
DC
389(define-public picocom
390 (package
391 (name "picocom")
33238b55 392 (version "3.1")
a3af70ac 393 (source (origin
773c1808
RW
394 (method git-fetch)
395 (uri (git-reference
b0e7b699 396 (url "https://github.com/npat-efault/picocom")
773c1808
RW
397 (commit version)))
398 (file-name (git-file-name name version))
a3af70ac
DC
399 (sha256
400 (base32
33238b55 401 "1vvjydqf0ax47nvdyyl67jafw5b3sfsav00xid6qpgia1gs2r72n"))))
a3af70ac
DC
402 (build-system gnu-build-system)
403 (arguments
f4159867 404 `(#:make-flags (list (string-append "CC=" ,(cc-for-target)))
33238b55 405 #:tests? #f ; no tests
a3af70ac
DC
406 #:phases
407 (modify-phases %standard-phases
33238b55 408 (delete 'configure) ; no configure script
a3af70ac 409 (replace 'install
33238b55 410 ;; The Makefile lacks an ‘install’ target.
a3af70ac
DC
411 (lambda* (#:key outputs #:allow-other-keys)
412 (let* ((out (assoc-ref outputs "out"))
413 (bin (string-append out "/bin"))
414 (man (string-append out "/share/man/man1")))
415 (install-file "picocom" bin)
416 (install-file "picocom.1" man)))))))
417 (home-page "https://github.com/npat-efault/picocom")
5e5bd818
TGR
418 (synopsis "Minimal dumb-terminal emulator")
419 (description
420 "Picocom is a minimal dumb-terminal emulation program. It was designed to
421serve as a simple and manual modem configuration, testing, and debugging tool.
422It also serves well as a low-tech serial communications program to allow access
423to all types of devices that provide serial consoles.")
a3af70ac 424 (license license:gpl2+)))
abe2ec73
JMSG
425
426(define-public beep
427 (package
428 (name "beep")
1d91680c 429 (version "1.4.9")
231908d9
TGR
430 (source
431 (origin
432 (method git-fetch)
433 (uri (git-reference
434 ;; The original beep 1.3 at <http://www.johnath.com/beep> has been
435 ;; unmaintained for some time, and vulnerable to at least two CVEs:
436 ;; https://github.com/johnath/beep/issues/11#issuecomment-454056858
437 ;; Use this maintained fork instead.
b0e7b699 438 (url "https://github.com/spkr-beep/beep")
231908d9
TGR
439 (commit (string-append "v" version))))
440 (file-name (git-file-name name version))
441 (sha256
1d91680c 442 (base32 "0jmvqk6g5n0wzj9znw42njxq3mzw1769f4db99b83927hf4aidi4"))))
abe2ec73
JMSG
443 (build-system gnu-build-system)
444 (arguments
2f49edaa 445 `(#:tests? #f ; no tests
231908d9
TGR
446 #:make-flags
447 (list (string-append "prefix=" (assoc-ref %outputs "out"))
448 (string-append "pkgdocdir=$(docdir)/" ,name "-" ,version))
abe2ec73
JMSG
449 #:phases
450 (modify-phases %standard-phases
231908d9 451 (delete 'configure)))) ; no configure script
abe2ec73
JMSG
452 (synopsis "Linux command-line utility to control the PC speaker")
453 (description "beep allows the user to control the PC speaker with precision,
454allowing different sounds to indicate different events. While it can be run
455quite happily on the command line, its intended place of residence is within
456scripts, notifying the user when something interesting occurs. Of course, it
7230f6d5 457has no notion of what's interesting, but it's very good at that notifying part.")
231908d9 458 (home-page "https://github.com/spkr-beep/beep")
abe2ec73 459 (license license:gpl2+)))
f2b7be09
RW
460
461(define-public unibilium
462 (package
463 (name "unibilium")
2702aa91 464 (version "2.0.0")
f2b7be09
RW
465 (source
466 (origin
e784449e
RW
467 (method git-fetch)
468 (uri (git-reference
b0e7b699 469 (url "https://github.com/mauke/unibilium")
e784449e
RW
470 (commit (string-append "v" version))))
471 (file-name (git-file-name name version))
f2b7be09
RW
472 (sha256
473 (base32
2702aa91 474 "1wa9a32wzqnxqh1jh554afj13dzjr6mw2wzqzw8d08nza9pg2ra2"))))
f2b7be09
RW
475 (build-system gnu-build-system)
476 (arguments
477 `(#:make-flags
478 (list "CC=gcc"
479 (string-append "PREFIX=" (assoc-ref %outputs "out")))
480 #:test-target "test"
481 ;; FIXME: tests require "prove"
482 #:tests? #f
483 #:phases
484 (modify-phases %standard-phases
485 (delete 'configure))))
486 (native-inputs
2702aa91
GB
487 `(("libtool" ,libtool)
488 ("perl" ,perl)))
f2b7be09
RW
489 (home-page "https://github.com/mauke/unibilium")
490 (synopsis "Terminfo parsing library")
491 (description "Unibilium is a basic C terminfo library. It doesn't depend
492on curses or any other library. It also doesn't use global variables, so it
493should be thread-safe.")
494 (license license:lgpl3+)))
ee869cd6
RW
495
496(define-public libvterm
497 (package
498 (name "libvterm")
fd69aa52 499 (version "0.1.4")
ee869cd6
RW
500 (source
501 (origin
502 (method url-fetch)
503 (uri (string-append "http://www.leonerd.org.uk/code/libvterm/"
504 "libvterm-" version ".tar.gz"))
505 (sha256
506 (base32
fd69aa52 507 "1pfkhbbihd2kvaza707vl2nvk7bxaawmb37wf9v6d72mjng38w5w"))))
ee869cd6
RW
508 (build-system gnu-build-system)
509 (arguments
510 `(#:make-flags
511 (list "CC=gcc"
512 (string-append "PREFIX=" (assoc-ref %outputs "out")))
513 #:test-target "test"
514 #:phases
515 (modify-phases %standard-phases
516 (delete 'configure))))
517 (native-inputs
518 `(("libtool" ,libtool)
519 ("perl" ,perl)))
520 (home-page "http://www.leonerd.org.uk/code/libvterm/")
521 (synopsis "VT220/xterm/ECMA-48 terminal emulator library")
522 (description "Libvterm is an abstract C99 library which implements a VT220
523or xterm-like terminal emulator. It doesn't use any particular graphics
524toolkit or output system, instead it invokes callback function pointers that
525its embedding program should provide it to draw on its behalf. It avoids
526calling @code{malloc} during normal running state, allowing it to be used in
527embedded kernel situations.")
528 (license license:expat)))
f9ff014b
P
529
530(define-public cool-retro-term
68a116bd
EB
531 (let ((commit "1.1.1")
532 (revision "0")) ;not used currently
f9ff014b
P
533 (package
534 (name "cool-retro-term")
68a116bd 535 (version "1.1.1")
f9ff014b
P
536 (source (origin
537 (method git-fetch)
538 (file-name (string-append name "-" version "-checkout"))
539 (uri (git-reference
540 (url (string-append "https://github.com/Swordfish90/" name))
541 (commit commit)
542 (recursive? #t)))
543 (sha256
68a116bd 544 (base32 "0wb6anchxa5jpn9c73kr4byrf2xlj8x8qzc5x7ny6saj7kbbvp75"))
306d8630
EB
545 (modules '((guix build utils)
546 (srfi srfi-1)
547 (srfi srfi-26)
548 (ice-9 rdelim)
549 (ice-9 regex)))
f9ff014b 550 (snippet
306d8630 551 '(let* ((fonts '(;"1971-ibm-3278" ; BSD 3-clause
306d8630
EB
552 "1977-apple2" ; Non-Free
553 "1977-commodore-pet" ; Non-Free
554 "1979-atari-400-800" ; Non-Free
68a116bd
EB
555 ;"1981-ibm-pc ; CC-SA 4.0
556 "1982-commodore64")) ; Non-Free
557 ;"1985-ibm-pc-vga" ; CC-SA 4.0
306d8630
EB
558 ;"modern-fixedsys-excelsior" ; Redistributable
559 ;"modern-hermit" ; SIL
560 ;"modern-inconsolata"; SIL
561 ;"modern-pro-font-win-tweaked" ; X11
562 ;"modern-proggy-tiny"; X11
563 ;"modern-terminus" ; SIL
306d8630
EB
564 (name-rx (make-regexp " *name: *\"([^\"]*)\""))
565 (source-rx (make-regexp " *source: \"fonts/([^/]*)[^\"]*\""))
566 (fontname-rx (make-regexp "\"fontName\":\"([^\"]*).*"))
567 (names
568 ;; Gather font names from all Fonts*.qml files.
569 ;; These will be used to remove items from the
570 ;; default profiles.
571 (fold
572 (lambda (font-file names)
573 (call-with-input-file font-file
574 (lambda (port)
575 (let loop ((name #f) (names names))
576 (let ((line (read-line port)))
577 (cond
578 ((eof-object? line) (pk 'names names))
579 ((regexp-exec name-rx line)
580 => (lambda (m)
581 (loop (match:substring m 1) names)))
582 ((regexp-exec source-rx line)
583 => (lambda (m)
584 (let ((font (match:substring m 1)))
585 (if (member font fonts)
586 (loop #f (lset-adjoin string=?
587 names name))
588 (loop #f names)))))
589 (else (loop name names))))))))
590 '() (find-files "app/qml" "Font.*\\.qml"))))
591 ;; Remove the font files themselves
6cbee49d
MW
592 (for-each (lambda (font)
593 (delete-file-recursively
306d8630
EB
594 (string-append "app/qml/fonts/" font)))
595 fonts)
596 ;; Remove mention of those fonts in the source
597 (substitute* "app/qml/resources.qrc"
598 (((string-append " *<file>fonts/("
599 (string-join fonts "|")
600 ").*"))
601 ""))
602 (for-each
603 (lambda (file)
604 (let ((start-rx (make-regexp " *ListElement\\{"))
605 (end-rx (make-regexp " *\\}")))
606 (with-atomic-file-replacement file
607 (lambda (in out)
608 (let loop ((line-buffer '())
609 (hold? #f)
610 (discard? #f))
611 (let ((line (read-line in 'concat)))
612 (cond
613 ((eof-object? line) #t) ;done
614 ((regexp-exec start-rx line)
615 (loop (cons line line-buffer) #t #f))
616 ((or (regexp-exec source-rx line)
617 (regexp-exec fontname-rx line))
618 => (lambda (m)
619 (let ((font-or-name (match:substring m 1)))
620 (if (or (member font-or-name fonts)
621 (member font-or-name names))
622 (loop '() #f #t)
623 (loop (cons line line-buffer)
624 hold? #f)))))
625 ((regexp-exec end-rx line)
626 (unless discard?
627 (for-each (cut display <> out)
628 (reverse line-buffer))
629 (display line out))
630 (loop '() #f #f))
631 (hold? (loop (cons line line-buffer)
632 hold? discard?))
633 (discard? (loop line-buffer #f #t))
634 (else (display line out)
635 (loop '() #f #f)))))))))
636 '("app/qml/FontPixels.qml"
637 "app/qml/FontScanlines.qml"
638 "app/qml/Fonts.qml"
639 "app/qml/ApplicationSettings.qml"))
640 ;; Final substitution for default scanline and pixel fonts
641 (substitute* "app/qml/ApplicationSettings.qml"
c52872bf 642 (("COMMODORE_PET") "PROGGY_TINY"))
6cbee49d 643 #t))))
f9ff014b
P
644 (build-system gnu-build-system)
645 (inputs
646 `(("qtbase" ,qtbase)
647 ("qtdeclarative" ,qtdeclarative)
648 ("qtgraphicaleffects" ,qtgraphicaleffects)
649 ("qtquickcontrols" ,qtquickcontrols)))
650 (arguments
651 `(#:phases
652 (modify-phases %standard-phases
653 (replace 'configure
654 (lambda* (#:key outputs #:allow-other-keys)
306d8630 655 (let ((out (assoc-ref outputs "out")))
f9ff014b
P
656 (substitute* '("qmltermwidget/qmltermwidget.pro")
657 (("INSTALL_DIR = \\$\\$\\[QT_INSTALL_QML\\]")
669be6ac 658 (string-append "INSTALL_DIR = " out "/lib/qt5/qml")))
306d8630
EB
659 (substitute* '("cool-retro-term.pro" "app/app.pro")
660 (("/usr") out))
661 (invoke "qmake"))))
f9ff014b
P
662 (add-after 'install 'wrap-executable
663 (lambda* (#:key inputs outputs #:allow-other-keys)
306d8630
EB
664 (let ((out (assoc-ref outputs "out"))
665 (qml "/lib/qt5/qml"))
f9ff014b
P
666 (wrap-program (string-append out "/bin/cool-retro-term")
667 `("QML2_IMPORT_PATH" ":" prefix
668 (,(string-append out qml)
306d8630
EB
669 ,@(map (lambda (i)
670 (string-append (assoc-ref inputs i) qml))
671 '("qtdeclarative"
672 "qtgraphicaleffects"
673 "qtquickcontrols")))))
674 #t)))
f9ff014b
P
675 (add-after 'install 'add-alternate-name
676 (lambda* (#:key outputs #:allow-other-keys)
306d8630 677 (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
f9ff014b 678 (symlink (string-append bin "/cool-retro-term")
68a116bd
EB
679 (string-append bin "/crt"))
680 #t)))
306d8630
EB
681 (add-after 'install 'install-man
682 (lambda* (#:key outputs #:allow-other-keys)
683 (let ((mandir (string-append (assoc-ref outputs "out")
684 "/share/man/man1")))
685 (install-file "packaging/debian/cool-retro-term.1" mandir)
686 #t))))))
f9ff014b
P
687 (synopsis "Terminal emulator")
688 (description
689 "Cool-retro-term (crt) is a terminal emulator which mimics the look and
690feel of the old cathode ray tube (CRT) screens. It has been designed to be
691eye-candy, customizable, and reasonably lightweight.")
692 (home-page "https://github.com/Swordfish90/cool-retro-term")
693 (license (list
694 license:gpl2+ ; qmltermwidget
695 license:gpl3+ ; cool-retro-term
696 ;; Fonts
697 license:silofl1.1
698 license:x11
699 license:bsd-3)))))
90bf2608 700
3f35b09e
MB
701(define-public foot
702 (package
703 (name "foot")
f5b87338 704 (version "1.6.3")
3f35b09e
MB
705 (home-page "https://codeberg.org/dnkl/foot")
706 (source (origin
707 (method git-fetch)
708 (uri (git-reference (url home-page) (commit version)))
709 (file-name (git-file-name name version))
710 (sha256
711 (base32
f5b87338 712 "0rm7w29wf3gipf69qf7s42qw8857z74gsigrpz9g6vvd1x58f03m"))))
3f35b09e
MB
713 (build-system meson-build-system)
714 (arguments
715 `(#:meson ,meson-0.55
716 ;; Using a "release" build is recommended both for performance, and
717 ;; also to address a GCC 10 issue when doing PGO builds.
718 #:build-type "release"
719 ;; Enable LTO as recommended by INSTALL.md.
720 #:configure-flags '("-Db_lto=true")))
721 (native-inputs
034abb77 722 `(("ncurses" ,ncurses) ;for 'tic'
3f35b09e
MB
723 ("pkg-config" ,pkg-config)
724 ("scdoc" ,scdoc)
725 ("wayland-protocols" ,wayland-protocols)))
726 (inputs
727 `(("fcft" ,fcft)
728 ("libxkbcommon" ,libxkbcommon)
729 ("wayland" ,wayland)))
730 (synopsis "Wayland-native terminal emulator")
731 (description
732 "@command{foot} is a terminal emulator for systems using the Wayland
733display server. It is designed to be fast, lightweight, and independent of
734desktop environments. It can be used as a standalone terminal and also has
735a server/client mode.")
736 (license license:expat)))
737
90bf2608
KK
738(define-public sakura
739 (package
740 (name "sakura")
cca40dce 741 (version "3.7.1")
90bf2608
KK
742 (source (origin
743 (method url-fetch)
7f85664d
TGR
744 (uri (string-append "https://launchpad.net/sakura/trunk/"
745 version "/+download/sakura-" version
cca40dce 746 ".tar.bz2"))
90bf2608
KK
747 (sha256
748 (base32
cca40dce 749 "12wjmckf03qbnm8cb7qma0980anzajn3l92rj2yr8hhafl74x6kj"))))
90bf2608
KK
750 (build-system cmake-build-system)
751 (arguments
42d93a32 752 '(#:tests? #f)) ; no check phase
90bf2608
KK
753 (native-inputs
754 `(("gettext" ,gettext-minimal)
42d93a32 755 ("perl" ,perl) ; for pod2man
90bf2608
KK
756 ("pkg-config" ,pkg-config)))
757 (inputs
758 `(("libxft" ,libxft)
759 ("vte" ,vte)))
760 (home-page "https://launchpad.net/sakura")
761 (synopsis "A simple but powerful libvte-based terminal emulator")
762 (description "@code{Sakura} is a terminal emulator based on GTK+ and VTE.
763It's a terminal emulator with few dependencies, so you don't need a full GNOME
764desktop installed to have a decent terminal emulator.")
765 (license license:gpl2)))
d0c2f81c 766
cf71edee 767(define-public go-github.com-nsf-termbox-go
7c1c42c4
JL
768 (let ((commit "288510b9734e30e7966ec2f22b87c5f8e67345e3")
769 (revision "1"))
cf71edee
CB
770 (package
771 (name "go-github.com-nsf-termbox-go")
772 (version (git-version "0.0.0" revision commit))
773 (source (origin
774 (method git-fetch)
775 (uri (git-reference
b0e7b699 776 (url "https://github.com/nsf/termbox-go")
cf71edee
CB
777 (commit commit)))
778 (file-name (git-file-name name version))
779 (sha256
780 (base32
7c1c42c4 781 "0hdyisfaf8yb55h3p03p4sbq19546mp9fy28f2kn659mycmhxqk4"))))
cf71edee
CB
782 (build-system go-build-system)
783 (arguments
784 '(#:import-path "github.com/nsf/termbox-go"))
785 (propagated-inputs
786 `(("go-github.com-mattn-go-runewidth"
787 ,go-github.com-mattn-go-runewidth)))
788 (synopsis "@code{termbox} provides a minimal API for text-based user
789interfaces")
790 (description
791 "Termbox is a library that provides a minimalistic API which allows the
792programmer to write text-based user interfaces.")
793 (home-page "https://github.com/nsf/termbox-go")
794 (license license:expat))))
795
cb3625bc
BL
796(define-public go-github-com-junegunn-fzf
797 (package
798 (name "go-github-com-junegunn-fzf")
d1058aeb 799 (version "0.25.0")
cb3625bc
BL
800 (source
801 (origin
802 (method git-fetch)
803 (uri (git-reference
804 (url "https://github.com/junegunn/fzf")
805 (commit version)))
806 (file-name (git-file-name name version))
807 (sha256
808 (base32
d1058aeb 809 "1j5bfxl4w8w3n89p051y8dhxg0py9l98v7r2gkr63bg4lj32faz8"))))
cb3625bc
BL
810 (build-system go-build-system)
811 (arguments
812 `(#:import-path "github.com/junegunn/fzf"))
813 (inputs
814 `(("go-github.com-mattn-go-runewidth" ,go-github.com-mattn-go-runewidth)
815 ("go-github-com-mattn-go-shellwords" ,go-github-com-mattn-go-shellwords)
816 ("go-github-com-mattn-go-isatty" ,go-github-com-mattn-go-isatty)
817 ("go-github-com-gdamore-tcell" ,go-github-com-gdamore-tcell)
250fec5d
H
818 ("go-github-com-saracen-walker" ,go-github-com-saracen-walker)
819 ("go-golang.org-x-sync-errgroup" ,go-golang.org-x-sync-errgroup)
561d391b 820 ("go-golang-org-x-crypto" ,go-golang-org-x-crypto)))
cb3625bc
BL
821 (home-page "https://github.com/junegunn/fzf")
822 (synopsis "Command-line fuzzy-finder")
823 (description "This package provides an interactive command-line filter
824usable with any list--including files, command history, processes and more.")
825 (license license:expat)))
826
f08a60bb
E
827(define-public fzf
828 (package
829 (inherit go-github-com-junegunn-fzf)
830 (name "fzf")
831 (arguments
832 (ensure-keyword-arguments
833 (package-arguments go-github-com-junegunn-fzf)
834 `(#:phases
835 (modify-phases %standard-phases
836 (add-after 'install 'copy-binaries
837 (lambda* (#:key outputs #:allow-other-keys)
838 (let ((out (assoc-ref outputs "out")))
839 (with-directory-excursion "src/github.com/junegunn/fzf"
840 (install-file "bin/fzf-tmux"
841 (string-append out "/bin"))))))
842 (add-after 'copy-binaries 'wrap-programs
843 (lambda* (#:key outputs inputs #:allow-other-keys)
844 (let ((out (assoc-ref outputs "out"))
845 (ncurses (assoc-ref inputs "ncurses")))
846 (wrap-program (string-append out "/bin/fzf-tmux")
847 `("PATH" ":" prefix (,(string-append ncurses "/bin")))))))
848 (add-after 'install 'install-completions
849 (lambda* (#:key outputs #:allow-other-keys)
850 (let* ((out (assoc-ref outputs "out"))
851 (bash-completion (string-append out "/etc/bash_completion.d"))
852 (zsh-completion (string-append out "/share/zsh/site-functions")))
853 (with-directory-excursion "src/github.com/junegunn/fzf"
854 (mkdir-p bash-completion)
855 (copy-file "shell/completion.bash"
856 (string-append bash-completion "/fzf"))
857 (mkdir-p zsh-completion)
858 (copy-file "shell/completion.zsh"
859 (string-append zsh-completion "/_fzf"))))))))))
860 (inputs
861 `(,@(package-inputs go-github-com-junegunn-fzf)
862 ("ncurses" ,ncurses)))))
863
f8ce6eb6
CB
864(define-public go-github.com-howeyc-gopass
865 (let ((commit "bf9dde6d0d2c004a008c27aaee91170c786f6db8")
866 (revision "0"))
867 (package
868 (name "go-github.com-howeyc-gopass")
869 (version (git-version "0.0.0" revision commit))
870 (source (origin
871 (method git-fetch)
872 (uri (git-reference
b0e7b699 873 (url "https://github.com/howeyc/gopass")
f8ce6eb6
CB
874 (commit commit)))
875 (file-name (git-file-name name version))
876 (sha256
877 (base32
878 "1jxzyfnqi0h1fzlsvlkn10bncic803bfhslyijcxk55mgh297g45"))))
879 (build-system go-build-system)
880 (arguments
881 '(#:import-path "github.com/howeyc/gopass"))
882 (propagated-inputs
561d391b
LF
883 `(("go-golang-org-x-crypto"
884 ,go-golang-org-x-crypto)))
f8ce6eb6
CB
885 (synopsis "Retrieve password from a terminal or piped input in Go")
886 (description
887 "@code{gopass} is a Go package for retrieving a password from user
888terminal or piped input.")
889 (home-page "https://github.com/howeyc/gopass")
890 (license license:isc))))
46ddcf4a
HG
891
892(define-public python-pyte
893 (package
894 (name "python-pyte")
895 (version "0.7.0")
896 (source
897 (origin
898 (method url-fetch)
899 (uri (pypi-uri "pyte" version))
900 (sha256
901 (base32
902 "1an54hvyjm8gncx8cgabz9mkpgjkdb0bkyjlkh7g7f94nr3wnfl7"))))
903 (build-system python-build-system)
904 (arguments
905 '(#:phases
906 (modify-phases %standard-phases
907 (add-after 'unpack 'remove-failing-test
908 ;; TODO: Reenable when the `captured` files required by this test
909 ;; are included in the archive.
910 (lambda _
911 (delete-file "tests/test_input_output.py")
912 #t)))))
913 (propagated-inputs
c695fb76 914 `(("python-wcwidth" ,python-wcwidth)))
46ddcf4a
HG
915 (native-inputs
916 `(("python-pytest-runner" ,python-pytest-runner)
917 ("python-pytest" ,python-pytest)))
918 (home-page "https://pyte.readthedocs.io/")
919 (synopsis "Simple VTXXX-compatible terminal emulator")
920 (description "@code{pyte} is an in-memory VTxxx-compatible terminal
921emulator. @var{VTxxx} stands for a series of video terminals, developed by
922DEC between 1970 and 1995. The first and probably most famous one was the
923VT100 terminal, which is now a de-facto standard for all virtual terminal
924emulators.
925
926pyte is a fork of vt102, which was an incomplete pure Python implementation
927of VT100 terminal.")
928 (license license:lgpl3+)))
929
930(define-public python2-pyte
931 (package-with-python2 python-pyte))
573450e6
HG
932
933(define-public python-blessings
934 (package
935 (name "python-blessings")
5076c13b 936 (version "1.7")
573450e6
HG
937 (source
938 (origin
939 (method url-fetch)
940 (uri (pypi-uri "blessings" version))
941 (sha256
942 (base32
5076c13b 943 "0z8mgkbmisxs10rz88qg46l1c9a8n08k8cy2iassal2zh16qbrcq"))))
573450e6
HG
944 (build-system python-build-system)
945 (arguments
d1efb11a 946 ;; FIXME: Test suite is unable to detect TTY conditions.
573450e6
HG
947 `(#:tests? #f))
948 (native-inputs
d1efb11a
BG
949 `(("python-nose" ,python-nose)
950 ("python-six" ,python-six)))
573450e6
HG
951 (home-page "https://github.com/erikrose/blessings")
952 (synopsis "Python module to manage terminal color, styling, and
953positioning")
954 (description "Blessings is a pythonic API to manipulate terminal color,
955styling, and positioning. It provides similar features to curses but avoids
956some of curses’s limitations: it does not require clearing the whole screen
957for little changes, provides a scroll-back buffer after the program exits, and
958avoids styling altogether when the output is redirected to something other
959than a terminal.")
960 (license license:expat)))
961
962(define-public python2-blessings
963 (package-with-python2 python-blessings))
e79a8424
HG
964
965(define-public python-curtsies
966 (package
967 (name "python-curtsies")
4e2a7cc1 968 (version "0.3.4")
e79a8424
HG
969 (source
970 (origin
971 (method url-fetch)
972 (uri (pypi-uri "curtsies" version))
973 (sha256
974 (base32
4e2a7cc1 975 "019bpf5wmng4f6ic2ykg893ypfihpfvzi6dhblcagfwbincl79ac"))))
e79a8424
HG
976 (build-system python-build-system)
977 (arguments
978 `(#:phases
979 (modify-phases %standard-phases
980 (replace 'check
981 (lambda _
982 (invoke "nosetests" "-v"))))))
983 (propagated-inputs
984 `(("python-blessings" ,python-blessings)
c695fb76 985 ("python-wcwidth" ,python-wcwidth)))
e79a8424
HG
986 (native-inputs
987 `(("python-mock" ,python-mock)
988 ("python-pyte" ,python-pyte)
989 ("python-nose" ,python-nose)))
4e2a7cc1 990 (home-page "https://github.com/bpython/curtsies")
e79a8424
HG
991 (synopsis "Library for curses-like terminal interaction with colored
992strings")
993 (description "Curtsies is a Python library for interacting with the
994terminal. It features string-like objects which carry formatting information,
995per-line fullscreen terminal rendering, and keyboard input event reporting.")
996 (license license:expat)))
997
40c1b61a
AI
998(define-public tmate
999 (package
1000 (name "tmate")
f71bce9b 1001 (version "2.4.0")
40c1b61a
AI
1002 (source
1003 (origin
82a0787c
RW
1004 (method git-fetch)
1005 (uri (git-reference
b0e7b699 1006 (url "https://github.com/tmate-io/tmate")
82a0787c
RW
1007 (commit version)))
1008 (file-name (git-file-name name version))
40c1b61a
AI
1009 (sha256
1010 (base32
f71bce9b 1011 "0x5c31yq7ansmiy20a0qf59wagba9v3pq97mlkxrqxn4n1gcc6vi"))))
40c1b61a
AI
1012 (build-system gnu-build-system)
1013 (inputs
1014 `(("libevent" ,libevent)
1015 ("libssh" ,libssh)
1016 ("msgpack" ,msgpack)
1017 ("ncurses" ,ncurses)))
1018 (native-inputs
1019 `(("autoconf" ,autoconf)
1020 ("automake" ,automake)
1021 ("pkg-config" ,pkg-config)))
1022 (home-page "https://tmate.io/")
1023 (synopsis "Terminal sharing application")
1024 (description "tmate is a terminal sharing application that allows you to
1025share your terminal with other users over the Internet. tmate is a fork of
1026tmux.")
1027 (license license:isc)))
b7ec276e
GH
1028
1029(define-public kitty
1030 (package
1031 (name "kitty")
58f02561 1032 (version "0.19.3")
b7ec276e
GH
1033 (home-page "https://sw.kovidgoyal.net/kitty/")
1034 (source
1035 (origin
1036 (method git-fetch)
1037 (uri (git-reference
b0e7b699 1038 (url "https://github.com/kovidgoyal/kitty")
b7ec276e
GH
1039 (commit (string-append "v" version))))
1040 (file-name (git-file-name name version))
1041 (sha256
58f02561 1042 (base32 "0r49bybqy6c0n1lz6yc85py80wb40w757m60f5rszjf200wnyl6s"))
b7ec276e
GH
1043 (modules '((guix build utils)))
1044 (snippet
1045 '(begin
1046 ;; patch needed as sphinx-build is used as a python script
1047 ;; whereas the guix package uses a bash script launching the
1048 ;; python script
1049 (substitute* "docs/conf.py"
1050 (("(from kitty.constants import str_version)" kitty-imp)
1051 (string-append "sys.path.append(\"..\")\n" kitty-imp)))
1052 (substitute* "docs/Makefile"
1053 (("^SPHINXBUILD[[:space:]]+= (python3.*)$")
1054 "SPHINXBUILD = sphinx-build\n"))
1055 #t))))
1056 (build-system gnu-build-system)
b7ec276e 1057 (native-inputs
db785b74
NG
1058 `(("libdbus" ,dbus)
1059 ("libgl1-mesa" ,mesa)
b7ec276e
GH
1060 ("libxcursor" ,libxcursor)
1061 ("libxi" ,libxi)
1062 ("libxinerama" ,libxinerama)
b7ec276e 1063 ("libxkbcommon" ,libxkbcommon)
db785b74 1064 ("libxrandr" ,libxrandr)
b7ec276e 1065 ("ncurses" ,ncurses) ;; for tic command
db785b74
NG
1066 ("pkg-config" ,pkg-config)
1067 ("sphinx" ,python-sphinx)
b7ec276e 1068 ("wayland-protocols" ,wayland-protocols)))
db785b74
NG
1069 (inputs
1070 `(("fontconfig" ,fontconfig)
1071 ("freetype" ,freetype)
1072 ("harfbuzz" ,harfbuzz)
1073 ("lcms" ,lcms)
1074 ("libcanberra" ,libcanberra)
1075 ("libpng" ,libpng)
1076 ("pygments" ,python-pygments)
1077 ("python" ,python-wrapper)
1078 ("wayland" ,wayland)
1079 ("zlib" ,zlib)))
b7ec276e
GH
1080 (arguments
1081 '(#:phases (modify-phases %standard-phases
153b279e 1082 (delete 'configure) ;no configure script
b7ec276e 1083 (replace 'build
153b279e
NG
1084 (lambda* (#:key inputs #:allow-other-keys)
1085 ;; The "kitty" sub-directory must be writable prior to
1086 ;; configuration (e.g., un-setting updates).
1087 (for-each make-file-writable (find-files "kitty"))
1088
1089 (invoke "python3" "setup.py" "linux-package"
1090 ;; Do not phone home.
1091 "--update-check-interval=0"
1092 ;; Wayland backend requires EGL, which isn't
1093 ;; found out-of-the-box for some reason.
1094 (string-append "--egl-library="
1095 (assoc-ref inputs "libgl1-mesa")
1096 "/lib/libEGL.so.1"))))
b7ec276e
GH
1097 (replace 'check
1098 (lambda _
153b279e
NG
1099 ;; Fix "cannot find kitty executable" error when running
1100 ;; tests.
1101 (setenv "PATH" (string-append "linux-package/bin:"
1102 (getenv "PATH")))
1103 (invoke "python3" "test.py")))
b7ec276e
GH
1104 (add-before 'install 'rm-pycache
1105 ;; created python cache __pycache__ are non deterministic
1106 (lambda _
1107 (let ((pycaches (find-files "linux-package/"
1108 "__pycache__"
1109 #:directories? #t)))
1110 (for-each delete-file-recursively pycaches)
1111 #t)))
1112 (replace 'install
1113 (lambda _
1114 (let* ((out (assoc-ref %outputs "out"))
1115 (obin (string-append out "/bin"))
1116 (olib (string-append out "/lib"))
1117 (oshare (string-append out "/share")))
1118 (copy-recursively "linux-package/bin" obin)
1119 (copy-recursively "linux-package/share" oshare)
1120 (copy-recursively "linux-package/lib" olib)
1121 #t))))))
1122 (synopsis "Fast, featureful, GPU based terminal emulator")
1123 (description "Kitty is a fast and featureful GPU-based terminal emulator:
1124@itemize
1125@item Offloads rendering to the GPU for lower system load and buttery smooth
1126scrolling. Uses threaded rendering to minimize input latency.
1127@item Supports all modern terminal features: graphics (images), unicode,
1128true-color, OpenType ligatures, mouse protocol, focus tracking, bracketed
1129paste and several new terminal protocol extensions.
1130@item Supports tiling multiple terminal windows side by side in different
1131layouts without needing to use an extra program like tmux.
1132@item Can be controlled from scripts or the shell prompt, even over SSH.
1133@item Has a framework for Kittens, small terminal programs that can be used to
1134extend kitty's functionality. For example, they are used for Unicode input,
1135hints, and side-by-side diff.
1136@item Supports startup sessions which allow you to specify the window/tab
1137layout, working directories and programs to run on startup.
1138@item Allows you to open the scrollback buffer in a separate window using
1139arbitrary programs of your choice. This is useful for browsing the history
1140comfortably in a pager or editor.
1141@end itemize")
1142 (license license:gpl3+)))
2206f236
EF
1143
1144(define-public eternalterminal
1145 (package
1146 (name "eternalterminal")
02312f7b 1147 (version "6.0.13")
2206f236
EF
1148 (source
1149 (origin
1150 (method git-fetch)
1151 (uri (git-reference
b0e7b699 1152 (url "https://github.com/MisterTea/EternalTerminal")
2206f236
EF
1153 (commit (string-append "et-v" version))))
1154 (file-name (git-file-name name version))
1155 (sha256
02312f7b 1156 (base32 "0sb1hypg2276y8c2a5vivrkcxp70swddvhnd9h273if3kv6j879r"))))
2206f236
EF
1157 (build-system cmake-build-system)
1158 (arguments
1159 '(#:configure-flags '("-DBUILD_TEST=ON")
1160 #:phases
1161 (modify-phases %standard-phases
1162 (add-after 'unpack 'insert-googletests
1163 (lambda* (#:key inputs #:allow-other-keys)
1164 (let ((tests (assoc-ref inputs "googletest")))
d5640c58 1165 (copy-recursively tests "external/googletest"))
2206f236
EF
1166 #t)))))
1167 (inputs
1168 `(("gflags" ,gflags)
1169 ("libsodium" ,libsodium)
1170 ("protobuf" ,protobuf)))
1171 (native-inputs
1172 `(("googletest" ,(package-source googletest))))
1173 (home-page "https://mistertea.github.io/EternalTerminal/")
1174 (synopsis "Remote shell that reconnects without interrupting the session")
1175 (description "@dfn{Eternal Terminal} (ET) is a remote shell that
1176automatically reconnects without interrupting the session. ET uses SSH to
1177initialize a secure connection. Unlike SSH sessions, which must be killed and
1178reconnected after a network outage an ET session will survive network outages
1179and IP roaming. ET provides the same core functionality as @command{mosh},
1180while also supporting native scrolling and @command{tmux} control mode
1181(@code{tmux -CC}).")
1182 (license license:asl2.0)))
f9948ab6 1183
435739ff 1184(define-public et
e16fbddf 1185 (deprecated-package "et" eternalterminal))
435739ff 1186
f9948ab6 1187(define-public wterm
1188 (package
1189 (name "wterm")
1190 (version "0.7")
1191 (source
1192 (origin
1193 (method git-fetch)
1194 (uri (git-reference
b0e7b699 1195 (url "https://github.com/majestrate/wterm")
f9948ab6 1196 (commit "0ae42717c08a85a6509214e881422c7fbe7ecc45")))
1197 (sha256
1198 (base32
1199 "0g4lzmc1w6na81i6hny32xds4xfig4xzswzfijyi6p93a1226dv0"))
1200 (file-name (git-file-name name version))))
1201 (build-system gnu-build-system)
1202 (native-inputs
1203 `(("pkg-config" ,pkg-config)))
1204 (inputs
1205 `(("fontconfig" ,fontconfig)
1206 ("freetype" ,freetype)
1207 ("libdrm" ,libdrm)
1208 ("libxkbcommon" ,libxkbcommon)
1209 ("ncurses" ,ncurses)
1210 ("pixman" ,pixman)
1211 ("wayland" ,wayland)))
1212 (arguments
1213 '(#:tests? #f
1214
1215 ;; Without -j1 it fails to find file libwld.a.
1216 #:parallel-build? #f
1217
1218 #:make-flags (list "CC=gcc"
1219 (string-append "PREFIX=" %output)
1220 (string-append "TERMINFO="
1221 (assoc-ref %outputs "out")
1222 "/share/terminfo"))
1223 #:phases
1224 (modify-phases %standard-phases
1225 (delete 'configure)
1226 (add-after 'unpack 'terminfo-fix
1227 (lambda _
1228 (substitute* "Makefile"
1229 (("\ttic .*") "\tmkdir -p $(SHARE_PREFIX)/share/terminfo
1230\ttic -o $(SHARE_PREFIX)/share/terminfo -s wterm.info\n"))
1231 #t)))))
1232 (native-search-paths
1233 (list (search-path-specification
1234 (variable "TERMINFO_DIRS")
1235 (files '("share/terminfo")))))
1236 (home-page "https://github.com/majestrate/wterm")
1237 (synopsis "Terminal emulator for Wayland")
1238 (description "wterm is a native Wayland terminal emulator based on
1239an st fork using wld. st is a simple terminal emulator for X originally
1240made by suckless.")
1241 (license license:x11)))
22e92800
VI
1242
1243(define-public alacritty
1244 (package
1245 (name "alacritty")
3e10f0ee 1246 (version "0.7.1")
22e92800
VI
1247 (source
1248 (origin
3e10f0ee
NG
1249 ;; XXX: The crate at "crates.io" has limited contents. In particular,
1250 ;; it does not contain "extra" directory with completions, icon, etc.
22e92800
VI
1251 (method git-fetch)
1252 (uri (git-reference
b0e7b699 1253 (url "https://github.com/jwilm/alacritty")
22e92800
VI
1254 (commit (string-append "v" version))))
1255 (file-name (git-file-name name version))
1256 (sha256
3e10f0ee 1257 (base32 "1b9hy3ya72hhpl8nkayc7dy4f97xp75np48dm5na5pgyv8b45agi"))))
22e92800
VI
1258 (build-system cargo-build-system)
1259 (arguments
e598556e
EF
1260 `(#:install-source? #f ; virtual manifest
1261 #:cargo-test-flags '("--release" "--" "--skip=config_read_eof")
3e10f0ee
NG
1262 #:cargo-inputs
1263 (("rust-alacritty-config-derive" ,rust-alacritty-config-derive-0.1)
1264 ("rust-alacritty-terminal" ,rust-alacritty-terminal-0.12)
3e10f0ee
NG
1265 ("rust-clap" ,rust-clap-2)
1266 ("rust-cocoa" ,rust-cocoa-0.24)
1267 ("rust-copypasta" ,rust-copypasta-0.7)
1268 ("rust-crossfont" ,rust-crossfont-0.2)
3e10f0ee
NG
1269 ("rust-embed-resource" ,rust-embed-resource-1)
1270 ("rust-fnv" ,rust-fnv-1)
1271 ("rust-gl-generator" ,rust-gl-generator-0.14)
1272 ;; XXX: Adjust `add-absolute-library-references' phase when updating
1273 ;; glutin input.
1274 ("rust-glutin" ,rust-glutin-0.26)
22e92800 1275 ("rust-log" ,rust-log-0.4)
3e10f0ee
NG
1276 ("rust-notify" ,rust-notify-4)
1277 ("rust-objc" ,rust-objc-0.2)
1278 ("rust-parking-lot" ,rust-parking-lot-0.11)
1279 ("rust-png" ,rust-png-0.16)
1280 ("rust-raw-window-handle" ,rust-raw-window-handle-0.3)
271161db 1281 ("rust-serde" ,rust-serde-1)
40908e02 1282 ("rust-serde-json" ,rust-serde-json-1)
3e10f0ee
NG
1283 ("rust-serde-yaml" ,rust-serde-yaml-0.8)
1284 ("rust-time" ,rust-time-0.1)
22e92800 1285 ("rust-urlocator" ,rust-urlocator-0.1)
3e10f0ee
NG
1286 ("rust-x11-dl" ,rust-x11-dl-2)
1287 ("rust-xdg" ,rust-xdg-2))
22e92800
VI
1288 #:phases
1289 (modify-phases %standard-phases
3bbe2806 1290 (add-after 'configure 'add-absolute-library-references
22e92800 1291 (lambda* (#:key inputs cargo-inputs vendor-dir #:allow-other-keys)
3e10f0ee
NG
1292 (let* ((glutin-name ,(package-name rust-glutin-0.26))
1293 (glutin-version ,(package-version rust-glutin-0.26))
3bbe2806
MB
1294 (glutin-api (string-append glutin-name "-" glutin-version
1295 ".tar.gz/src/api/"))
4390934f
TGR
1296 (smithay-client-toolkit-name
1297 ,(package-name rust-smithay-client-toolkit-0.12))
1298 (smithay-client-toolkit-version
1299 ,(package-version rust-smithay-client-toolkit-0.12))
1300 (smithay-client-toolkit-src
1301 (string-append smithay-client-toolkit-name "-"
1302 smithay-client-toolkit-version ".tar.gz/src"))
4390934f 1303 (libxkbcommon (assoc-ref inputs "libxkbcommon"))
22e92800 1304 (mesa (assoc-ref inputs "mesa")))
61a73c53
TGR
1305 ;; Fix dlopen()ing some libraries on pure Wayland (no $DISPLAY):
1306 ;; Failed to initialize any backend! Wayland status: NoWaylandLib
1307 ;; XXX We patch transitive dependencies that aren't even direct
1308 ;; inputs to this package, because of the way Guix's Rust build
1309 ;; system currently works. <http://issues.guix.gnu.org/46399>
1310 ;; might fix this and allow patching them directly.
4390934f
TGR
1311 (substitute* (string-append vendor-dir "/"
1312 smithay-client-toolkit-src
1313 "/seat/keyboard/ffi.rs")
1314 (("libxkbcommon\\.so")
1315 (string-append libxkbcommon "/lib/libxkbcommon.so")))
61a73c53
TGR
1316
1317 ;; Mesa is needed everywhere.
3e10f0ee
NG
1318 (substitute*
1319 (string-append vendor-dir "/" glutin-api "glx/mod.rs")
1320 (("libGL.so") (string-append mesa "/lib/libGL.so")))
1321 (substitute*
1322 (string-append vendor-dir "/" glutin-api "egl/mod.rs")
1323 (("libEGL.so") (string-append mesa "/lib/libEGL.so")))
1324 #t)))
22e92800 1325 (replace 'install
3e10f0ee 1326 ;; Upstream install script only takes care of executable.
22e92800
VI
1327 (lambda* (#:key inputs outputs #:allow-other-keys)
1328 (let* ((out (assoc-ref outputs "out"))
ec36caf5 1329 (bin (string-append out "/bin"))
22e92800
VI
1330 (share (string-append out "/share"))
1331 (icons (string-append share "/icons/hicolor/scalable/apps"))
1332 (tic (string-append (assoc-ref inputs "ncurses") "/bin/tic"))
1333 (man (string-append share "/man/man1"))
1334 (alacritty-bin "target/release/alacritty"))
3bbe2806 1335 ;; Install the executable.
ec36caf5 1336 (install-file alacritty-bin bin)
ec36caf5 1337 ;; Install man pages.
22e92800
VI
1338 (mkdir-p man)
1339 (copy-file "extra/alacritty.man"
1340 (string-append man "/alacritty.1"))
ec36caf5 1341 ;; Install desktop file.
3e10f0ee 1342 (install-file "extra/linux/Alacritty.desktop"
22e92800 1343 (string-append share "/applications"))
3e10f0ee 1344 ;; Install icon.
22e92800
VI
1345 (mkdir-p icons)
1346 (copy-file "extra/logo/alacritty-term.svg"
1347 (string-append icons "/Alacritty.svg"))
ec36caf5 1348 ;; Install terminfo.
22e92800
VI
1349 (mkdir-p (string-append share "/terminfo"))
1350 ;; We don't compile alacritty-common entry because
1351 ;; it's being used only for inheritance.
1352 (invoke tic "-x" "-e" "alacritty,alacritty-direct"
1353 "-o" (string-append share "/terminfo/")
1354 "extra/alacritty.info")
ec36caf5 1355 ;; Install completions.
3e10f0ee
NG
1356 (install-file "extra/completions/alacritty.bash"
1357 (string-append out "/etc/bash_completion.d"))
1358 (install-file "extra/completions/_alacritty"
1359 (string-append share "/zsh/site-functions"))
1360 (install-file "extra/completions/alacritty.fish"
1361 (string-append share "/fish/vendor_completions.d"))
22e92800 1362 #t))))))
3e10f0ee
NG
1363 (native-inputs
1364 `(("cmake" ,cmake)
1365 ("ncurses" ,ncurses)
1366 ("pkg-config" ,pkg-config)
1367 ("python3" ,python)))
22e92800
VI
1368 (inputs
1369 `(("expat" ,expat)
1370 ("fontconfig" ,fontconfig)
1371 ("freetype" ,freetype)
1372 ("libx11" ,libx11)
1373 ("libxcb" ,libxcb)
1374 ("libxcursor" ,libxcursor)
1375 ("libxi" ,libxi)
1376 ("libxkbcommon" ,libxkbcommon)
1377 ("libxrandr" ,libxrandr)
1378 ("libxxf86vm" ,libxxf86vm)
f69a3fe2 1379 ("mesa" ,mesa)
4ce712ac
EF
1380 ("rust-bitflags" ,rust-bitflags-1)
1381 ("rust-dirs" ,rust-dirs-2)
1382 ("rust-libc" ,rust-libc-0.2)
1383 ("rust-unicode-width" ,rust-unicode-width-0.1)
f69a3fe2 1384 ("rust-wayland-client" ,rust-wayland-client-0.28)
4ce712ac 1385 ("rust-winapi" ,rust-winapi-0.3)
f69a3fe2 1386 ("wayland" ,wayland)))
9b390921
F
1387 (native-search-paths
1388 ;; FIXME: This should only be located in 'ncurses'. Nonetheless it is
1389 ;; provided for usability reasons. See <https://bugs.gnu.org/22138>.
1390 (list (search-path-specification
1391 (variable "TERMINFO_DIRS")
1392 (files '("share/terminfo")))))
22e92800
VI
1393 (home-page "https://github.com/alacritty/alacritty")
1394 (synopsis "GPU-accelerated terminal emulator")
1395 (description
1396 "Alacritty is a GPU-accelerated terminal emulator with a strong focus on
1397simplicity and performance. With such a strong focus on performance, included
1398features are carefully considered and you can always expect Alacritty to be
1399blazingly fast. By making sane choices for defaults, Alacritty requires no
1400additional setup. However, it does allow configuration of many aspects of the
1401terminal. Note that you need support for OpenGL 3.2 or higher.")
1402 (license license:asl2.0)))
9bbb4fa1
LF
1403
1404(define-public bootterm
1405 (package
1406 (name "bootterm")
1bab5520 1407 (version "0.4")
9bbb4fa1
LF
1408 (source (origin
1409 (method git-fetch)
1410 (uri (git-reference
1411 (url "https://github.com/wtarreau/bootterm")
1412 (commit (string-append "v" version))))
1413 (file-name (git-file-name name version))
1414 (sha256
1415 (base32
1bab5520 1416 "1k3jacld98za41dbpr10sjms77hrw91sb10m0cnwv3h7aifiwmrs"))))
9bbb4fa1
LF
1417 (build-system gnu-build-system)
1418 (arguments
1419 `(#:tests? #f ; no test suite
1420 #:make-flags (list (string-append "CC=" ,(cc-for-target))
1421 (string-append "PREFIX=" (assoc-ref %outputs "out")))
1422 #:phases
1423 (modify-phases %standard-phases
1424 ;; No ./configure script
1425 (delete 'configure)
1426 (add-after 'install 'install-doc
1427 (lambda* (#:key outputs #:allow-other-keys)
1428 (let* ((out (assoc-ref outputs "out"))
1429 (doc (string-append out "/share/doc/" ,name "-" ,version)))
1430 (install-file "README.md" doc)
1431 #t))))))
1432 (home-page "https://github.com/wtarreau/bootterm")
1433 (synopsis "Serial terminal")
1434 (description "Bootterm is a terminal designed to ease connection to
1435ephemeral serial ports. It features automatic port detection, port enumeration,
1436support for non-standard baud rates, the ability to wait for ports to appear,
1437and the ability to read and write via stdin and stdout.")
1438 (license license:expat)))