Commit | Line | Data |
---|---|---|
6a7e1a18 | 1 | ;;; GNU Guix --- Functional package management for GNU |
37042a0f | 2 | ;;; Copyright © 2015, 2016 Efraim Flashner <efraim@flashner.co.il> |
89978a0a | 3 | ;;; Copyright © 2016 Mckinley Olsen <mck.olsen@gmail.com> |
cb55f9c6 | 4 | ;;; Copyright © 2016 Alex Griffin <a@ajgrf.com> |
af39609b | 5 | ;;; Copyright © 2016 David Craven <david@craven.ch> |
7326944b | 6 | ;;; Copyright © 2016 Ludovic Courtès <ludo@gnu.org> |
abe2ec73 JMSG |
7 | ;;; Copyright © 2016, 2017 José Miguel Sánchez García <jmi2k@openmailbox.org> |
8 | ;;; Copyright © 2017 Tobias Geerinckx-Rice <me@tobias.gr> | |
f2b7be09 | 9 | ;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net> |
6a7e1a18 EF |
10 | ;;; |
11 | ;;; This file is part of GNU Guix. | |
12 | ;;; | |
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. | |
17 | ;;; | |
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. | |
22 | ;;; | |
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/>. | |
25 | ||
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) | |
cb55f9c6 | 30 | #:use-module (guix build-system python) |
6a7e1a18 | 31 | #:use-module (guix download) |
89978a0a | 32 | #:use-module (guix git-download) |
6a7e1a18 EF |
33 | #:use-module (guix packages) |
34 | #:use-module (gnu packages autotools) | |
e8bb4336 | 35 | #:use-module (gnu packages freedesktop) |
6a7e1a18 | 36 | #:use-module (gnu packages gettext) |
e8bb4336 | 37 | #:use-module (gnu packages gl) |
6a7e1a18 EF |
38 | #:use-module (gnu packages glib) |
39 | #:use-module (gnu packages gnome) | |
40 | #:use-module (gnu packages gtk) | |
e8bb4336 | 41 | #:use-module (gnu packages linux) |
db913ac4 | 42 | #:use-module (gnu packages perl) |
6a7e1a18 | 43 | #:use-module (gnu packages pkg-config) |
cb55f9c6 | 44 | #:use-module (gnu packages python) |
89978a0a MO |
45 | #:use-module (gnu packages wm) |
46 | #:use-module (gnu packages ncurses) | |
47 | #:use-module (gnu packages gtk) | |
e8bb4336 | 48 | #:use-module (gnu packages gnome) |
78325fa8 | 49 | #:use-module (gnu packages xdisorg) |
7326944b LC |
50 | #:use-module (gnu packages xml) |
51 | #:use-module (gnu packages docbook) | |
78325fa8 | 52 | #:use-module (srfi srfi-26)) |
6a7e1a18 EF |
53 | |
54 | (define-public tilda | |
55 | (package | |
56 | (name "tilda") | |
37042a0f | 57 | (version "1.3.3") |
6a7e1a18 EF |
58 | (source (origin |
59 | (method url-fetch) | |
60 | (uri (string-append "https://github.com/lanoxx/tilda/archive/" | |
d2a52108 | 61 | "tilda-" version ".tar.gz")) |
6a7e1a18 EF |
62 | (sha256 |
63 | (base32 | |
37042a0f | 64 | "1cc4qbg1m3i04lj5p6i6xbd0zvy1320pxdgmjhz5p3j95ibsbfki")))) |
6a7e1a18 EF |
65 | (build-system gnu-build-system) |
66 | (arguments | |
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"))))))) | |
73 | (native-inputs | |
74 | `(("autoconf" ,autoconf) | |
75 | ("automake" ,automake) | |
b94a6ca0 | 76 | ("gettext" ,gettext-minimal) |
d2a52108 | 77 | ("pkg-config" ,pkg-config))) |
6a7e1a18 EF |
78 | (inputs |
79 | `(("glib" ,glib "bin") | |
80 | ("gtk+" ,gtk+) | |
81 | ("libconfuse" ,libconfuse) | |
d2a52108 | 82 | ("vte" ,vte))) |
6a7e1a18 EF |
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 | |
d1e4ad1b | 88 | configurable through a graphical wizard.") |
6a7e1a18 EF |
89 | (home-page "https://github.com/lanoxx/tilda") |
90 | (license license:gpl2+))) | |
89978a0a MO |
91 | |
92 | (define-public termite | |
93 | (package | |
94 | (name "termite") | |
ebe3515f | 95 | (version "12") |
89978a0a MO |
96 | (source |
97 | (origin | |
98 | (method git-fetch) | |
99 | (uri (git-reference | |
100 | (url (string-append "https://github.com/thestinger/" | |
101 | name ".git")) | |
102 | (commit (string-append "v" version)) | |
103 | (recursive? #t))) | |
104 | (file-name (string-append name "-" version "-checkout")) | |
105 | (sha256 | |
ebe3515f EF |
106 | (base32 |
107 | "0s6dyg3vcqk5qcx90bs24wdnd3p56rdjdcanx4pcxvp6ksjl61jz")))) | |
89978a0a MO |
108 | (build-system gnu-build-system) |
109 | (arguments | |
66bb5db7 EF |
110 | `(#:phases |
111 | (modify-phases %standard-phases | |
112 | (delete 'configure)) | |
89978a0a MO |
113 | #:tests? #f |
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"))))) | |
121 | (inputs | |
122 | `(("vte", vte-ng) | |
123 | ("gtk+", gtk+) | |
124 | ("ncurses", ncurses))) | |
125 | (native-inputs | |
126 | `(("pkg-config" ,pkg-config))) | |
127 | ||
128 | ;; FIXME: This should only be located in 'ncurses'. Nonetheless it is | |
129 | ;; provided for usability reasons. See <https://bugs.gnu.org/22138>. | |
130 | (native-search-paths | |
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.") | |
139 | ||
140 | ;; Files under util/ are under the Expat license; the rest is LGPLv2+. | |
141 | (license license:lgpl2.0+))) | |
cb55f9c6 AG |
142 | |
143 | (define-public asciinema | |
144 | (package | |
145 | (name "asciinema") | |
146 | (version "1.3.0") | |
147 | (source | |
148 | (origin | |
149 | (method url-fetch) | |
150 | (uri (string-append | |
151 | "https://pypi.python.org/packages/06/96/93947d9be78aebb7985014fdf" | |
152 | "4d84896dd0f62514d922ee03f5bb55a21fb/asciinema-" version | |
153 | ".tar.gz")) | |
154 | (sha256 | |
155 | (base32 | |
156 | "1crdm9zfdbjflvz1gsqvy5zsbgwdfkj34z69kg6h5by70rrs1hdc")))) | |
157 | (build-system python-build-system) | |
158 | (arguments | |
159 | `(#:phases | |
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" | |
165 | (("'tput'") | |
166 | (string-append "'" ncurses "/bin/tput'")))) | |
167 | #t))))) | |
f3b98f4f | 168 | (inputs `(("ncurses" ,ncurses))) |
39d0de33 MB |
169 | (native-inputs |
170 | ;; For tests. | |
171 | `(("python-requests" ,python-requests))) | |
cb55f9c6 AG |
172 | (home-page "https://asciinema.org") |
173 | (synopsis "Terminal session recorder") | |
174 | (description | |
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))) | |
af39609b DC |
179 | |
180 | (define-public libtsm | |
181 | (package | |
182 | (name "libtsm") | |
183 | (version "3") | |
184 | (source (origin | |
185 | (method url-fetch) | |
186 | (uri (string-append | |
187 | "https://freedesktop.org/software/kmscon/releases/" | |
188 | "libtsm-" version ".tar.xz")) | |
189 | (sha256 | |
190 | (base32 | |
191 | "01ygwrsxfii0pngfikgqsb4fxp8n1bbs47l7hck81h9b9bc1ah8i")))) | |
192 | (build-system gnu-build-system) | |
193 | (native-inputs | |
194 | `(("pkg-config" ,pkg-config))) | |
195 | (inputs | |
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") | |
d7af202b DC |
202 | ;; Hash table implementation is lgpl2.1+ licensed. |
203 | ;; The wcwidth implementation in external/wcwidth.{h,c} uses a license | |
204 | ;; derived from ISC. | |
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)))) | |
e8bb4336 DC |
208 | |
209 | (define-public kmscon | |
210 | (package | |
211 | (name "kmscon") | |
212 | (version "8") | |
213 | (source (origin | |
214 | (method url-fetch) | |
215 | (uri (string-append | |
216 | "https://freedesktop.org/software/kmscon/releases/" | |
217 | "kmscon-" version ".tar.xz")) | |
218 | (sha256 | |
219 | (base32 | |
5acf00f9 LC |
220 | "0axfwrp3c8f4gb67ap2sqnkn75idpiw09s35wwn6kgagvhf1rc0a")) |
221 | (modules '((guix build utils))) | |
222 | (snippet | |
223 | ;; Use elogind instead of systemd. | |
224 | '(begin | |
225 | (substitute* "configure" | |
226 | (("libsystemd-daemon libsystemd-login") | |
227 | "libelogind")) | |
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>") | |
233 | "") | |
234 | ;; Replace the call to 'sd_booted' by the truth value. | |
235 | (("sd_booted\\(\\)") | |
236 | "1")))))) | |
e8bb4336 DC |
237 | (build-system gnu-build-system) |
238 | (native-inputs | |
7326944b LC |
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))) | |
e8bb4336 DC |
243 | (inputs |
244 | `(("libdrm" ,libdrm) | |
245 | ("libtsm" ,libtsm) | |
246 | ("libxkbcommon" ,libxkbcommon) | |
247 | ("logind" ,elogind) | |
248 | ("mesa" ,mesa) | |
249 | ("pango" ,pango) | |
250 | ("udev" ,eudev))) | |
78325fa8 LC |
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.") | |
e8bb4336 | 258 | (home-page "https://www.freedesktop.org/wiki/Software/kmscon") |
3eb2fca6 DC |
259 | ;; Hash table implementation is lgpl2.1+ licensed. |
260 | ;; The wcwidth implementation in external/wcwidth.{h,c} uses a license | |
261 | ;; derived from ISC. | |
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. | |
78325fa8 LC |
266 | (license (list license:expat license:lgpl2.1+ license:bsd-2 |
267 | license:gpl2+)) | |
268 | (supported-systems (filter (cut string-suffix? "-linux" <>) | |
269 | %supported-systems)))) | |
a3af70ac | 270 | |
db913ac4 JMSG |
271 | (define-public libtermkey |
272 | (package | |
273 | (name "libtermkey") | |
b5b46f87 | 274 | (version "0.20") |
db913ac4 JMSG |
275 | (source (origin |
276 | (method url-fetch) | |
277 | (uri (string-append "http://www.leonerd.org.uk/code/" | |
278 | name "/" name "-" version ".tar.gz")) | |
279 | (sha256 | |
b5b46f87 | 280 | (base32 "1xfj6lchhfljmbcl6dz8dpakppyy13nbl4ykxiv5x4dr9b4qf3bc")))) |
db913ac4 JMSG |
281 | (build-system gnu-build-system) |
282 | (arguments | |
283 | '(#:make-flags (list | |
284 | "CC=gcc" | |
285 | (string-append "PREFIX=" (assoc-ref %outputs "out"))) | |
286 | #:phases (modify-phases %standard-phases | |
287 | (delete 'configure)) | |
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") | |
294 | (description | |
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))) | |
299 | ||
a3af70ac DC |
300 | (define-public picocom |
301 | (package | |
302 | (name "picocom") | |
d0cddec2 | 303 | (version "2.2") |
a3af70ac DC |
304 | (source (origin |
305 | (method url-fetch) | |
306 | (uri (string-append | |
307 | "https://github.com/npat-efault/picocom" | |
308 | "/archive/" version ".tar.gz")) | |
309 | (file-name (string-append name "-" version ".tar.gz")) | |
310 | (sha256 | |
311 | (base32 | |
d0cddec2 | 312 | "1knl6dglnrynx1fhy21nylw56i1q3dkizkgxzkq42mb7ilah8f9y")))) |
a3af70ac DC |
313 | (build-system gnu-build-system) |
314 | (arguments | |
315 | `(#:make-flags '("CC=gcc") | |
316 | #:tests? #f ; No tests | |
317 | #:phases | |
318 | (modify-phases %standard-phases | |
319 | (delete 'configure) | |
320 | (replace 'install | |
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+))) | |
abe2ec73 JMSG |
334 | |
335 | (define-public beep | |
336 | (package | |
337 | (name "beep") | |
338 | (version "1.3") | |
339 | (source (origin | |
340 | (method url-fetch) | |
341 | (uri (string-append "http://www.johnath.com/" name "/" | |
342 | name "-" version ".tar.gz")) | |
343 | (sha256 | |
344 | (base32 | |
345 | "0bgch6jq5cahakk3kbr9549iysf2dik09afixxy5brbxk1xfzb2r")))) | |
346 | (build-system gnu-build-system) | |
347 | (arguments | |
348 | `(#:tests? #f ; no tests. | |
349 | #:phases | |
350 | (modify-phases %standard-phases | |
351 | (delete 'configure) | |
352 | (add-after 'unpack 'patch-makefile | |
353 | (lambda* (#:key outputs #:allow-other-keys) | |
12c15242 TGR |
354 | (substitute* "Makefile" (("/usr") (assoc-ref outputs "out"))) |
355 | #t)) | |
abe2ec73 JMSG |
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+))) | |
f2b7be09 RW |
369 | |
370 | (define-public unibilium | |
371 | (package | |
372 | (name "unibilium") | |
373 | (version "1.2.0") | |
374 | (source | |
375 | (origin | |
376 | (method url-fetch) | |
377 | (uri (string-append "https://github.com/mauke/unibilium/" | |
378 | "archive/v" version ".tar.gz")) | |
379 | (file-name (string-append name "-" version ".tar.gz")) | |
380 | (sha256 | |
381 | (base32 | |
382 | "1n7a0jrlwhn9nnkna76sbnjrr808m0pmzbiwznmp7rhmjl4z2fk2")))) | |
383 | (build-system gnu-build-system) | |
384 | (arguments | |
385 | `(#:make-flags | |
386 | (list "CC=gcc" | |
387 | (string-append "PREFIX=" (assoc-ref %outputs "out"))) | |
388 | #:test-target "test" | |
389 | ;; FIXME: tests require "prove" | |
390 | #:tests? #f | |
391 | #:phases | |
392 | (modify-phases %standard-phases | |
393 | (delete 'configure)))) | |
394 | (native-inputs | |
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+))) | |
ee869cd6 RW |
402 | |
403 | (define-public libvterm | |
404 | (package | |
405 | (name "libvterm") | |
406 | (version "0+bzr681") | |
407 | (source | |
408 | (origin | |
409 | (method url-fetch) | |
410 | (uri (string-append "http://www.leonerd.org.uk/code/libvterm/" | |
411 | "libvterm-" version ".tar.gz")) | |
412 | (sha256 | |
413 | (base32 | |
414 | "1s56c8p1qz6frkcri0hg4qyydv2wcccj6n2xmz1dwcdqn38ldsmb")))) | |
415 | (build-system gnu-build-system) | |
416 | (arguments | |
417 | `(#:make-flags | |
418 | (list "CC=gcc" | |
419 | (string-append "PREFIX=" (assoc-ref %outputs "out"))) | |
420 | #:test-target "test" | |
421 | #:phases | |
422 | (modify-phases %standard-phases | |
423 | (delete 'configure)))) | |
424 | (native-inputs | |
425 | `(("libtool" ,libtool) | |
426 | ("perl" ,perl))) | |
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))) |