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