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