gnu: sakura: Update to 3.6.0.
[jackhill/guix/guix.git] / gnu / packages / terminals.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2015, 2016, 2017, 2018 Efraim Flashner <efraim@flashner.co.il>
3 ;;; Copyright © 2016 Mckinley Olsen <mck.olsen@gmail.com>
4 ;;; Copyright © 2016, 2017 Alex Griffin <a@ajgrf.com>
5 ;;; Copyright © 2016 David Craven <david@craven.ch>
6 ;;; Copyright © 2016, 2017 Ludovic Courtès <ludo@gnu.org>
7 ;;; Copyright © 2016, 2017 José Miguel Sánchez García <jmi2k@openmailbox.org>
8 ;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice <me@tobias.gr>
9 ;;; Copyright © 2017 Kei Kebreau <kkebreau@posteo.net>
10 ;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net>
11 ;;; Copyright © 2017 Petter <petter@mykolab.ch>
12 ;;; Copyright © 2018 Hartmut Goebel <h.goebel@crazy-compilers.com>
13 ;;;
14 ;;; This file is part of GNU Guix.
15 ;;;
16 ;;; GNU Guix is free software; you can redistribute it and/or modify it
17 ;;; under the terms of the GNU General Public License as published by
18 ;;; the Free Software Foundation; either version 3 of the License, or (at
19 ;;; your option) any later version.
20 ;;;
21 ;;; GNU Guix is distributed in the hope that it will be useful, but
22 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
23 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 ;;; GNU General Public License for more details.
25 ;;;
26 ;;; You should have received a copy of the GNU General Public License
27 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
28
29 (define-module (gnu packages terminals)
30 #:use-module ((guix licenses) #:prefix license:)
31 #:use-module (guix build utils)
32 #:use-module (guix build-system cmake)
33 #:use-module (guix build-system gnu)
34 #:use-module (guix build-system glib-or-gtk)
35 #:use-module (guix build-system go)
36 #:use-module (guix build-system python)
37 #:use-module (guix download)
38 #:use-module (guix git-download)
39 #:use-module (guix packages)
40 #:use-module (gnu packages)
41 #:use-module (gnu packages autotools)
42 #:use-module (gnu packages check)
43 #:use-module (gnu packages docbook)
44 #:use-module (gnu packages freedesktop)
45 #:use-module (gnu packages gettext)
46 #:use-module (gnu packages gl)
47 #:use-module (gnu packages glib)
48 #:use-module (gnu packages gnome)
49 #:use-module (gnu packages gtk)
50 #:use-module (gnu packages linux)
51 #:use-module (gnu packages ncurses)
52 #:use-module (gnu packages perl)
53 #:use-module (gnu packages perl-check)
54 #:use-module (gnu packages pkg-config)
55 #:use-module (gnu packages python)
56 #:use-module (gnu packages python-web)
57 #:use-module (gnu packages qt)
58 #:use-module (gnu packages textutils)
59 #:use-module (gnu packages wm)
60 #:use-module (gnu packages xdisorg)
61 #:use-module (gnu packages xml)
62 #:use-module (gnu packages xorg)
63 #:use-module (srfi srfi-26))
64
65 (define-public tilda
66 (package
67 (name "tilda")
68 (version "1.4.1")
69 (source (origin
70 (method url-fetch)
71 (uri (string-append "https://github.com/lanoxx/tilda/archive/"
72 "tilda-" version ".tar.gz"))
73 (sha256
74 (base32
75 "0w2hry2bqcqrkik4l100b1a9jlsih6sq8zwhfpl8zzfq20i00lfs"))))
76 (build-system glib-or-gtk-build-system)
77 (arguments
78 '(#:phases (modify-phases %standard-phases
79 (add-before 'patch-source-shebangs 'bootstrap
80 (lambda _
81 (setenv "NOCONFIGURE" "true")
82 (invoke "sh" "autogen.sh"))))))
83 (native-inputs
84 `(("autoconf" ,autoconf)
85 ("automake" ,automake)
86 ("gettext" ,gettext-minimal)
87 ("pkg-config" ,pkg-config)))
88 (inputs
89 `(("libconfuse" ,libconfuse)
90 ("vte" ,vte)))
91 (synopsis "GTK+-based drop-down terminal")
92 (description "Tilda is a terminal emulator similar to normal terminals like
93 gnome-terminal (GNOME) or Konsole (KDE), with the difference that it drops down
94 from the edge of a screen when a certain configurable hotkey is pressed. This
95 is similar to the built-in consoles in some applications. Tilda is highly
96 configurable through a graphical wizard.")
97 (home-page "https://github.com/lanoxx/tilda")
98 (license license:gpl2+)))
99
100 (define-public termite
101 (package
102 (name "termite")
103 (version "13")
104 (source
105 (origin
106 (method git-fetch)
107 (uri (git-reference
108 (url (string-append "https://github.com/thestinger/"
109 name ".git"))
110 (commit (string-append "v" version))
111 (recursive? #t)))
112 (file-name (string-append name "-" version "-checkout"))
113 (sha256
114 (base32
115 "02cn70ygl93ghhkhs3xdxn5b1yadc255v3yp8cmhhyzsv5027hvj"))))
116 (build-system gnu-build-system)
117 (arguments
118 `(#:phases
119 (modify-phases %standard-phases
120 (delete 'configure))
121 #:tests? #f
122 ;; This sets the destination when installing the necessary terminal
123 ;; capability data, which are not provided by 'ncurses'. See
124 ;; <https://lists.gnu.org/archive/html/bug-ncurses/2009-10/msg00031.html>.
125 #:make-flags (list "PREFIX="
126 (string-append "VERSION=v" (version))
127 (string-append "DESTDIR="
128 (assoc-ref %outputs "out")))))
129 (inputs
130 `(("vte" ,vte-ng)
131 ("gtk+" ,gtk+)
132 ("ncurses" ,ncurses)))
133 (native-inputs
134 `(("pkg-config" ,pkg-config)))
135
136 ;; FIXME: This should only be located in 'ncurses'. Nonetheless it is
137 ;; provided for usability reasons. See <https://bugs.gnu.org/22138>.
138 (native-search-paths
139 (list (search-path-specification
140 (variable "TERMINFO_DIRS")
141 (files '("share/terminfo")))))
142 (home-page "https://github.com/thestinger/termite/")
143 (synopsis "Keyboard-centric, VTE-based terminal")
144 (description "Termite is a minimal terminal emulator designed for use with
145 tiling window managers. It is a modal application, similar to Vim, with an
146 insert mode and command mode where keybindings have different functions.")
147
148 ;; Files under util/ are under the Expat license; the rest is LGPLv2+.
149 (license license:lgpl2.0+)))
150
151 (define-public asciinema
152 (package
153 (name "asciinema")
154 (version "1.4.0")
155 (source
156 (origin
157 (method url-fetch)
158 (uri (pypi-uri "asciinema" version))
159 (sha256
160 (base32
161 "1jrf8c8711gkdilmvyv3d37kp8xfvdc5cqighw5k92a6g9z4acgv"))))
162 (build-system python-build-system)
163 (arguments
164 `(#:phases
165 (modify-phases %standard-phases
166 (add-before 'build 'patch-exec-paths
167 (lambda* (#:key inputs #:allow-other-keys)
168 (let ((ncurses (assoc-ref inputs "ncurses")))
169 (substitute* "asciinema/recorder.py"
170 (("'tput'")
171 (string-append "'" ncurses "/bin/tput'"))))
172 #t)))))
173 (inputs `(("ncurses" ,ncurses)))
174 (native-inputs
175 ;; For tests.
176 `(("python-requests" ,python-requests)))
177 (home-page "https://asciinema.org")
178 (synopsis "Terminal session recorder")
179 (description
180 "Use asciinema to record and share your terminal sessions, the right way.
181 Forget screen recording apps and blurry video. Enjoy a lightweight, purely
182 text-based approach to terminal recording.")
183 (license license:gpl3)))
184
185 (define-public libtsm
186 (package
187 (name "libtsm")
188 (version "3")
189 (source (origin
190 (method url-fetch)
191 (uri (string-append
192 "https://freedesktop.org/software/kmscon/releases/"
193 "libtsm-" version ".tar.xz"))
194 (sha256
195 (base32
196 "01ygwrsxfii0pngfikgqsb4fxp8n1bbs47l7hck81h9b9bc1ah8i"))))
197 (build-system gnu-build-system)
198 (native-inputs
199 `(("pkg-config" ,pkg-config)))
200 (inputs
201 `(("libxkbcommon" ,libxkbcommon)))
202 (synopsis "Xterm state machine library")
203 (description "TSM is a state machine for DEC VT100-VT520 compatible
204 terminal emulators. It tries to support all common standards while keeping
205 compatibility to existing emulators like xterm, gnome-terminal, konsole, etc.")
206 (home-page "https://www.freedesktop.org/wiki/Software/libtsm")
207 ;; Hash table implementation is lgpl2.1+ licensed.
208 ;; The wcwidth implementation in external/wcwidth.{h,c} uses a license
209 ;; derived from ISC.
210 ;; UCS-4 to UTF-8 encoding is copied from "terminology" which is released
211 ;; under the bsd 2 license.
212 (license (list license:expat license:lgpl2.1+ license:isc license:bsd-2))))
213
214 (define-public kmscon
215 (package
216 (name "kmscon")
217 (version "8")
218 (source (origin
219 (method url-fetch)
220 (uri (string-append
221 "https://freedesktop.org/software/kmscon/releases/"
222 "kmscon-" version ".tar.xz"))
223 (sha256
224 (base32
225 "0axfwrp3c8f4gb67ap2sqnkn75idpiw09s35wwn6kgagvhf1rc0a"))
226 (modules '((guix build utils)))
227 (snippet
228 ;; Use elogind instead of systemd.
229 '(begin
230 (substitute* "configure"
231 (("libsystemd-daemon libsystemd-login")
232 "libelogind"))
233 (substitute* "src/uterm_systemd.c"
234 (("#include <systemd/sd-login.h>")
235 "#include <elogind/sd-login.h>")
236 ;; We don't have this header.
237 (("#include <systemd/sd-daemon\\.h>")
238 "")
239 ;; Replace the call to 'sd_booted' by the truth value.
240 (("sd_booted\\(\\)")
241 "1"))))))
242 (build-system gnu-build-system)
243 (native-inputs
244 `(("pkg-config" ,pkg-config)
245 ("libxslt" ,libxslt) ;to build the man page
246 ("libxml2" ,libxml2) ;for XML_CATALOG_FILES
247 ("docbook-xsl" ,docbook-xsl)))
248 (inputs
249 `(("libdrm" ,libdrm)
250 ("libtsm" ,libtsm)
251 ("libxkbcommon" ,libxkbcommon)
252 ("logind" ,elogind)
253 ("mesa" ,mesa)
254 ("pango" ,pango)
255 ("udev" ,eudev)))
256 (synopsis "Linux KMS-based terminal emulator")
257 (description "Kmscon is a terminal emulator based on Linux's @dfn{kernel
258 mode setting} (KMS). It can replace the in-kernel virtual terminal (VT)
259 implementation with a user-space console. Compared to the Linux console,
260 kmscon provides enhanced features including XKB-compatible internationalized
261 keyboard support, UTF-8 input/font support, hardware-accelerated rendering,
262 multi-seat support, a replacement for @command{mingetty}, and more.")
263 (home-page "https://www.freedesktop.org/wiki/Software/kmscon")
264 ;; Hash table implementation is lgpl2.1+ licensed.
265 ;; The wcwidth implementation in external/wcwidth.{h,c} uses a license
266 ;; derived from ISC.
267 ;; UCS-4 to UTF-8 encoding is copied from "terminology" which is released
268 ;; under the bsd 2 license.
269 ;; Unifont-Font is from http://unifoundry.com/unifont.html and licensed
270 ;; under the terms of the GNU GPL.
271 (license (list license:expat license:lgpl2.1+ license:bsd-2
272 license:gpl2+))
273 (supported-systems (filter (cut string-suffix? "-linux" <>)
274 %supported-systems))))
275
276 (define-public libtermkey
277 (package
278 (name "libtermkey")
279 (version "0.20")
280 (source (origin
281 (method url-fetch)
282 (uri (string-append "http://www.leonerd.org.uk/code/"
283 name "/" name "-" version ".tar.gz"))
284 (sha256
285 (base32 "1xfj6lchhfljmbcl6dz8dpakppyy13nbl4ykxiv5x4dr9b4qf3bc"))))
286 (build-system gnu-build-system)
287 (arguments
288 '(#:make-flags (list
289 "CC=gcc"
290 (string-append "PREFIX=" (assoc-ref %outputs "out")))
291 #:phases (modify-phases %standard-phases
292 (delete 'configure))
293 #:test-target "test"))
294 (inputs `(("ncurses" ,ncurses)))
295 (native-inputs `(("libtool" ,libtool)
296 ("perl-test-harness" ,perl-test-harness)
297 ("pkg-config" ,pkg-config)))
298 (synopsis "Keyboard entry processing library for terminal-based programs")
299 (description
300 "Libtermkey handles all the necessary logic to recognise special keys, UTF-8
301 combining, and so on, with a simple interface.")
302 (home-page "http://www.leonerd.org.uk/code/libtermkey")
303 (license license:expat)))
304
305 (define-public picocom
306 (package
307 (name "picocom")
308 (version "2.2")
309 (source (origin
310 (method url-fetch)
311 (uri (string-append
312 "https://github.com/npat-efault/picocom"
313 "/archive/" version ".tar.gz"))
314 (file-name (string-append name "-" version ".tar.gz"))
315 (sha256
316 (base32
317 "1knl6dglnrynx1fhy21nylw56i1q3dkizkgxzkq42mb7ilah8f9y"))))
318 (build-system gnu-build-system)
319 (arguments
320 `(#:make-flags '("CC=gcc")
321 #:tests? #f ; No tests
322 #:phases
323 (modify-phases %standard-phases
324 (delete 'configure)
325 (replace 'install
326 (lambda* (#:key outputs #:allow-other-keys)
327 (let* ((out (assoc-ref outputs "out"))
328 (bin (string-append out "/bin"))
329 (man (string-append out "/share/man/man1")))
330 (install-file "picocom" bin)
331 (install-file "picocom.1" man)))))))
332 (home-page "https://github.com/npat-efault/picocom")
333 (synopsis "Minimal dumb-terminal emulation program")
334 (description "It was designed to serve as a simple, manual, modem
335 configuration, testing, and debugging tool. It has also serves well
336 as a low-tech serial communications program to allow access to all
337 types of devices that provide serial consoles.")
338 (license license:gpl2+)))
339
340 (define-public beep
341 (package
342 (name "beep")
343 (version "1.3")
344 (source (origin
345 (method url-fetch)
346 (uri (string-append "http://www.johnath.com/" name "/"
347 name "-" version ".tar.gz"))
348 (sha256
349 (base32
350 "0bgch6jq5cahakk3kbr9549iysf2dik09afixxy5brbxk1xfzb2r"))))
351 (build-system gnu-build-system)
352 (arguments
353 `(#:tests? #f ; no tests.
354 #:phases
355 (modify-phases %standard-phases
356 (delete 'configure)
357 (add-after 'unpack 'patch-makefile
358 (lambda* (#:key outputs #:allow-other-keys)
359 (substitute* "Makefile" (("/usr") (assoc-ref outputs "out")))
360 #t))
361 (add-before 'install 'create-output-directories
362 (lambda* (#:key outputs #:allow-other-keys)
363 (let ((out (assoc-ref %outputs "out")))
364 (mkdir-p (string-append out "/bin"))
365 (mkdir-p (string-append out "/man/man1"))))))))
366 (synopsis "Linux command-line utility to control the PC speaker")
367 (description "beep allows the user to control the PC speaker with precision,
368 allowing different sounds to indicate different events. While it can be run
369 quite happily on the command line, its intended place of residence is within
370 scripts, notifying the user when something interesting occurs. Of course, it
371 has no notion of what's interesing, but it's very good at that notifying part.")
372 (home-page "http://www.johnath.com/beep")
373 (license license:gpl2+)))
374
375 (define-public unibilium
376 (package
377 (name "unibilium")
378 (version "1.2.1")
379 (source
380 (origin
381 (method url-fetch)
382 (uri (string-append "https://github.com/mauke/unibilium/"
383 "archive/v" version ".tar.gz"))
384 (file-name (string-append name "-" version ".tar.gz"))
385 (sha256
386 (base32
387 "1hbf011d8nzsp7c96fidjiq8yw8zlxf6f1s050ii2yyampvb8ib0"))))
388 (build-system gnu-build-system)
389 (arguments
390 `(#:make-flags
391 (list "CC=gcc"
392 (string-append "PREFIX=" (assoc-ref %outputs "out")))
393 #:test-target "test"
394 ;; FIXME: tests require "prove"
395 #:tests? #f
396 #:phases
397 (modify-phases %standard-phases
398 (delete 'configure))))
399 (native-inputs
400 `(("libtool" ,libtool)))
401 (home-page "https://github.com/mauke/unibilium")
402 (synopsis "Terminfo parsing library")
403 (description "Unibilium is a basic C terminfo library. It doesn't depend
404 on curses or any other library. It also doesn't use global variables, so it
405 should be thread-safe.")
406 (license license:lgpl3+)))
407
408 (define-public libvterm
409 (package
410 (name "libvterm")
411 (version "0+bzr681")
412 (source
413 (origin
414 (method url-fetch)
415 (uri (string-append "http://www.leonerd.org.uk/code/libvterm/"
416 "libvterm-" version ".tar.gz"))
417 (sha256
418 (base32
419 "1s56c8p1qz6frkcri0hg4qyydv2wcccj6n2xmz1dwcdqn38ldsmb"))))
420 (build-system gnu-build-system)
421 (arguments
422 `(#:make-flags
423 (list "CC=gcc"
424 (string-append "PREFIX=" (assoc-ref %outputs "out")))
425 #:test-target "test"
426 #:phases
427 (modify-phases %standard-phases
428 (delete 'configure))))
429 (native-inputs
430 `(("libtool" ,libtool)
431 ("perl" ,perl)))
432 (home-page "http://www.leonerd.org.uk/code/libvterm/")
433 (synopsis "VT220/xterm/ECMA-48 terminal emulator library")
434 (description "Libvterm is an abstract C99 library which implements a VT220
435 or xterm-like terminal emulator. It doesn't use any particular graphics
436 toolkit or output system, instead it invokes callback function pointers that
437 its embedding program should provide it to draw on its behalf. It avoids
438 calling @code{malloc} during normal running state, allowing it to be used in
439 embedded kernel situations.")
440 (license license:expat)))
441
442 (define-public cool-retro-term
443 (let ((commit "dd799cf5c0eda92cf44f3938c0c2dcae5651a99e")
444 (revision "1"))
445 (package
446 (name "cool-retro-term")
447 (version (string-append "1.0.1-" revision "." (string-take commit 7)))
448 (source (origin
449 (method git-fetch)
450 (file-name (string-append name "-" version "-checkout"))
451 (uri (git-reference
452 (url (string-append "https://github.com/Swordfish90/" name))
453 (commit commit)
454 (recursive? #t)))
455 (sha256
456 (base32 "08mrvj8zk9ck15q90ipjzza1acnnsjhprv2rxg8yyck0xl9p40jd"))
457 (patches
458 (search-patches "cool-retro-term-fix-array-size.patch"
459 "cool-retro-term-dont-check-uninit-member.patch"
460 "cool-retro-term-memory-leak-1.patch"))
461 (modules '((guix build utils)
462 (srfi srfi-1)
463 (srfi srfi-26)
464 (ice-9 rdelim)
465 (ice-9 regex)))
466 (snippet
467 '(let* ((fonts '(;"1971-ibm-3278" ; BSD 3-clause
468 ;"1975-knight-tv" ; GPL
469 "1977-apple2" ; Non-Free
470 "1977-commodore-pet" ; Non-Free
471 "1979-atari-400-800" ; Non-Free
472 "1982-commodore64" ; Non-Free
473 "1985-atari-st" ; ?
474 "1985-ibm-pc-vga" ; Unclear
475 ;"modern-fixedsys-excelsior" ; Redistributable
476 ;"modern-hermit" ; SIL
477 ;"modern-inconsolata"; SIL
478 ;"modern-pro-font-win-tweaked" ; X11
479 ;"modern-proggy-tiny"; X11
480 ;"modern-terminus" ; SIL
481 "modern-monaco")) ; Apple Non-Free
482 (name-rx (make-regexp " *name: *\"([^\"]*)\""))
483 (source-rx (make-regexp " *source: \"fonts/([^/]*)[^\"]*\""))
484 (fontname-rx (make-regexp "\"fontName\":\"([^\"]*).*"))
485 (names
486 ;; Gather font names from all Fonts*.qml files.
487 ;; These will be used to remove items from the
488 ;; default profiles.
489 (fold
490 (lambda (font-file names)
491 (call-with-input-file font-file
492 (lambda (port)
493 (let loop ((name #f) (names names))
494 (let ((line (read-line port)))
495 (cond
496 ((eof-object? line) (pk 'names names))
497 ((regexp-exec name-rx line)
498 => (lambda (m)
499 (loop (match:substring m 1) names)))
500 ((regexp-exec source-rx line)
501 => (lambda (m)
502 (let ((font (match:substring m 1)))
503 (if (member font fonts)
504 (loop #f (lset-adjoin string=?
505 names name))
506 (loop #f names)))))
507 (else (loop name names))))))))
508 '() (find-files "app/qml" "Font.*\\.qml"))))
509 ;; Remove the font files themselves
510 (for-each (lambda (font)
511 (delete-file-recursively
512 (string-append "app/qml/fonts/" font)))
513 fonts)
514 ;; Remove mention of those fonts in the source
515 (substitute* "app/qml/resources.qrc"
516 (((string-append " *<file>fonts/("
517 (string-join fonts "|")
518 ").*"))
519 ""))
520 (for-each
521 (lambda (file)
522 (let ((start-rx (make-regexp " *ListElement\\{"))
523 (end-rx (make-regexp " *\\}")))
524 (with-atomic-file-replacement file
525 (lambda (in out)
526 (let loop ((line-buffer '())
527 (hold? #f)
528 (discard? #f))
529 (let ((line (read-line in 'concat)))
530 (cond
531 ((eof-object? line) #t) ;done
532 ((regexp-exec start-rx line)
533 (loop (cons line line-buffer) #t #f))
534 ((or (regexp-exec source-rx line)
535 (regexp-exec fontname-rx line))
536 => (lambda (m)
537 (let ((font-or-name (match:substring m 1)))
538 (if (or (member font-or-name fonts)
539 (member font-or-name names))
540 (loop '() #f #t)
541 (loop (cons line line-buffer)
542 hold? #f)))))
543 ((regexp-exec end-rx line)
544 (unless discard?
545 (for-each (cut display <> out)
546 (reverse line-buffer))
547 (display line out))
548 (loop '() #f #f))
549 (hold? (loop (cons line line-buffer)
550 hold? discard?))
551 (discard? (loop line-buffer #f #t))
552 (else (display line out)
553 (loop '() #f #f)))))))))
554 '("app/qml/FontPixels.qml"
555 "app/qml/FontScanlines.qml"
556 "app/qml/Fonts.qml"
557 "app/qml/ApplicationSettings.qml"))
558 ;; Final substitution for default scanline and pixel fonts
559 (substitute* "app/qml/ApplicationSettings.qml"
560 (("COMMODORE_PET") "PROGGY_TINY"))))))
561 (build-system gnu-build-system)
562 (inputs
563 `(("qtbase" ,qtbase)
564 ("qtdeclarative" ,qtdeclarative)
565 ("qtgraphicaleffects" ,qtgraphicaleffects)
566 ("qtquickcontrols" ,qtquickcontrols)))
567 (arguments
568 `(#:phases
569 (modify-phases %standard-phases
570 (replace 'configure
571 (lambda* (#:key outputs #:allow-other-keys)
572 (let ((out (assoc-ref outputs "out")))
573 (substitute* '("qmltermwidget/qmltermwidget.pro")
574 (("INSTALL_DIR = \\$\\$\\[QT_INSTALL_QML\\]")
575 (string-append "INSTALL_DIR = " out "/lib/qt5/qml")))
576 (substitute* '("cool-retro-term.pro" "app/app.pro")
577 (("/usr") out))
578 (invoke "qmake"))))
579 (add-after 'install 'wrap-executable
580 (lambda* (#:key inputs outputs #:allow-other-keys)
581 (let ((out (assoc-ref outputs "out"))
582 (qml "/lib/qt5/qml"))
583 (wrap-program (string-append out "/bin/cool-retro-term")
584 `("QML2_IMPORT_PATH" ":" prefix
585 (,(string-append out qml)
586 ,@(map (lambda (i)
587 (string-append (assoc-ref inputs i) qml))
588 '("qtdeclarative"
589 "qtgraphicaleffects"
590 "qtquickcontrols")))))
591 #t)))
592 (add-after 'install 'add-alternate-name
593 (lambda* (#:key outputs #:allow-other-keys)
594 (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
595 (symlink (string-append bin "/cool-retro-term")
596 (string-append bin "/crt")))))
597 (add-after 'install 'install-man
598 (lambda* (#:key outputs #:allow-other-keys)
599 (let ((mandir (string-append (assoc-ref outputs "out")
600 "/share/man/man1")))
601 (install-file "packaging/debian/cool-retro-term.1" mandir)
602 #t))))))
603 (synopsis "Terminal emulator")
604 (description
605 "Cool-retro-term (crt) is a terminal emulator which mimics the look and
606 feel of the old cathode ray tube (CRT) screens. It has been designed to be
607 eye-candy, customizable, and reasonably lightweight.")
608 (home-page "https://github.com/Swordfish90/cool-retro-term")
609 (license (list
610 license:gpl2+ ; qmltermwidget
611 license:gpl3+ ; cool-retro-term
612 ;; Fonts
613 license:silofl1.1
614 license:x11
615 license:bsd-3)))))
616
617 (define-public sakura
618 (package
619 (name "sakura")
620 (version "3.6.0")
621 (source (origin
622 (method url-fetch)
623 (uri (string-append "https://launchpad.net/" name "/trunk/"
624 version "/+download/" name "-" version
625 ".tar.bz2"))
626 (sha256
627 (base32
628 "1q463qm41ym7jb3kbzjz7b6x549vmgkb70arpkhsf86yxly1y5m1"))))
629 (build-system cmake-build-system)
630 (arguments
631 '(#:tests? #f)) ; no check phase
632 (native-inputs
633 `(("gettext" ,gettext-minimal)
634 ("perl" ,perl) ; for pod2man
635 ("pkg-config" ,pkg-config)))
636 (inputs
637 `(("libxft" ,libxft)
638 ("vte" ,vte)))
639 (home-page "https://launchpad.net/sakura")
640 (synopsis "A simple but powerful libvte-based terminal emulator")
641 (description "@code{Sakura} is a terminal emulator based on GTK+ and VTE.
642 It's a terminal emulator with few dependencies, so you don't need a full GNOME
643 desktop installed to have a decent terminal emulator.")
644 (license license:gpl2)))
645
646 (define-public go-github.com-nsf-termbox-go
647 (let ((commit "4ed959e0540971545eddb8c75514973d670cf739")
648 (revision "0"))
649 (package
650 (name "go-github.com-nsf-termbox-go")
651 (version (git-version "0.0.0" revision commit))
652 (source (origin
653 (method git-fetch)
654 (uri (git-reference
655 (url "https://github.com/nsf/termbox-go.git")
656 (commit commit)))
657 (file-name (git-file-name name version))
658 (sha256
659 (base32
660 "1vx64i1mg660if3wwm81p4b7lzxfb3qbr39i7misdyld3fc486p9"))))
661 (build-system go-build-system)
662 (arguments
663 '(#:import-path "github.com/nsf/termbox-go"))
664 (propagated-inputs
665 `(("go-github.com-mattn-go-runewidth"
666 ,go-github.com-mattn-go-runewidth)))
667 (synopsis "@code{termbox} provides a minimal API for text-based user
668 interfaces")
669 (description
670 "Termbox is a library that provides a minimalistic API which allows the
671 programmer to write text-based user interfaces.")
672 (home-page "https://github.com/nsf/termbox-go")
673 (license license:expat))))
674
675 (define-public go-golang.org-x-crypto-ssh-terminal
676 (let ((commit "c78caca803c95773f48a844d3dcab04b9bc4d6dd")
677 (revision "0"))
678 (package
679 (name "go-golang.org-x-crypto-ssh-terminal")
680 (version (git-version "0.0.0" revision commit))
681 (source (origin
682 (method git-fetch)
683 (uri (git-reference
684 (url "https://go.googlesource.com/crypto")
685 (commit commit)))
686 (file-name (git-file-name name version))
687 (sha256
688 (base32
689 "0vxlfxr9y681yn2cfh6dbqmq35vvq4f45ay0mm31ffkny9cms0y4"))))
690 (build-system go-build-system)
691 (arguments
692 '(#:import-path "golang.org/x/crypto/ssh/terminal"
693 #:unpack-path "golang.org/x/crypto"
694 #:phases
695 (modify-phases %standard-phases
696 (add-before 'reset-gzip-timestamps 'make-gzip-archive-writable
697 (lambda* (#:key outputs #:allow-other-keys)
698 (map (lambda (file)
699 (make-file-writable file))
700 (find-files
701 (string-append (assoc-ref outputs "out")
702 "/src/golang.org/x/crypto/ed25519/testdata")
703 ".*\\.gz$"))
704 #t)))))
705 (synopsis "Support functions for dealing with terminals in Go")
706 (description "@code{terminal} provides support functions for dealing
707 with terminals in Go.")
708 (home-page "https://go.googlesource.com/crypto/")
709 (license license:bsd-3))))
710
711 (define-public go-github.com-howeyc-gopass
712 (let ((commit "bf9dde6d0d2c004a008c27aaee91170c786f6db8")
713 (revision "0"))
714 (package
715 (name "go-github.com-howeyc-gopass")
716 (version (git-version "0.0.0" revision commit))
717 (source (origin
718 (method git-fetch)
719 (uri (git-reference
720 (url "https://github.com/howeyc/gopass.git")
721 (commit commit)))
722 (file-name (git-file-name name version))
723 (sha256
724 (base32
725 "1jxzyfnqi0h1fzlsvlkn10bncic803bfhslyijcxk55mgh297g45"))))
726 (build-system go-build-system)
727 (arguments
728 '(#:import-path "github.com/howeyc/gopass"))
729 (propagated-inputs
730 `(("go-golang.org-x-crypto-ssh-terminal"
731 ,go-golang.org-x-crypto-ssh-terminal)))
732 (synopsis "Retrieve password from a terminal or piped input in Go")
733 (description
734 "@code{gopass} is a Go package for retrieving a password from user
735 terminal or piped input.")
736 (home-page "https://github.com/howeyc/gopass")
737 (license license:isc))))
738
739 (define-public python-pyte
740 (package
741 (name "python-pyte")
742 (version "0.7.0")
743 (source
744 (origin
745 (method url-fetch)
746 (uri (pypi-uri "pyte" version))
747 (sha256
748 (base32
749 "1an54hvyjm8gncx8cgabz9mkpgjkdb0bkyjlkh7g7f94nr3wnfl7"))))
750 (build-system python-build-system)
751 (arguments
752 '(#:phases
753 (modify-phases %standard-phases
754 (add-after 'unpack 'remove-failing-test
755 ;; TODO: Reenable when the `captured` files required by this test
756 ;; are included in the archive.
757 (lambda _
758 (delete-file "tests/test_input_output.py")
759 #t)))))
760 (propagated-inputs
761 `(("python-wcwidth" ,python-wcwidth)))
762 (native-inputs
763 `(("python-pytest-runner" ,python-pytest-runner)
764 ("python-pytest" ,python-pytest)))
765 (home-page "https://pyte.readthedocs.io/")
766 (synopsis "Simple VTXXX-compatible terminal emulator")
767 (description "@code{pyte} is an in-memory VTxxx-compatible terminal
768 emulator. @var{VTxxx} stands for a series of video terminals, developed by
769 DEC between 1970 and 1995. The first and probably most famous one was the
770 VT100 terminal, which is now a de-facto standard for all virtual terminal
771 emulators.
772
773 pyte is a fork of vt102, which was an incomplete pure Python implementation
774 of VT100 terminal.")
775 (license license:lgpl3+)))
776
777 (define-public python2-pyte
778 (package-with-python2 python-pyte))
779
780 (define-public python-blessings
781 (package
782 (name "python-blessings")
783 (version "1.6.1")
784 (source
785 (origin
786 (method url-fetch)
787 (uri (pypi-uri "blessings" version))
788 (sha256
789 (base32
790 "1smngy65p8mi62lgm04icasx22v976szhs2aq95y2ljmi1srb4bl"))))
791 (build-system python-build-system)
792 (arguments
793 ;; TODO: For py3, 2to2 is used to convert the code, but test-suite fails
794 `(#:tests? #f))
795 (native-inputs
796 `(("python-nose" ,python-nose)))
797 (home-page "https://github.com/erikrose/blessings")
798 (synopsis "Python module to manage terminal color, styling, and
799 positioning")
800 (description "Blessings is a pythonic API to manipulate terminal color,
801 styling, and positioning. It provides similar features to curses but avoids
802 some of curses’s limitations: it does not require clearing the whole screen
803 for little changes, provides a scroll-back buffer after the program exits, and
804 avoids styling altogether when the output is redirected to something other
805 than a terminal.")
806 (license license:expat)))
807
808 (define-public python2-blessings
809 (package-with-python2 python-blessings))
810
811 (define-public python-curtsies
812 (package
813 (name "python-curtsies")
814 (version "0.2.11")
815 (source
816 (origin
817 (method url-fetch)
818 (uri (pypi-uri "curtsies" version))
819 (sha256
820 (base32
821 "1vljmw3sy6lrqahhpyg4gk13mzcx3mwhvg8s41698ms3cpgkjipc"))))
822 (build-system python-build-system)
823 (arguments
824 `(#:phases
825 (modify-phases %standard-phases
826 (replace 'check
827 (lambda _
828 (invoke "nosetests" "-v"))))))
829 (propagated-inputs
830 `(("python-blessings" ,python-blessings)
831 ("python-wcwidth" ,python-wcwidth)))
832 (native-inputs
833 `(("python-mock" ,python-mock)
834 ("python-pyte" ,python-pyte)
835 ("python-nose" ,python-nose)))
836 (home-page "https://github.com/thomasballinger/curtsies")
837 (synopsis "Library for curses-like terminal interaction with colored
838 strings")
839 (description "Curtsies is a Python library for interacting with the
840 terminal. It features string-like objects which carry formatting information,
841 per-line fullscreen terminal rendering, and keyboard input event reporting.")
842 (license license:expat)))
843
844 (define-public python2-curtsies
845 (package-with-python2 python-curtsies))