1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2015, 2016 Efraim Flashner <efraim@flashner.co.il>
3 ;;; Copyright © 2016 Mckinley Olsen <mck.olsen@gmail.com>
4 ;;; Copyright © 2016 Alex Griffin <a@ajgrf.com>
5 ;;; Copyright © 2016 David Craven <david@craven.ch>
6 ;;; Copyright © 2016 Ludovic Courtès <ludo@gnu.org>
7 ;;; Copyright © 2016, 2017 José Miguel Sánchez García <jmi2k@openmailbox.org>
8 ;;; Copyright © 2017 Tobias Geerinckx-Rice <me@tobias.gr>
9 ;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net>
11 ;;; This file is part of GNU Guix.
13 ;;; GNU Guix is free software; you can redistribute it and/or modify it
14 ;;; under the terms of the GNU General Public License as published by
15 ;;; the Free Software Foundation; either version 3 of the License, or (at
16 ;;; your option) any later version.
18 ;;; GNU Guix is distributed in the hope that it will be useful, but
19 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
20 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 ;;; GNU General Public License for more details.
23 ;;; You should have received a copy of the GNU General Public License
24 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
26 (define-module (gnu packages terminals)
27 #:use-module ((guix licenses) #:prefix license:)
28 #:use-module (guix build utils)
29 #:use-module (guix build-system gnu)
30 #:use-module (guix build-system python)
31 #:use-module (guix download)
32 #:use-module (guix git-download)
33 #:use-module (guix packages)
34 #:use-module (gnu packages autotools)
35 #:use-module (gnu packages freedesktop)
36 #:use-module (gnu packages gettext)
37 #:use-module (gnu packages gl)
38 #:use-module (gnu packages glib)
39 #:use-module (gnu packages gnome)
40 #:use-module (gnu packages gtk)
41 #:use-module (gnu packages linux)
42 #:use-module (gnu packages perl)
43 #:use-module (gnu packages pkg-config)
44 #:use-module (gnu packages python)
45 #:use-module (gnu packages wm)
46 #:use-module (gnu packages ncurses)
47 #:use-module (gnu packages gtk)
48 #:use-module (gnu packages gnome)
49 #:use-module (gnu packages xdisorg)
50 #:use-module (gnu packages xml)
51 #:use-module (gnu packages docbook)
52 #:use-module (srfi srfi-26))
60 (uri (string-append "https://github.com/lanoxx/tilda/archive/"
61 "tilda-" version ".tar.gz"))
64 "1cc4qbg1m3i04lj5p6i6xbd0zvy1320pxdgmjhz5p3j95ibsbfki"))))
65 (build-system gnu-build-system)
67 `(#:phases (modify-phases %standard-phases
68 (add-before 'patch-source-shebangs 'autogen
69 (lambda _ ; Avoid running ./configure.
70 (substitute* "autogen.sh"
71 (("^.*\\$srcdir/configure.*") ""))
72 (zero? (system* "sh" "autogen.sh")))))))
74 `(("autoconf" ,autoconf)
75 ("automake" ,automake)
76 ("gettext" ,gettext-minimal)
77 ("pkg-config" ,pkg-config)))
79 `(("glib" ,glib "bin")
81 ("libconfuse" ,libconfuse)
83 (synopsis "GTK+-based drop-down terminal")
84 (description "Tilda is a terminal emulator similar to normal terminals like
85 gnome-terminal (GNOME) or Konsole (KDE), with the difference that it drops down
86 from the edge of a screen when a certain configurable hotkey is pressed. This
87 is similar to the built-in consoles in some applications. Tilda is highly
88 configureable through a graphical wizard.")
89 (home-page "https://github.com/lanoxx/tilda")
90 (license license:gpl2+)))
92 (define-public termite
100 (url (string-append "https://github.com/thestinger/"
102 (commit (string-append "v" version))
104 (file-name (string-append name "-" version "-checkout"))
107 "0s6dyg3vcqk5qcx90bs24wdnd3p56rdjdcanx4pcxvp6ksjl61jz"))))
108 (build-system gnu-build-system)
111 (modify-phases %standard-phases
114 ;; This sets the destination when installing the necessary terminal
115 ;; capability data, which are not provided by 'ncurses'. See
116 ;; <https://lists.gnu.org/archive/html/bug-ncurses/2009-10/msg00031.html>.
117 #:make-flags (list "PREFIX="
118 (string-append "VERSION=v" (version))
119 (string-append "DESTDIR="
120 (assoc-ref %outputs "out")))))
124 ("ncurses", ncurses)))
126 `(("pkg-config" ,pkg-config)))
128 ;; FIXME: This should only be located in 'ncurses'. Nonetheless it is
129 ;; provided for usability reasons. See <https://bugs.gnu.org/22138>.
131 (list (search-path-specification
132 (variable "TERMINFO_DIRS")
133 (files '("share/terminfo")))))
134 (home-page "https://github.com/thestinger/termite/")
135 (synopsis "Keyboard-centric, VTE-based terminal")
136 (description "Termite is a minimal terminal emulator designed for use with
137 tiling window managers. It is a modal application, similar to Vim, with an
138 insert mode and command mode where keybindings have different functions.")
140 ;; Files under util/ are under the Expat license; the rest is LGPLv2+.
141 (license license:lgpl2.0+)))
143 (define-public asciinema
151 "https://pypi.python.org/packages/06/96/93947d9be78aebb7985014fdf"
152 "4d84896dd0f62514d922ee03f5bb55a21fb/asciinema-" version
156 "1crdm9zfdbjflvz1gsqvy5zsbgwdfkj34z69kg6h5by70rrs1hdc"))))
157 (build-system python-build-system)
160 (modify-phases %standard-phases
161 (add-before 'build 'patch-exec-paths
162 (lambda* (#:key inputs #:allow-other-keys)
163 (let ((ncurses (assoc-ref inputs "ncurses")))
164 (substitute* "asciinema/recorder.py"
166 (string-append "'" ncurses "/bin/tput'"))))
168 (inputs `(("ncurses" ,ncurses)))
171 `(("python-requests" ,python-requests)))
172 (home-page "https://asciinema.org")
173 (synopsis "Terminal session recorder")
175 "Use asciinema to record and share your terminal sessions, the right way.
176 Forget screen recording apps and blurry video. Enjoy a lightweight, purely
177 text-based approach to terminal recording.")
178 (license license:gpl3)))
180 (define-public libtsm
187 "https://freedesktop.org/software/kmscon/releases/"
188 "libtsm-" version ".tar.xz"))
191 "01ygwrsxfii0pngfikgqsb4fxp8n1bbs47l7hck81h9b9bc1ah8i"))))
192 (build-system gnu-build-system)
194 `(("pkg-config" ,pkg-config)))
196 `(("libxkbcommon" ,libxkbcommon)))
197 (synopsis "Xterm state machine library")
198 (description "TSM is a state machine for DEC VT100-VT520 compatible
199 terminal emulators. It tries to support all common standards while keeping
200 compatibility to existing emulators like xterm, gnome-terminal, konsole, etc.")
201 (home-page "https://www.freedesktop.org/wiki/Software/libtsm")
202 ;; Hash table implementation is lgpl2.1+ licensed.
203 ;; The wcwidth implementation in external/wcwidth.{h,c} uses a license
205 ;; UCS-4 to UTF-8 encoding is copied from "terminology" which is released
206 ;; under the bsd 2 license.
207 (license (list license:expat license:lgpl2.1+ license:isc license:bsd-2))))
209 (define-public kmscon
216 "https://freedesktop.org/software/kmscon/releases/"
217 "kmscon-" version ".tar.xz"))
220 "0axfwrp3c8f4gb67ap2sqnkn75idpiw09s35wwn6kgagvhf1rc0a"))
221 (modules '((guix build utils)))
223 ;; Use elogind instead of systemd.
225 (substitute* "configure"
226 (("libsystemd-daemon libsystemd-login")
228 (substitute* "src/uterm_systemd.c"
229 (("#include <systemd/sd-login.h>")
230 "#include <elogind/sd-login.h>")
231 ;; We don't have this header.
232 (("#include <systemd/sd-daemon\\.h>")
234 ;; Replace the call to 'sd_booted' by the truth value.
237 (build-system gnu-build-system)
239 `(("pkg-config" ,pkg-config)
240 ("libxslt" ,libxslt) ;to build the man page
241 ("libxml2" ,libxml2) ;for XML_CATALOG_FILES
242 ("docbook-xsl" ,docbook-xsl)))
246 ("libxkbcommon" ,libxkbcommon)
251 (synopsis "Linux KMS-based terminal emulator")
252 (description "Kmscon is a terminal emulator based on Linux's @dfn{kernel
253 mode setting} (KMS). It can replace the in-kernel virtual terminal (VT)
254 implementation with a user-space console. Compared to the Linux console,
255 kmscon provides enhanced features including XKB-compatible internationalized
256 keyboard support, UTF-8 input/font support, hardware-accelerated rendering,
257 multi-seat support, a replacement for @command{mingetty}, and more.")
258 (home-page "https://www.freedesktop.org/wiki/Software/kmscon")
259 ;; Hash table implementation is lgpl2.1+ licensed.
260 ;; The wcwidth implementation in external/wcwidth.{h,c} uses a license
262 ;; UCS-4 to UTF-8 encoding is copied from "terminology" which is released
263 ;; under the bsd 2 license.
264 ;; Unifont-Font is from http://unifoundry.com/unifont.html and licensed
265 ;; under the terms of the GNU GPL.
266 (license (list license:expat license:lgpl2.1+ license:bsd-2
268 (supported-systems (filter (cut string-suffix? "-linux" <>)
269 %supported-systems))))
271 (define-public libtermkey
277 (uri (string-append "http://www.leonerd.org.uk/code/"
278 name "/" name "-" version ".tar.gz"))
280 (base32 "1ds8gdr8p2dfr970z8kxgfz6x7m1jxmmfrb2aafab3wcni6al1f5"))))
281 (build-system gnu-build-system)
285 (string-append "PREFIX=" (assoc-ref %outputs "out")))
286 #:phases (modify-phases %standard-phases
288 #:test-target "test"))
289 (inputs `(("ncurses", ncurses)))
290 (native-inputs `(("libtool", libtool)
291 ("perl-test-harness" ,perl-test-harness)
292 ("pkg-config", pkg-config)))
293 (synopsis "Keyboard entry processing library for terminal-based programs")
295 "Libtermkey handles all the necessary logic to recognise special keys, UTF-8
296 combining, and so on, with a simple interface.")
297 (home-page "http://www.leonerd.org.uk/code/libtermkey")
298 (license license:expat)))
300 (define-public picocom
307 "https://github.com/npat-efault/picocom"
308 "/archive/" version ".tar.gz"))
309 (file-name (string-append name "-" version ".tar.gz"))
312 "1knl6dglnrynx1fhy21nylw56i1q3dkizkgxzkq42mb7ilah8f9y"))))
313 (build-system gnu-build-system)
315 `(#:make-flags '("CC=gcc")
316 #:tests? #f ; No tests
318 (modify-phases %standard-phases
321 (lambda* (#:key outputs #:allow-other-keys)
322 (let* ((out (assoc-ref outputs "out"))
323 (bin (string-append out "/bin"))
324 (man (string-append out "/share/man/man1")))
325 (install-file "picocom" bin)
326 (install-file "picocom.1" man)))))))
327 (home-page "https://github.com/npat-efault/picocom")
328 (synopsis "Minimal dumb-terminal emulation program")
329 (description "It was designed to serve as a simple, manual, modem
330 configuration, testing, and debugging tool. It has also serves well
331 as a low-tech serial communications program to allow access to all
332 types of devices that provide serial consoles.")
333 (license license:gpl2+)))
341 (uri (string-append "http://www.johnath.com/" name "/"
342 name "-" version ".tar.gz"))
345 "0bgch6jq5cahakk3kbr9549iysf2dik09afixxy5brbxk1xfzb2r"))))
346 (build-system gnu-build-system)
348 `(#:tests? #f ; no tests.
350 (modify-phases %standard-phases
352 (add-after 'unpack 'patch-makefile
353 (lambda* (#:key outputs #:allow-other-keys)
354 (substitute* "Makefile" (("/usr") (assoc-ref outputs "out")))
356 (add-before 'install 'create-output-directories
357 (lambda* (#:key outputs #:allow-other-keys)
358 (let ((out (assoc-ref %outputs "out")))
359 (mkdir-p (string-append out "/bin"))
360 (mkdir-p (string-append out "/man/man1"))))))))
361 (synopsis "Linux command-line utility to control the PC speaker")
362 (description "beep allows the user to control the PC speaker with precision,
363 allowing different sounds to indicate different events. While it can be run
364 quite happily on the command line, its intended place of residence is within
365 scripts, notifying the user when something interesting occurs. Of course, it
366 has no notion of what's interesing, but it's very good at that notifying part.")
367 (home-page "http://www.johnath.com/beep")
368 (license license:gpl2+)))
370 (define-public unibilium
377 (uri (string-append "https://github.com/mauke/unibilium/"
378 "archive/v" version ".tar.gz"))
379 (file-name (string-append name "-" version ".tar.gz"))
382 "1n7a0jrlwhn9nnkna76sbnjrr808m0pmzbiwznmp7rhmjl4z2fk2"))))
383 (build-system gnu-build-system)
387 (string-append "PREFIX=" (assoc-ref %outputs "out")))
389 ;; FIXME: tests require "prove"
392 (modify-phases %standard-phases
393 (delete 'configure))))
395 `(("libtool" ,libtool)))
396 (home-page "https://github.com/mauke/unibilium")
397 (synopsis "Terminfo parsing library")
398 (description "Unibilium is a basic C terminfo library. It doesn't depend
399 on curses or any other library. It also doesn't use global variables, so it
400 should be thread-safe.")
401 (license license:lgpl3+)))
403 (define-public libvterm
410 (uri (string-append "http://www.leonerd.org.uk/code/libvterm/"
411 "libvterm-" version ".tar.gz"))
414 "1s56c8p1qz6frkcri0hg4qyydv2wcccj6n2xmz1dwcdqn38ldsmb"))))
415 (build-system gnu-build-system)
419 (string-append "PREFIX=" (assoc-ref %outputs "out")))
422 (modify-phases %standard-phases
423 (delete 'configure))))
425 `(("libtool" ,libtool)
427 (home-page "http://www.leonerd.org.uk/code/libvterm/")
428 (synopsis "VT220/xterm/ECMA-48 terminal emulator library")
429 (description "Libvterm is an abstract C99 library which implements a VT220
430 or xterm-like terminal emulator. It doesn't use any particular graphics
431 toolkit or output system, instead it invokes callback function pointers that
432 its embedding program should provide it to draw on its behalf. It avoids
433 calling @code{malloc} during normal running state, allowing it to be used in
434 embedded kernel situations.")
435 (license license:expat)))