gnu: libtermkey: Update to 0.19.
[jackhill/guix/guix.git] / gnu / packages / terminals.scm
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 José Miguel Sánchez García <jmi2k@openmailbox.org>
8 ;;;
9 ;;; This file is part of GNU Guix.
10 ;;;
11 ;;; GNU Guix is free software; you can redistribute it and/or modify it
12 ;;; under the terms of the GNU General Public License as published by
13 ;;; the Free Software Foundation; either version 3 of the License, or (at
14 ;;; your option) any later version.
15 ;;;
16 ;;; GNU Guix is distributed in the hope that it will be useful, but
17 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
18 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 ;;; GNU General Public License for more details.
20 ;;;
21 ;;; You should have received a copy of the GNU General Public License
22 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
23
24 (define-module (gnu packages terminals)
25 #:use-module ((guix licenses) #:prefix license:)
26 #:use-module (guix build utils)
27 #:use-module (guix build-system gnu)
28 #:use-module (guix build-system python)
29 #:use-module (guix download)
30 #:use-module (guix git-download)
31 #:use-module (guix packages)
32 #:use-module (gnu packages autotools)
33 #:use-module (gnu packages freedesktop)
34 #:use-module (gnu packages gettext)
35 #:use-module (gnu packages gl)
36 #:use-module (gnu packages glib)
37 #:use-module (gnu packages gnome)
38 #:use-module (gnu packages gtk)
39 #:use-module (gnu packages linux)
40 #:use-module (gnu packages perl)
41 #:use-module (gnu packages pkg-config)
42 #:use-module (gnu packages python)
43 #:use-module (gnu packages wm)
44 #:use-module (gnu packages ncurses)
45 #:use-module (gnu packages gtk)
46 #:use-module (gnu packages gnome)
47 #:use-module (gnu packages xdisorg)
48 #:use-module (gnu packages xml)
49 #:use-module (gnu packages docbook)
50 #:use-module (srfi srfi-26))
51
52 (define-public tilda
53 (package
54 (name "tilda")
55 (version "1.3.3")
56 (source (origin
57 (method url-fetch)
58 (uri (string-append "https://github.com/lanoxx/tilda/archive/"
59 "tilda-" version ".tar.gz"))
60 (sha256
61 (base32
62 "1cc4qbg1m3i04lj5p6i6xbd0zvy1320pxdgmjhz5p3j95ibsbfki"))))
63 (build-system gnu-build-system)
64 (arguments
65 `(#:phases (modify-phases %standard-phases
66 (add-before 'patch-source-shebangs 'autogen
67 (lambda _ ; Avoid running ./configure.
68 (substitute* "autogen.sh"
69 (("^.*\\$srcdir/configure.*") ""))
70 (zero? (system* "sh" "autogen.sh")))))))
71 (native-inputs
72 `(("autoconf" ,autoconf)
73 ("automake" ,automake)
74 ("gettext" ,gettext-minimal)
75 ("pkg-config" ,pkg-config)))
76 (inputs
77 `(("glib" ,glib "bin")
78 ("gtk+" ,gtk+)
79 ("libconfuse" ,libconfuse)
80 ("vte" ,vte)))
81 (synopsis "GTK+-based drop-down terminal")
82 (description "Tilda is a terminal emulator similar to normal terminals like
83 gnome-terminal (GNOME) or Konsole (KDE), with the difference that it drops down
84 from the edge of a screen when a certain configurable hotkey is pressed. This
85 is similar to the built-in consoles in some applications. Tilda is highly
86 configureable through a graphical wizard.")
87 (home-page "https://github.com/lanoxx/tilda")
88 (license license:gpl2+)))
89
90 (define-public termite
91 (package
92 (name "termite")
93 (version "12")
94 (source
95 (origin
96 (method git-fetch)
97 (uri (git-reference
98 (url (string-append "https://github.com/thestinger/"
99 name ".git"))
100 (commit (string-append "v" version))
101 (recursive? #t)))
102 (file-name (string-append name "-" version "-checkout"))
103 (sha256
104 (base32
105 "0s6dyg3vcqk5qcx90bs24wdnd3p56rdjdcanx4pcxvp6ksjl61jz"))))
106 (build-system gnu-build-system)
107 (arguments
108 `(#:phases
109 (modify-phases %standard-phases
110 (delete 'configure))
111 #:tests? #f
112 ;; This sets the destination when installing the necessary terminal
113 ;; capability data, which are not provided by 'ncurses'. See
114 ;; <https://lists.gnu.org/archive/html/bug-ncurses/2009-10/msg00031.html>.
115 #:make-flags (list "PREFIX="
116 (string-append "VERSION=v" (version))
117 (string-append "DESTDIR="
118 (assoc-ref %outputs "out")))))
119 (inputs
120 `(("vte", vte-ng)
121 ("gtk+", gtk+)
122 ("ncurses", ncurses)))
123 (native-inputs
124 `(("pkg-config" ,pkg-config)))
125
126 ;; FIXME: This should only be located in 'ncurses'. Nonetheless it is
127 ;; provided for usability reasons. See <https://bugs.gnu.org/22138>.
128 (native-search-paths
129 (list (search-path-specification
130 (variable "TERMINFO_DIRS")
131 (files '("share/terminfo")))))
132 (home-page "https://github.com/thestinger/termite/")
133 (synopsis "Keyboard-centric, VTE-based terminal")
134 (description "Termite is a minimal terminal emulator designed for use with
135 tiling window managers. It is a modal application, similar to Vim, with an
136 insert mode and command mode where keybindings have different functions.")
137
138 ;; Files under util/ are under the Expat license; the rest is LGPLv2+.
139 (license license:lgpl2.0+)))
140
141 (define-public asciinema
142 (package
143 (name "asciinema")
144 (version "1.3.0")
145 (source
146 (origin
147 (method url-fetch)
148 (uri (string-append
149 "https://pypi.python.org/packages/06/96/93947d9be78aebb7985014fdf"
150 "4d84896dd0f62514d922ee03f5bb55a21fb/asciinema-" version
151 ".tar.gz"))
152 (sha256
153 (base32
154 "1crdm9zfdbjflvz1gsqvy5zsbgwdfkj34z69kg6h5by70rrs1hdc"))))
155 (build-system python-build-system)
156 (arguments
157 `(#:phases
158 (modify-phases %standard-phases
159 (add-before 'build 'patch-exec-paths
160 (lambda* (#:key inputs #:allow-other-keys)
161 (let ((ncurses (assoc-ref inputs "ncurses")))
162 (substitute* "asciinema/recorder.py"
163 (("'tput'")
164 (string-append "'" ncurses "/bin/tput'"))))
165 #t)))))
166 (inputs `(("ncurses" ,ncurses)))
167 (home-page "https://asciinema.org")
168 (synopsis "Terminal session recorder")
169 (description
170 "Use asciinema to record and share your terminal sessions, the right way.
171 Forget screen recording apps and blurry video. Enjoy a lightweight, purely
172 text-based approach to terminal recording.")
173 (license license:gpl3)))
174
175 (define-public libtsm
176 (package
177 (name "libtsm")
178 (version "3")
179 (source (origin
180 (method url-fetch)
181 (uri (string-append
182 "https://freedesktop.org/software/kmscon/releases/"
183 "libtsm-" version ".tar.xz"))
184 (sha256
185 (base32
186 "01ygwrsxfii0pngfikgqsb4fxp8n1bbs47l7hck81h9b9bc1ah8i"))))
187 (build-system gnu-build-system)
188 (native-inputs
189 `(("pkg-config" ,pkg-config)))
190 (inputs
191 `(("libxkbcommon" ,libxkbcommon)))
192 (synopsis "Xterm state machine library")
193 (description "TSM is a state machine for DEC VT100-VT520 compatible
194 terminal emulators. It tries to support all common standards while keeping
195 compatibility to existing emulators like xterm, gnome-terminal, konsole, etc.")
196 (home-page "https://www.freedesktop.org/wiki/Software/libtsm")
197 ;; Hash table implementation is lgpl2.1+ licensed.
198 ;; The wcwidth implementation in external/wcwidth.{h,c} uses a license
199 ;; derived from ISC.
200 ;; UCS-4 to UTF-8 encoding is copied from "terminology" which is released
201 ;; under the bsd 2 license.
202 (license (list license:expat license:lgpl2.1+ license:isc license:bsd-2))))
203
204 (define-public kmscon
205 (package
206 (name "kmscon")
207 (version "8")
208 (source (origin
209 (method url-fetch)
210 (uri (string-append
211 "https://freedesktop.org/software/kmscon/releases/"
212 "kmscon-" version ".tar.xz"))
213 (sha256
214 (base32
215 "0axfwrp3c8f4gb67ap2sqnkn75idpiw09s35wwn6kgagvhf1rc0a"))
216 (modules '((guix build utils)))
217 (snippet
218 ;; Use elogind instead of systemd.
219 '(begin
220 (substitute* "configure"
221 (("libsystemd-daemon libsystemd-login")
222 "libelogind"))
223 (substitute* "src/uterm_systemd.c"
224 (("#include <systemd/sd-login.h>")
225 "#include <elogind/sd-login.h>")
226 ;; We don't have this header.
227 (("#include <systemd/sd-daemon\\.h>")
228 "")
229 ;; Replace the call to 'sd_booted' by the truth value.
230 (("sd_booted\\(\\)")
231 "1"))))))
232 (build-system gnu-build-system)
233 (native-inputs
234 `(("pkg-config" ,pkg-config)
235 ("libxslt" ,libxslt) ;to build the man page
236 ("libxml2" ,libxml2) ;for XML_CATALOG_FILES
237 ("docbook-xsl" ,docbook-xsl)))
238 (inputs
239 `(("libdrm" ,libdrm)
240 ("libtsm" ,libtsm)
241 ("libxkbcommon" ,libxkbcommon)
242 ("logind" ,elogind)
243 ("mesa" ,mesa)
244 ("pango" ,pango)
245 ("udev" ,eudev)))
246 (synopsis "Linux KMS-based terminal emulator")
247 (description "Kmscon is a terminal emulator based on Linux's @dfn{kernel
248 mode setting} (KMS). It can replace the in-kernel virtual terminal (VT)
249 implementation with a user-space console. Compared to the Linux console,
250 kmscon provides enhanced features including XKB-compatible internationalized
251 keyboard support, UTF-8 input/font support, hardware-accelerated rendering,
252 multi-seat support, a replacement for @command{mingetty}, and more.")
253 (home-page "https://www.freedesktop.org/wiki/Software/kmscon")
254 ;; Hash table implementation is lgpl2.1+ licensed.
255 ;; The wcwidth implementation in external/wcwidth.{h,c} uses a license
256 ;; derived from ISC.
257 ;; UCS-4 to UTF-8 encoding is copied from "terminology" which is released
258 ;; under the bsd 2 license.
259 ;; Unifont-Font is from http://unifoundry.com/unifont.html and licensed
260 ;; under the terms of the GNU GPL.
261 (license (list license:expat license:lgpl2.1+ license:bsd-2
262 license:gpl2+))
263 (supported-systems (filter (cut string-suffix? "-linux" <>)
264 %supported-systems))))
265
266 (define-public libtermkey
267 (package
268 (name "libtermkey")
269 (version "0.19")
270 (source (origin
271 (method url-fetch)
272 (uri (string-append "http://www.leonerd.org.uk/code/"
273 name "/" name "-" version ".tar.gz"))
274 (sha256
275 (base32 "1ds8gdr8p2dfr970z8kxgfz6x7m1jxmmfrb2aafab3wcni6al1f5"))))
276 (build-system gnu-build-system)
277 (arguments
278 '(#:make-flags (list
279 "CC=gcc"
280 (string-append "PREFIX=" (assoc-ref %outputs "out")))
281 #:phases (modify-phases %standard-phases
282 (delete 'configure))
283 #:test-target "test"))
284 (inputs `(("ncurses", ncurses)))
285 (native-inputs `(("libtool", libtool)
286 ("perl-test-harness" ,perl-test-harness)
287 ("pkg-config", pkg-config)))
288 (synopsis "Keyboard entry processing library for terminal-based programs")
289 (description
290 "Libtermkey handles all the necessary logic to recognise special keys, UTF-8
291 combining, and so on, with a simple interface.")
292 (home-page "http://www.leonerd.org.uk/code/libtermkey")
293 (license license:expat)))
294
295 (define-public picocom
296 (package
297 (name "picocom")
298 (version "2.2")
299 (source (origin
300 (method url-fetch)
301 (uri (string-append
302 "https://github.com/npat-efault/picocom"
303 "/archive/" version ".tar.gz"))
304 (file-name (string-append name "-" version ".tar.gz"))
305 (sha256
306 (base32
307 "1knl6dglnrynx1fhy21nylw56i1q3dkizkgxzkq42mb7ilah8f9y"))))
308 (build-system gnu-build-system)
309 (arguments
310 `(#:make-flags '("CC=gcc")
311 #:tests? #f ; No tests
312 #:phases
313 (modify-phases %standard-phases
314 (delete 'configure)
315 (replace 'install
316 (lambda* (#:key outputs #:allow-other-keys)
317 (let* ((out (assoc-ref outputs "out"))
318 (bin (string-append out "/bin"))
319 (man (string-append out "/share/man/man1")))
320 (install-file "picocom" bin)
321 (install-file "picocom.1" man)))))))
322 (home-page "https://github.com/npat-efault/picocom")
323 (synopsis "Minimal dumb-terminal emulation program")
324 (description "It was designed to serve as a simple, manual, modem
325 configuration, testing, and debugging tool. It has also serves well
326 as a low-tech serial communications program to allow access to all
327 types of devices that provide serial consoles.")
328 (license license:gpl2+)))