Commit | Line | Data |
---|---|---|
6a7e1a18 | 1 | ;;; GNU Guix --- Functional package management for GNU |
2206f236 | 2 | ;;; Copyright © 2015, 2016, 2017, 2018, 2019 Efraim Flashner <efraim@flashner.co.il> |
89978a0a | 3 | ;;; Copyright © 2016 Mckinley Olsen <mck.olsen@gmail.com> |
ab1c063a | 4 | ;;; Copyright © 2016, 2017, 2019 Alex Griffin <a@ajgrf.com> |
af39609b | 5 | ;;; Copyright © 2016 David Craven <david@craven.ch> |
6fd5a80d | 6 | ;;; Copyright © 2016, 2017, 2019 Ludovic Courtès <ludo@gnu.org> |
abe2ec73 | 7 | ;;; Copyright © 2016, 2017 José Miguel Sánchez García <jmi2k@openmailbox.org> |
f54d47b8 | 8 | ;;; Copyright © 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr> |
90bf2608 | 9 | ;;; Copyright © 2017 Kei Kebreau <kkebreau@posteo.net> |
456da45c | 10 | ;;; Copyright © 2017, 2018, 2019 Ricardo Wurmus <rekado@elephly.net> |
f9ff014b | 11 | ;;; Copyright © 2017 Petter <petter@mykolab.ch> |
46ddcf4a | 12 | ;;; Copyright © 2018 Hartmut Goebel <h.goebel@crazy-compilers.com> |
40c1b61a | 13 | ;;; Copyright © 2018 Arun Isaac <arunisaac@systemreboot.net> |
b7ec276e | 14 | ;;; Copyright © 2018 Gabriel Hondet <gabrielhondet@gmail.com> |
b412ddcb | 15 | ;;; Copyright © 2019 Rutger Helling <rhelling@mykolab.com> |
68a116bd | 16 | ;;; Copyright © 2018, 2019 Eric Bavier <bavier@member.fsf.org> |
7c1c42c4 | 17 | ;;; Copyright © 2019 Julien Lepiller <julien@lepiller.eu> |
9d282fb1 | 18 | ;;; Copyright © 2019 Pierre Langlois <pierre.langlois@gmx.com> |
4b3ff362 | 19 | ;;; Copyright © 2019 Brett Gilio <brettg@gnu.org> |
e53829be | 20 | ;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net> |
6a7e1a18 EF |
21 | ;;; |
22 | ;;; This file is part of GNU Guix. | |
23 | ;;; | |
24 | ;;; GNU Guix is free software; you can redistribute it and/or modify it | |
25 | ;;; under the terms of the GNU General Public License as published by | |
26 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
27 | ;;; your option) any later version. | |
28 | ;;; | |
29 | ;;; GNU Guix is distributed in the hope that it will be useful, but | |
30 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of | |
31 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
32 | ;;; GNU General Public License for more details. | |
33 | ;;; | |
34 | ;;; You should have received a copy of the GNU General Public License | |
35 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. | |
36 | ||
37 | (define-module (gnu packages terminals) | |
38 | #:use-module ((guix licenses) #:prefix license:) | |
90bf2608 | 39 | #:use-module (guix build-system cmake) |
6a7e1a18 | 40 | #:use-module (guix build-system gnu) |
99e28bbf | 41 | #:use-module (guix build-system glib-or-gtk) |
d0c2f81c | 42 | #:use-module (guix build-system go) |
cb55f9c6 | 43 | #:use-module (guix build-system python) |
6a7e1a18 | 44 | #:use-module (guix download) |
89978a0a | 45 | #:use-module (guix git-download) |
6a7e1a18 | 46 | #:use-module (guix packages) |
f9ff014b | 47 | #:use-module (gnu packages) |
6a7e1a18 | 48 | #:use-module (gnu packages autotools) |
46ddcf4a | 49 | #:use-module (gnu packages check) |
b7ec276e | 50 | #:use-module (gnu packages compression) |
2206f236 | 51 | #:use-module (gnu packages crypto) |
78a81e37 | 52 | #:use-module (gnu packages docbook) |
b7ec276e | 53 | #:use-module (gnu packages fontutils) |
e8bb4336 | 54 | #:use-module (gnu packages freedesktop) |
231908d9 | 55 | #:use-module (gnu packages gcc) |
6a7e1a18 | 56 | #:use-module (gnu packages gettext) |
e8bb4336 | 57 | #:use-module (gnu packages gl) |
6a7e1a18 EF |
58 | #:use-module (gnu packages glib) |
59 | #:use-module (gnu packages gnome) | |
cb3625bc | 60 | #:use-module (gnu packages golang) |
6a7e1a18 | 61 | #:use-module (gnu packages gtk) |
b7ec276e | 62 | #:use-module (gnu packages image) |
932f795c | 63 | #:use-module (gnu packages libcanberra) |
40c1b61a | 64 | #:use-module (gnu packages libevent) |
e8bb4336 | 65 | #:use-module (gnu packages linux) |
78a81e37 | 66 | #:use-module (gnu packages ncurses) |
db913ac4 | 67 | #:use-module (gnu packages perl) |
5ccde207 | 68 | #:use-module (gnu packages perl-check) |
6a7e1a18 | 69 | #:use-module (gnu packages pkg-config) |
2206f236 EF |
70 | #:use-module (gnu packages popt) |
71 | #:use-module (gnu packages protobuf) | |
cb55f9c6 | 72 | #:use-module (gnu packages python) |
589e3f4e | 73 | #:use-module (gnu packages python-web) |
44d10b1f | 74 | #:use-module (gnu packages python-xyz) |
78a81e37 | 75 | #:use-module (gnu packages qt) |
40c1b61a | 76 | #:use-module (gnu packages serialization) |
9d0c291e | 77 | #:use-module (gnu packages sphinx) |
40c1b61a | 78 | #:use-module (gnu packages ssh) |
cf71edee | 79 | #:use-module (gnu packages textutils) |
78325fa8 | 80 | #:use-module (gnu packages xdisorg) |
7326944b | 81 | #:use-module (gnu packages xml) |
90bf2608 | 82 | #:use-module (gnu packages xorg) |
78325fa8 | 83 | #:use-module (srfi srfi-26)) |
6a7e1a18 EF |
84 | |
85 | (define-public tilda | |
86 | (package | |
87 | (name "tilda") | |
97600613 | 88 | (version "1.4.1") |
6a7e1a18 | 89 | (source (origin |
cf8478e5 RW |
90 | (method git-fetch) |
91 | (uri (git-reference | |
92 | (url "https://github.com/lanoxx/tilda.git") | |
93 | (commit (string-append "tilda-" version)))) | |
94 | (file-name (git-file-name name version)) | |
6a7e1a18 EF |
95 | (sha256 |
96 | (base32 | |
cf8478e5 | 97 | "154rsldqjv2m1bddisb930qicb0y35kx7bxq392n2hn68jr2pxkj")))) |
99e28bbf | 98 | (build-system glib-or-gtk-build-system) |
6a7e1a18 | 99 | (arguments |
97600613 | 100 | '(#:phases (modify-phases %standard-phases |
f1c6de37 | 101 | (replace 'bootstrap |
97600613 EF |
102 | (lambda _ |
103 | (setenv "NOCONFIGURE" "true") | |
104 | (invoke "sh" "autogen.sh")))))) | |
6a7e1a18 EF |
105 | (native-inputs |
106 | `(("autoconf" ,autoconf) | |
107 | ("automake" ,automake) | |
b94a6ca0 | 108 | ("gettext" ,gettext-minimal) |
d2a52108 | 109 | ("pkg-config" ,pkg-config))) |
6a7e1a18 | 110 | (inputs |
99e28bbf | 111 | `(("libconfuse" ,libconfuse) |
d2a52108 | 112 | ("vte" ,vte))) |
6a7e1a18 EF |
113 | (synopsis "GTK+-based drop-down terminal") |
114 | (description "Tilda is a terminal emulator similar to normal terminals like | |
115 | gnome-terminal (GNOME) or Konsole (KDE), with the difference that it drops down | |
116 | from the edge of a screen when a certain configurable hotkey is pressed. This | |
117 | is similar to the built-in consoles in some applications. Tilda is highly | |
d1e4ad1b | 118 | configurable through a graphical wizard.") |
6a7e1a18 EF |
119 | (home-page "https://github.com/lanoxx/tilda") |
120 | (license license:gpl2+))) | |
89978a0a MO |
121 | |
122 | (define-public termite | |
123 | (package | |
124 | (name "termite") | |
14da3daa | 125 | (version "15") |
89978a0a MO |
126 | (source |
127 | (origin | |
128 | (method git-fetch) | |
129 | (uri (git-reference | |
130 | (url (string-append "https://github.com/thestinger/" | |
131 | name ".git")) | |
132 | (commit (string-append "v" version)) | |
133 | (recursive? #t))) | |
134 | (file-name (string-append name "-" version "-checkout")) | |
135 | (sha256 | |
ebe3515f | 136 | (base32 |
14da3daa | 137 | "0hp1x6lj098m3jgna274wv5dv60lnzg22297di68g4hw9djjyd2k")))) |
89978a0a MO |
138 | (build-system gnu-build-system) |
139 | (arguments | |
66bb5db7 EF |
140 | `(#:phases |
141 | (modify-phases %standard-phases | |
e53829be JK |
142 | (add-after 'unpack 'patch-xdg-open |
143 | (lambda _ | |
144 | (substitute* "termite.cc" | |
145 | (("xdg-open") (which "xdg-open"))) | |
146 | #t)) | |
66bb5db7 | 147 | (delete 'configure)) |
89978a0a MO |
148 | #:tests? #f |
149 | ;; This sets the destination when installing the necessary terminal | |
150 | ;; capability data, which are not provided by 'ncurses'. See | |
151 | ;; <https://lists.gnu.org/archive/html/bug-ncurses/2009-10/msg00031.html>. | |
152 | #:make-flags (list "PREFIX=" | |
153 | (string-append "VERSION=v" (version)) | |
154 | (string-append "DESTDIR=" | |
155 | (assoc-ref %outputs "out"))))) | |
156 | (inputs | |
c695fb76 TGR |
157 | `(("vte" ,vte-ng) |
158 | ("gtk+" ,gtk+) | |
e53829be | 159 | ("xdg-utils" ,xdg-utils) |
c695fb76 | 160 | ("ncurses" ,ncurses))) |
89978a0a MO |
161 | (native-inputs |
162 | `(("pkg-config" ,pkg-config))) | |
163 | ||
164 | ;; FIXME: This should only be located in 'ncurses'. Nonetheless it is | |
165 | ;; provided for usability reasons. See <https://bugs.gnu.org/22138>. | |
166 | (native-search-paths | |
167 | (list (search-path-specification | |
168 | (variable "TERMINFO_DIRS") | |
169 | (files '("share/terminfo"))))) | |
170 | (home-page "https://github.com/thestinger/termite/") | |
171 | (synopsis "Keyboard-centric, VTE-based terminal") | |
172 | (description "Termite is a minimal terminal emulator designed for use with | |
173 | tiling window managers. It is a modal application, similar to Vim, with an | |
174 | insert mode and command mode where keybindings have different functions.") | |
175 | ||
176 | ;; Files under util/ are under the Expat license; the rest is LGPLv2+. | |
177 | (license license:lgpl2.0+))) | |
cb55f9c6 AG |
178 | |
179 | (define-public asciinema | |
180 | (package | |
181 | (name "asciinema") | |
ab1c063a | 182 | (version "2.0.2") |
cb55f9c6 AG |
183 | (source |
184 | (origin | |
ab1c063a AG |
185 | (method git-fetch) |
186 | (uri (git-reference | |
187 | (url "https://github.com/asciinema/asciinema") | |
188 | (commit (string-append "v" version)))) | |
189 | (file-name (git-file-name name version)) | |
cb55f9c6 AG |
190 | (sha256 |
191 | (base32 | |
ab1c063a | 192 | "1a2pysxnp6icyd08mgf66xr6f6j0irnfxdpf3fmzcz31ix7l9kc4")))) |
cb55f9c6 AG |
193 | (build-system python-build-system) |
194 | (arguments | |
195 | `(#:phases | |
196 | (modify-phases %standard-phases | |
197 | (add-before 'build 'patch-exec-paths | |
198 | (lambda* (#:key inputs #:allow-other-keys) | |
199 | (let ((ncurses (assoc-ref inputs "ncurses"))) | |
ab1c063a | 200 | (substitute* "asciinema/term.py" |
cb55f9c6 AG |
201 | (("'tput'") |
202 | (string-append "'" ncurses "/bin/tput'")))) | |
ab1c063a AG |
203 | #t)) |
204 | (replace 'check | |
205 | (lambda _ (invoke "nosetests" "-v")))))) | |
f3b98f4f | 206 | (inputs `(("ncurses" ,ncurses))) |
39d0de33 MB |
207 | (native-inputs |
208 | ;; For tests. | |
ab1c063a | 209 | `(("python-nose" ,python-nose))) |
cb55f9c6 AG |
210 | (home-page "https://asciinema.org") |
211 | (synopsis "Terminal session recorder") | |
212 | (description | |
213 | "Use asciinema to record and share your terminal sessions, the right way. | |
214 | Forget screen recording apps and blurry video. Enjoy a lightweight, purely | |
215 | text-based approach to terminal recording.") | |
216 | (license license:gpl3))) | |
af39609b DC |
217 | |
218 | (define-public libtsm | |
a7903ca1 MO |
219 | (let ((commit "f70e37982f382b03c6939dac3d5f814450bda253") |
220 | (revision "1")) | |
221 | (package | |
222 | (name "libtsm") | |
223 | (version (git-version "0.0.0" revision commit)) | |
224 | (source (origin | |
225 | (method git-fetch) | |
226 | ;; The freedesktop repository is no longer maintained. | |
227 | (uri (git-reference | |
228 | (url (string-append "https://github.com/Aetf/" name)) | |
229 | (commit commit))) | |
f1d4d79f | 230 | (file-name (git-file-name name version)) |
a7903ca1 MO |
231 | (sha256 |
232 | (base32 | |
233 | "0mwn91i5h5d518i1s05y7hzv6bc13vzcvxszpfh77473iwg4wprx")))) | |
234 | (build-system cmake-build-system) | |
235 | (arguments | |
236 | `(#:configure-flags '("-DBUILD_TESTING=ON"))) | |
237 | (native-inputs | |
238 | `(("pkg-config" ,pkg-config))) | |
239 | (inputs | |
240 | `(("libxkbcommon" ,libxkbcommon) | |
241 | ("check" ,check))) | |
242 | (synopsis "Xterm state machine library") | |
243 | (description "TSM is a state machine for DEC VT100-VT520 compatible | |
af39609b DC |
244 | terminal emulators. It tries to support all common standards while keeping |
245 | compatibility to existing emulators like xterm, gnome-terminal, konsole, etc.") | |
a7903ca1 MO |
246 | (home-page "https://www.freedesktop.org/wiki/Software/libtsm") |
247 | ;; Hash table implementation is lgpl2.1+ licensed. | |
248 | ;; The wcwidth implementation in external/wcwidth.{h,c} uses a license | |
249 | ;; derived from ISC. | |
250 | ;; UCS-4 to UTF-8 encoding is copied from "terminology" which is released | |
251 | ;; under the bsd 2 license. | |
252 | (license (list license:expat license:lgpl2.1+ license:isc license:bsd-2))))) | |
e8bb4336 DC |
253 | |
254 | (define-public kmscon | |
a7903ca1 MO |
255 | (let ((commit "01dd0a231e2125a40ceba5f59fd945ff29bf2cdc") |
256 | (revision "1")) | |
257 | (package | |
258 | (name "kmscon") | |
259 | (version (git-version "0.0.0" revision commit)) | |
260 | (source (origin | |
261 | (method git-fetch) | |
262 | ;; The freedesktop repository is no longer maintained. | |
263 | (uri (git-reference | |
264 | (url (string-append "https://github.com/Aetf/" name)) | |
265 | (commit commit))) | |
266 | (sha256 | |
267 | (base32 | |
268 | "0q62kjsvy2iwy8adfiygx2bfwlh83rphgxbis95ycspqidg9py87")) | |
08af580b MO |
269 | (patches |
270 | (search-patches "kmscon-runtime-keymap-switch.patch")) | |
2c6c002a LC |
271 | (modules '((guix build utils))) |
272 | (file-name (git-file-name name version)))) | |
a7903ca1 MO |
273 | (build-system gnu-build-system) |
274 | (arguments | |
24356427 LC |
275 | `(;; The closure of MESA is huge so we'd rather avoid it. |
276 | #:disallowed-references (,mesa) | |
277 | ||
278 | #:phases (modify-phases %standard-phases | |
e2b9ed7f | 279 | (replace 'bootstrap |
a7903ca1 | 280 | (lambda _ |
e2b9ed7f MB |
281 | (setenv "NOCONFIGURE" "indeed") |
282 | (invoke "sh" "autogen.sh"))) | |
a7903ca1 MO |
283 | ;; Use elogind instead of systemd. |
284 | (add-before 'configure 'remove-systemd | |
285 | (lambda _ | |
286 | (substitute* "configure" | |
287 | (("libsystemd-daemon libsystemd-login") | |
288 | "libelogind")) | |
289 | (substitute* "src/uterm_systemd.c" | |
290 | (("#include <systemd/sd-login.h>") | |
291 | "#include <elogind/sd-login.h>") | |
292 | ;; We don't have this header. | |
293 | (("#include <systemd/sd-daemon\\.h>") | |
294 | "") | |
295 | ;; Replace the call to 'sd_booted' by the truth value. | |
296 | (("sd_booted\\(\\)") | |
297 | "1"))))))) | |
298 | (native-inputs | |
299 | `(("pkg-config" ,pkg-config) | |
300 | ("autoconf" ,autoconf) | |
301 | ("automake" ,automake) | |
302 | ("libtool" ,libtool) | |
303 | ("libxslt" ,libxslt) ;to build the man page | |
304 | ("libxml2" ,libxml2) ;for XML_CATALOG_FILES | |
305 | ("docbook-xsl" ,docbook-xsl))) | |
306 | (inputs | |
307 | `(("libdrm" ,libdrm) | |
308 | ("libtsm" ,libtsm) | |
309 | ("libxkbcommon" ,libxkbcommon) | |
310 | ("logind" ,elogind) | |
24356427 LC |
311 | ;; MESA can be used for accelerated video output via OpenGLESv2, but |
312 | ;; it's a bit dependency that we'd rather avoid in the installation | |
313 | ;; image. | |
314 | ;; ("mesa" ,mesa) | |
a7903ca1 MO |
315 | ("pango" ,pango) |
316 | ("udev" ,eudev))) | |
317 | (synopsis "Linux KMS-based terminal emulator") | |
318 | (description "Kmscon is a terminal emulator based on Linux's @dfn{kernel | |
78325fa8 LC |
319 | mode setting} (KMS). It can replace the in-kernel virtual terminal (VT) |
320 | implementation with a user-space console. Compared to the Linux console, | |
321 | kmscon provides enhanced features including XKB-compatible internationalized | |
322 | keyboard support, UTF-8 input/font support, hardware-accelerated rendering, | |
323 | multi-seat support, a replacement for @command{mingetty}, and more.") | |
a7903ca1 MO |
324 | (home-page "https://www.freedesktop.org/wiki/Software/kmscon") |
325 | ;; Hash table implementation is lgpl2.1+ licensed. | |
326 | ;; The wcwidth implementation in external/wcwidth.{h,c} uses a license | |
327 | ;; derived from ISC. | |
328 | ;; UCS-4 to UTF-8 encoding is copied from "terminology" which is released | |
329 | ;; under the bsd 2 license. | |
330 | ;; Unifont-Font is from http://unifoundry.com/unifont.html and licensed | |
331 | ;; under the terms of the GNU GPL. | |
332 | (license (list license:expat license:lgpl2.1+ license:bsd-2 | |
333 | license:gpl2+)) | |
334 | (supported-systems (filter (cut string-suffix? "-linux" <>) | |
335 | %supported-systems))))) | |
a3af70ac | 336 | |
db913ac4 JMSG |
337 | (define-public libtermkey |
338 | (package | |
339 | (name "libtermkey") | |
eba6731f | 340 | (version "0.21.1") |
db913ac4 JMSG |
341 | (source (origin |
342 | (method url-fetch) | |
49093d75 TGR |
343 | (uri (string-append "http://www.leonerd.org.uk/code/libtermkey/" |
344 | "libtermkey-" version ".tar.gz")) | |
db913ac4 | 345 | (sha256 |
eba6731f | 346 | (base32 "0psd0kf10q5ixfima0mxz10syy7qq1ilz1npr0rz862xycvzgjyf")))) |
db913ac4 JMSG |
347 | (build-system gnu-build-system) |
348 | (arguments | |
349 | '(#:make-flags (list | |
350 | "CC=gcc" | |
351 | (string-append "PREFIX=" (assoc-ref %outputs "out"))) | |
352 | #:phases (modify-phases %standard-phases | |
3351f42a | 353 | (delete 'configure)) ; no configure script |
db913ac4 | 354 | #:test-target "test")) |
c695fb76 TGR |
355 | (inputs `(("ncurses" ,ncurses))) |
356 | (native-inputs `(("libtool" ,libtool) | |
db913ac4 | 357 | ("perl-test-harness" ,perl-test-harness) |
c695fb76 | 358 | ("pkg-config" ,pkg-config))) |
db913ac4 JMSG |
359 | (synopsis "Keyboard entry processing library for terminal-based programs") |
360 | (description | |
361 | "Libtermkey handles all the necessary logic to recognise special keys, UTF-8 | |
362 | combining, and so on, with a simple interface.") | |
363 | (home-page "http://www.leonerd.org.uk/code/libtermkey") | |
364 | (license license:expat))) | |
365 | ||
a3af70ac DC |
366 | (define-public picocom |
367 | (package | |
368 | (name "picocom") | |
33238b55 | 369 | (version "3.1") |
a3af70ac | 370 | (source (origin |
773c1808 RW |
371 | (method git-fetch) |
372 | (uri (git-reference | |
373 | (url "https://github.com/npat-efault/picocom.git") | |
374 | (commit version))) | |
375 | (file-name (git-file-name name version)) | |
a3af70ac DC |
376 | (sha256 |
377 | (base32 | |
33238b55 | 378 | "1vvjydqf0ax47nvdyyl67jafw5b3sfsav00xid6qpgia1gs2r72n")))) |
a3af70ac DC |
379 | (build-system gnu-build-system) |
380 | (arguments | |
381 | `(#:make-flags '("CC=gcc") | |
33238b55 | 382 | #:tests? #f ; no tests |
a3af70ac DC |
383 | #:phases |
384 | (modify-phases %standard-phases | |
33238b55 | 385 | (delete 'configure) ; no configure script |
a3af70ac | 386 | (replace 'install |
33238b55 | 387 | ;; The Makefile lacks an ‘install’ target. |
a3af70ac DC |
388 | (lambda* (#:key outputs #:allow-other-keys) |
389 | (let* ((out (assoc-ref outputs "out")) | |
390 | (bin (string-append out "/bin")) | |
391 | (man (string-append out "/share/man/man1"))) | |
392 | (install-file "picocom" bin) | |
393 | (install-file "picocom.1" man))))))) | |
394 | (home-page "https://github.com/npat-efault/picocom") | |
5e5bd818 TGR |
395 | (synopsis "Minimal dumb-terminal emulator") |
396 | (description | |
397 | "Picocom is a minimal dumb-terminal emulation program. It was designed to | |
398 | serve as a simple and manual modem configuration, testing, and debugging tool. | |
399 | It also serves well as a low-tech serial communications program to allow access | |
400 | to all types of devices that provide serial consoles.") | |
a3af70ac | 401 | (license license:gpl2+))) |
abe2ec73 JMSG |
402 | |
403 | (define-public beep | |
404 | (package | |
405 | (name "beep") | |
f54d47b8 | 406 | (version "1.4.7") |
231908d9 TGR |
407 | (source |
408 | (origin | |
409 | (method git-fetch) | |
410 | (uri (git-reference | |
411 | ;; The original beep 1.3 at <http://www.johnath.com/beep> has been | |
412 | ;; unmaintained for some time, and vulnerable to at least two CVEs: | |
413 | ;; https://github.com/johnath/beep/issues/11#issuecomment-454056858 | |
414 | ;; Use this maintained fork instead. | |
415 | (url "https://github.com/spkr-beep/beep.git") | |
416 | (commit (string-append "v" version)))) | |
417 | (file-name (git-file-name name version)) | |
418 | (sha256 | |
f54d47b8 | 419 | (base32 "0dnbvzzxvajc7pl1165wb3l74pfcqcdg12rcjcw86qqy954dx8my")))) |
abe2ec73 JMSG |
420 | (build-system gnu-build-system) |
421 | (arguments | |
2f49edaa | 422 | `(#:tests? #f ; no tests |
231908d9 TGR |
423 | #:make-flags |
424 | (list (string-append "prefix=" (assoc-ref %outputs "out")) | |
425 | (string-append "pkgdocdir=$(docdir)/" ,name "-" ,version)) | |
abe2ec73 JMSG |
426 | #:phases |
427 | (modify-phases %standard-phases | |
231908d9 TGR |
428 | (delete 'configure)))) ; no configure script |
429 | (native-inputs | |
430 | `(("gcc" ,gcc-8))) ; for ‘-fstack-clash-protection’ | |
abe2ec73 JMSG |
431 | (synopsis "Linux command-line utility to control the PC speaker") |
432 | (description "beep allows the user to control the PC speaker with precision, | |
433 | allowing different sounds to indicate different events. While it can be run | |
434 | quite happily on the command line, its intended place of residence is within | |
435 | scripts, notifying the user when something interesting occurs. Of course, it | |
436 | has no notion of what's interesing, but it's very good at that notifying part.") | |
231908d9 | 437 | (home-page "https://github.com/spkr-beep/beep") |
abe2ec73 | 438 | (license license:gpl2+))) |
f2b7be09 RW |
439 | |
440 | (define-public unibilium | |
441 | (package | |
442 | (name "unibilium") | |
2702aa91 | 443 | (version "2.0.0") |
f2b7be09 RW |
444 | (source |
445 | (origin | |
e784449e RW |
446 | (method git-fetch) |
447 | (uri (git-reference | |
448 | (url "https://github.com/mauke/unibilium.git") | |
449 | (commit (string-append "v" version)))) | |
450 | (file-name (git-file-name name version)) | |
f2b7be09 RW |
451 | (sha256 |
452 | (base32 | |
2702aa91 | 453 | "1wa9a32wzqnxqh1jh554afj13dzjr6mw2wzqzw8d08nza9pg2ra2")))) |
f2b7be09 RW |
454 | (build-system gnu-build-system) |
455 | (arguments | |
456 | `(#:make-flags | |
457 | (list "CC=gcc" | |
458 | (string-append "PREFIX=" (assoc-ref %outputs "out"))) | |
459 | #:test-target "test" | |
460 | ;; FIXME: tests require "prove" | |
461 | #:tests? #f | |
462 | #:phases | |
463 | (modify-phases %standard-phases | |
464 | (delete 'configure)))) | |
465 | (native-inputs | |
2702aa91 GB |
466 | `(("libtool" ,libtool) |
467 | ("perl" ,perl))) | |
f2b7be09 RW |
468 | (home-page "https://github.com/mauke/unibilium") |
469 | (synopsis "Terminfo parsing library") | |
470 | (description "Unibilium is a basic C terminfo library. It doesn't depend | |
471 | on curses or any other library. It also doesn't use global variables, so it | |
472 | should be thread-safe.") | |
473 | (license license:lgpl3+))) | |
ee869cd6 RW |
474 | |
475 | (define-public libvterm | |
476 | (package | |
477 | (name "libvterm") | |
b48d77fc | 478 | (version "0.1.1") |
ee869cd6 RW |
479 | (source |
480 | (origin | |
481 | (method url-fetch) | |
482 | (uri (string-append "http://www.leonerd.org.uk/code/libvterm/" | |
483 | "libvterm-" version ".tar.gz")) | |
484 | (sha256 | |
485 | (base32 | |
b48d77fc | 486 | "1n5maylann2anfifjy576vzyar9q5m1kzpyiz2hca2pacxy8xf4v")))) |
ee869cd6 RW |
487 | (build-system gnu-build-system) |
488 | (arguments | |
489 | `(#:make-flags | |
490 | (list "CC=gcc" | |
491 | (string-append "PREFIX=" (assoc-ref %outputs "out"))) | |
492 | #:test-target "test" | |
493 | #:phases | |
494 | (modify-phases %standard-phases | |
495 | (delete 'configure)))) | |
496 | (native-inputs | |
497 | `(("libtool" ,libtool) | |
498 | ("perl" ,perl))) | |
499 | (home-page "http://www.leonerd.org.uk/code/libvterm/") | |
500 | (synopsis "VT220/xterm/ECMA-48 terminal emulator library") | |
501 | (description "Libvterm is an abstract C99 library which implements a VT220 | |
502 | or xterm-like terminal emulator. It doesn't use any particular graphics | |
503 | toolkit or output system, instead it invokes callback function pointers that | |
504 | its embedding program should provide it to draw on its behalf. It avoids | |
505 | calling @code{malloc} during normal running state, allowing it to be used in | |
506 | embedded kernel situations.") | |
507 | (license license:expat))) | |
f9ff014b P |
508 | |
509 | (define-public cool-retro-term | |
68a116bd EB |
510 | (let ((commit "1.1.1") |
511 | (revision "0")) ;not used currently | |
f9ff014b P |
512 | (package |
513 | (name "cool-retro-term") | |
68a116bd | 514 | (version "1.1.1") |
f9ff014b P |
515 | (source (origin |
516 | (method git-fetch) | |
517 | (file-name (string-append name "-" version "-checkout")) | |
518 | (uri (git-reference | |
519 | (url (string-append "https://github.com/Swordfish90/" name)) | |
520 | (commit commit) | |
521 | (recursive? #t))) | |
522 | (sha256 | |
68a116bd | 523 | (base32 "0wb6anchxa5jpn9c73kr4byrf2xlj8x8qzc5x7ny6saj7kbbvp75")) |
306d8630 EB |
524 | (modules '((guix build utils) |
525 | (srfi srfi-1) | |
526 | (srfi srfi-26) | |
527 | (ice-9 rdelim) | |
528 | (ice-9 regex))) | |
f9ff014b | 529 | (snippet |
306d8630 | 530 | '(let* ((fonts '(;"1971-ibm-3278" ; BSD 3-clause |
306d8630 EB |
531 | "1977-apple2" ; Non-Free |
532 | "1977-commodore-pet" ; Non-Free | |
533 | "1979-atari-400-800" ; Non-Free | |
68a116bd EB |
534 | ;"1981-ibm-pc ; CC-SA 4.0 |
535 | "1982-commodore64")) ; Non-Free | |
536 | ;"1985-ibm-pc-vga" ; CC-SA 4.0 | |
306d8630 EB |
537 | ;"modern-fixedsys-excelsior" ; Redistributable |
538 | ;"modern-hermit" ; SIL | |
539 | ;"modern-inconsolata"; SIL | |
540 | ;"modern-pro-font-win-tweaked" ; X11 | |
541 | ;"modern-proggy-tiny"; X11 | |
542 | ;"modern-terminus" ; SIL | |
306d8630 EB |
543 | (name-rx (make-regexp " *name: *\"([^\"]*)\"")) |
544 | (source-rx (make-regexp " *source: \"fonts/([^/]*)[^\"]*\"")) | |
545 | (fontname-rx (make-regexp "\"fontName\":\"([^\"]*).*")) | |
546 | (names | |
547 | ;; Gather font names from all Fonts*.qml files. | |
548 | ;; These will be used to remove items from the | |
549 | ;; default profiles. | |
550 | (fold | |
551 | (lambda (font-file names) | |
552 | (call-with-input-file font-file | |
553 | (lambda (port) | |
554 | (let loop ((name #f) (names names)) | |
555 | (let ((line (read-line port))) | |
556 | (cond | |
557 | ((eof-object? line) (pk 'names names)) | |
558 | ((regexp-exec name-rx line) | |
559 | => (lambda (m) | |
560 | (loop (match:substring m 1) names))) | |
561 | ((regexp-exec source-rx line) | |
562 | => (lambda (m) | |
563 | (let ((font (match:substring m 1))) | |
564 | (if (member font fonts) | |
565 | (loop #f (lset-adjoin string=? | |
566 | names name)) | |
567 | (loop #f names))))) | |
568 | (else (loop name names)))))))) | |
569 | '() (find-files "app/qml" "Font.*\\.qml")))) | |
570 | ;; Remove the font files themselves | |
6cbee49d MW |
571 | (for-each (lambda (font) |
572 | (delete-file-recursively | |
306d8630 EB |
573 | (string-append "app/qml/fonts/" font))) |
574 | fonts) | |
575 | ;; Remove mention of those fonts in the source | |
576 | (substitute* "app/qml/resources.qrc" | |
577 | (((string-append " *<file>fonts/(" | |
578 | (string-join fonts "|") | |
579 | ").*")) | |
580 | "")) | |
581 | (for-each | |
582 | (lambda (file) | |
583 | (let ((start-rx (make-regexp " *ListElement\\{")) | |
584 | (end-rx (make-regexp " *\\}"))) | |
585 | (with-atomic-file-replacement file | |
586 | (lambda (in out) | |
587 | (let loop ((line-buffer '()) | |
588 | (hold? #f) | |
589 | (discard? #f)) | |
590 | (let ((line (read-line in 'concat))) | |
591 | (cond | |
592 | ((eof-object? line) #t) ;done | |
593 | ((regexp-exec start-rx line) | |
594 | (loop (cons line line-buffer) #t #f)) | |
595 | ((or (regexp-exec source-rx line) | |
596 | (regexp-exec fontname-rx line)) | |
597 | => (lambda (m) | |
598 | (let ((font-or-name (match:substring m 1))) | |
599 | (if (or (member font-or-name fonts) | |
600 | (member font-or-name names)) | |
601 | (loop '() #f #t) | |
602 | (loop (cons line line-buffer) | |
603 | hold? #f))))) | |
604 | ((regexp-exec end-rx line) | |
605 | (unless discard? | |
606 | (for-each (cut display <> out) | |
607 | (reverse line-buffer)) | |
608 | (display line out)) | |
609 | (loop '() #f #f)) | |
610 | (hold? (loop (cons line line-buffer) | |
611 | hold? discard?)) | |
612 | (discard? (loop line-buffer #f #t)) | |
613 | (else (display line out) | |
614 | (loop '() #f #f))))))))) | |
615 | '("app/qml/FontPixels.qml" | |
616 | "app/qml/FontScanlines.qml" | |
617 | "app/qml/Fonts.qml" | |
618 | "app/qml/ApplicationSettings.qml")) | |
619 | ;; Final substitution for default scanline and pixel fonts | |
620 | (substitute* "app/qml/ApplicationSettings.qml" | |
c52872bf | 621 | (("COMMODORE_PET") "PROGGY_TINY")) |
6cbee49d | 622 | #t)))) |
f9ff014b P |
623 | (build-system gnu-build-system) |
624 | (inputs | |
625 | `(("qtbase" ,qtbase) | |
626 | ("qtdeclarative" ,qtdeclarative) | |
627 | ("qtgraphicaleffects" ,qtgraphicaleffects) | |
628 | ("qtquickcontrols" ,qtquickcontrols))) | |
629 | (arguments | |
630 | `(#:phases | |
631 | (modify-phases %standard-phases | |
632 | (replace 'configure | |
633 | (lambda* (#:key outputs #:allow-other-keys) | |
306d8630 | 634 | (let ((out (assoc-ref outputs "out"))) |
f9ff014b P |
635 | (substitute* '("qmltermwidget/qmltermwidget.pro") |
636 | (("INSTALL_DIR = \\$\\$\\[QT_INSTALL_QML\\]") | |
669be6ac | 637 | (string-append "INSTALL_DIR = " out "/lib/qt5/qml"))) |
306d8630 EB |
638 | (substitute* '("cool-retro-term.pro" "app/app.pro") |
639 | (("/usr") out)) | |
640 | (invoke "qmake")))) | |
f9ff014b P |
641 | (add-after 'install 'wrap-executable |
642 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
306d8630 EB |
643 | (let ((out (assoc-ref outputs "out")) |
644 | (qml "/lib/qt5/qml")) | |
f9ff014b P |
645 | (wrap-program (string-append out "/bin/cool-retro-term") |
646 | `("QML2_IMPORT_PATH" ":" prefix | |
647 | (,(string-append out qml) | |
306d8630 EB |
648 | ,@(map (lambda (i) |
649 | (string-append (assoc-ref inputs i) qml)) | |
650 | '("qtdeclarative" | |
651 | "qtgraphicaleffects" | |
652 | "qtquickcontrols"))))) | |
653 | #t))) | |
f9ff014b P |
654 | (add-after 'install 'add-alternate-name |
655 | (lambda* (#:key outputs #:allow-other-keys) | |
306d8630 | 656 | (let ((bin (string-append (assoc-ref outputs "out") "/bin"))) |
f9ff014b | 657 | (symlink (string-append bin "/cool-retro-term") |
68a116bd EB |
658 | (string-append bin "/crt")) |
659 | #t))) | |
306d8630 EB |
660 | (add-after 'install 'install-man |
661 | (lambda* (#:key outputs #:allow-other-keys) | |
662 | (let ((mandir (string-append (assoc-ref outputs "out") | |
663 | "/share/man/man1"))) | |
664 | (install-file "packaging/debian/cool-retro-term.1" mandir) | |
665 | #t)))))) | |
f9ff014b P |
666 | (synopsis "Terminal emulator") |
667 | (description | |
668 | "Cool-retro-term (crt) is a terminal emulator which mimics the look and | |
669 | feel of the old cathode ray tube (CRT) screens. It has been designed to be | |
670 | eye-candy, customizable, and reasonably lightweight.") | |
671 | (home-page "https://github.com/Swordfish90/cool-retro-term") | |
672 | (license (list | |
673 | license:gpl2+ ; qmltermwidget | |
674 | license:gpl3+ ; cool-retro-term | |
675 | ;; Fonts | |
676 | license:silofl1.1 | |
677 | license:x11 | |
678 | license:bsd-3))))) | |
90bf2608 KK |
679 | |
680 | (define-public sakura | |
681 | (package | |
682 | (name "sakura") | |
9d282fb1 | 683 | (version "3.7.0") |
90bf2608 KK |
684 | (source (origin |
685 | (method url-fetch) | |
686 | (uri (string-append "https://launchpad.net/" name "/trunk/" | |
687 | version "/+download/" name "-" version | |
9d282fb1 | 688 | ".tar.gz")) |
90bf2608 KK |
689 | (sha256 |
690 | (base32 | |
9d282fb1 | 691 | "15gskj5yv5qs3cj4ps43735kfx2nzjlhq4dk9ghirl8lvhhxsm5m")))) |
90bf2608 KK |
692 | (build-system cmake-build-system) |
693 | (arguments | |
42d93a32 | 694 | '(#:tests? #f)) ; no check phase |
90bf2608 KK |
695 | (native-inputs |
696 | `(("gettext" ,gettext-minimal) | |
42d93a32 | 697 | ("perl" ,perl) ; for pod2man |
90bf2608 KK |
698 | ("pkg-config" ,pkg-config))) |
699 | (inputs | |
700 | `(("libxft" ,libxft) | |
701 | ("vte" ,vte))) | |
702 | (home-page "https://launchpad.net/sakura") | |
703 | (synopsis "A simple but powerful libvte-based terminal emulator") | |
704 | (description "@code{Sakura} is a terminal emulator based on GTK+ and VTE. | |
705 | It's a terminal emulator with few dependencies, so you don't need a full GNOME | |
706 | desktop installed to have a decent terminal emulator.") | |
707 | (license license:gpl2))) | |
d0c2f81c | 708 | |
cf71edee | 709 | (define-public go-github.com-nsf-termbox-go |
7c1c42c4 JL |
710 | (let ((commit "288510b9734e30e7966ec2f22b87c5f8e67345e3") |
711 | (revision "1")) | |
cf71edee CB |
712 | (package |
713 | (name "go-github.com-nsf-termbox-go") | |
714 | (version (git-version "0.0.0" revision commit)) | |
715 | (source (origin | |
716 | (method git-fetch) | |
717 | (uri (git-reference | |
718 | (url "https://github.com/nsf/termbox-go.git") | |
719 | (commit commit))) | |
720 | (file-name (git-file-name name version)) | |
721 | (sha256 | |
722 | (base32 | |
7c1c42c4 | 723 | "0hdyisfaf8yb55h3p03p4sbq19546mp9fy28f2kn659mycmhxqk4")))) |
cf71edee CB |
724 | (build-system go-build-system) |
725 | (arguments | |
726 | '(#:import-path "github.com/nsf/termbox-go")) | |
727 | (propagated-inputs | |
728 | `(("go-github.com-mattn-go-runewidth" | |
729 | ,go-github.com-mattn-go-runewidth))) | |
730 | (synopsis "@code{termbox} provides a minimal API for text-based user | |
731 | interfaces") | |
732 | (description | |
733 | "Termbox is a library that provides a minimalistic API which allows the | |
734 | programmer to write text-based user interfaces.") | |
735 | (home-page "https://github.com/nsf/termbox-go") | |
736 | (license license:expat)))) | |
737 | ||
cb3625bc BL |
738 | (define-public go-github-com-junegunn-fzf |
739 | (package | |
740 | (name "go-github-com-junegunn-fzf") | |
741 | (version "0.18.0") | |
742 | (source | |
743 | (origin | |
744 | (method git-fetch) | |
745 | (uri (git-reference | |
746 | (url "https://github.com/junegunn/fzf") | |
747 | (commit version))) | |
748 | (file-name (git-file-name name version)) | |
749 | (sha256 | |
750 | (base32 | |
751 | "0pwpr4fpw56yzzkcabzzgbgwraaxmp7xzzmap7w1xsrkbj7dl2xl")))) | |
752 | (build-system go-build-system) | |
753 | (arguments | |
754 | `(#:import-path "github.com/junegunn/fzf")) | |
755 | (inputs | |
756 | `(("go-github.com-mattn-go-runewidth" ,go-github.com-mattn-go-runewidth) | |
757 | ("go-github-com-mattn-go-shellwords" ,go-github-com-mattn-go-shellwords) | |
758 | ("go-github-com-mattn-go-isatty" ,go-github-com-mattn-go-isatty) | |
759 | ("go-github-com-gdamore-tcell" ,go-github-com-gdamore-tcell) | |
561d391b | 760 | ("go-golang-org-x-crypto" ,go-golang-org-x-crypto))) |
cb3625bc BL |
761 | (home-page "https://github.com/junegunn/fzf") |
762 | (synopsis "Command-line fuzzy-finder") | |
763 | (description "This package provides an interactive command-line filter | |
764 | usable with any list--including files, command history, processes and more.") | |
765 | (license license:expat))) | |
766 | ||
f8ce6eb6 CB |
767 | (define-public go-github.com-howeyc-gopass |
768 | (let ((commit "bf9dde6d0d2c004a008c27aaee91170c786f6db8") | |
769 | (revision "0")) | |
770 | (package | |
771 | (name "go-github.com-howeyc-gopass") | |
772 | (version (git-version "0.0.0" revision commit)) | |
773 | (source (origin | |
774 | (method git-fetch) | |
775 | (uri (git-reference | |
776 | (url "https://github.com/howeyc/gopass.git") | |
777 | (commit commit))) | |
778 | (file-name (git-file-name name version)) | |
779 | (sha256 | |
780 | (base32 | |
781 | "1jxzyfnqi0h1fzlsvlkn10bncic803bfhslyijcxk55mgh297g45")))) | |
782 | (build-system go-build-system) | |
783 | (arguments | |
784 | '(#:import-path "github.com/howeyc/gopass")) | |
785 | (propagated-inputs | |
561d391b LF |
786 | `(("go-golang-org-x-crypto" |
787 | ,go-golang-org-x-crypto))) | |
f8ce6eb6 CB |
788 | (synopsis "Retrieve password from a terminal or piped input in Go") |
789 | (description | |
790 | "@code{gopass} is a Go package for retrieving a password from user | |
791 | terminal or piped input.") | |
792 | (home-page "https://github.com/howeyc/gopass") | |
793 | (license license:isc)))) | |
46ddcf4a HG |
794 | |
795 | (define-public python-pyte | |
796 | (package | |
797 | (name "python-pyte") | |
798 | (version "0.7.0") | |
799 | (source | |
800 | (origin | |
801 | (method url-fetch) | |
802 | (uri (pypi-uri "pyte" version)) | |
803 | (sha256 | |
804 | (base32 | |
805 | "1an54hvyjm8gncx8cgabz9mkpgjkdb0bkyjlkh7g7f94nr3wnfl7")))) | |
806 | (build-system python-build-system) | |
807 | (arguments | |
808 | '(#:phases | |
809 | (modify-phases %standard-phases | |
810 | (add-after 'unpack 'remove-failing-test | |
811 | ;; TODO: Reenable when the `captured` files required by this test | |
812 | ;; are included in the archive. | |
813 | (lambda _ | |
814 | (delete-file "tests/test_input_output.py") | |
815 | #t))))) | |
816 | (propagated-inputs | |
c695fb76 | 817 | `(("python-wcwidth" ,python-wcwidth))) |
46ddcf4a HG |
818 | (native-inputs |
819 | `(("python-pytest-runner" ,python-pytest-runner) | |
820 | ("python-pytest" ,python-pytest))) | |
821 | (home-page "https://pyte.readthedocs.io/") | |
822 | (synopsis "Simple VTXXX-compatible terminal emulator") | |
823 | (description "@code{pyte} is an in-memory VTxxx-compatible terminal | |
824 | emulator. @var{VTxxx} stands for a series of video terminals, developed by | |
825 | DEC between 1970 and 1995. The first and probably most famous one was the | |
826 | VT100 terminal, which is now a de-facto standard for all virtual terminal | |
827 | emulators. | |
828 | ||
829 | pyte is a fork of vt102, which was an incomplete pure Python implementation | |
830 | of VT100 terminal.") | |
831 | (license license:lgpl3+))) | |
832 | ||
833 | (define-public python2-pyte | |
834 | (package-with-python2 python-pyte)) | |
573450e6 HG |
835 | |
836 | (define-public python-blessings | |
837 | (package | |
838 | (name "python-blessings") | |
5076c13b | 839 | (version "1.7") |
573450e6 HG |
840 | (source |
841 | (origin | |
842 | (method url-fetch) | |
843 | (uri (pypi-uri "blessings" version)) | |
844 | (sha256 | |
845 | (base32 | |
5076c13b | 846 | "0z8mgkbmisxs10rz88qg46l1c9a8n08k8cy2iassal2zh16qbrcq")))) |
573450e6 HG |
847 | (build-system python-build-system) |
848 | (arguments | |
d1efb11a | 849 | ;; FIXME: Test suite is unable to detect TTY conditions. |
573450e6 HG |
850 | `(#:tests? #f)) |
851 | (native-inputs | |
d1efb11a BG |
852 | `(("python-nose" ,python-nose) |
853 | ("python-six" ,python-six))) | |
573450e6 HG |
854 | (home-page "https://github.com/erikrose/blessings") |
855 | (synopsis "Python module to manage terminal color, styling, and | |
856 | positioning") | |
857 | (description "Blessings is a pythonic API to manipulate terminal color, | |
858 | styling, and positioning. It provides similar features to curses but avoids | |
859 | some of curses’s limitations: it does not require clearing the whole screen | |
860 | for little changes, provides a scroll-back buffer after the program exits, and | |
861 | avoids styling altogether when the output is redirected to something other | |
862 | than a terminal.") | |
863 | (license license:expat))) | |
864 | ||
865 | (define-public python2-blessings | |
866 | (package-with-python2 python-blessings)) | |
e79a8424 HG |
867 | |
868 | (define-public python-curtsies | |
869 | (package | |
870 | (name "python-curtsies") | |
871 | (version "0.2.11") | |
872 | (source | |
873 | (origin | |
874 | (method url-fetch) | |
875 | (uri (pypi-uri "curtsies" version)) | |
876 | (sha256 | |
877 | (base32 | |
878 | "1vljmw3sy6lrqahhpyg4gk13mzcx3mwhvg8s41698ms3cpgkjipc")))) | |
879 | (build-system python-build-system) | |
880 | (arguments | |
881 | `(#:phases | |
882 | (modify-phases %standard-phases | |
883 | (replace 'check | |
884 | (lambda _ | |
885 | (invoke "nosetests" "-v")))))) | |
886 | (propagated-inputs | |
887 | `(("python-blessings" ,python-blessings) | |
c695fb76 | 888 | ("python-wcwidth" ,python-wcwidth))) |
e79a8424 HG |
889 | (native-inputs |
890 | `(("python-mock" ,python-mock) | |
891 | ("python-pyte" ,python-pyte) | |
892 | ("python-nose" ,python-nose))) | |
893 | (home-page "https://github.com/thomasballinger/curtsies") | |
894 | (synopsis "Library for curses-like terminal interaction with colored | |
895 | strings") | |
896 | (description "Curtsies is a Python library for interacting with the | |
897 | terminal. It features string-like objects which carry formatting information, | |
898 | per-line fullscreen terminal rendering, and keyboard input event reporting.") | |
899 | (license license:expat))) | |
900 | ||
901 | (define-public python2-curtsies | |
902 | (package-with-python2 python-curtsies)) | |
40c1b61a AI |
903 | |
904 | (define-public tmate | |
905 | (package | |
906 | (name "tmate") | |
907 | (version "2.2.1") | |
908 | (source | |
909 | (origin | |
82a0787c RW |
910 | (method git-fetch) |
911 | (uri (git-reference | |
912 | (url "https://github.com/tmate-io/tmate.git") | |
913 | (commit version))) | |
914 | (file-name (git-file-name name version)) | |
40c1b61a AI |
915 | (sha256 |
916 | (base32 | |
82a0787c | 917 | "0pfl9vrswzim9ydi1n652h3rax2zrmy6sqkp0r09yy3lw83h4y1r")))) |
40c1b61a AI |
918 | (build-system gnu-build-system) |
919 | (inputs | |
920 | `(("libevent" ,libevent) | |
921 | ("libssh" ,libssh) | |
922 | ("msgpack" ,msgpack) | |
923 | ("ncurses" ,ncurses))) | |
924 | (native-inputs | |
925 | `(("autoconf" ,autoconf) | |
926 | ("automake" ,automake) | |
927 | ("pkg-config" ,pkg-config))) | |
928 | (home-page "https://tmate.io/") | |
929 | (synopsis "Terminal sharing application") | |
930 | (description "tmate is a terminal sharing application that allows you to | |
931 | share your terminal with other users over the Internet. tmate is a fork of | |
932 | tmux.") | |
933 | (license license:isc))) | |
b7ec276e GH |
934 | |
935 | (define-public kitty | |
936 | (package | |
937 | (name "kitty") | |
56bae7f3 | 938 | (version "0.16.0") |
b7ec276e GH |
939 | (home-page "https://sw.kovidgoyal.net/kitty/") |
940 | (source | |
941 | (origin | |
942 | (method git-fetch) | |
943 | (uri (git-reference | |
944 | (url "https://github.com/kovidgoyal/kitty.git") | |
945 | (commit (string-append "v" version)))) | |
946 | (file-name (git-file-name name version)) | |
947 | (sha256 | |
56bae7f3 | 948 | (base32 "1bszyddar0g1gdz67h8rd3gbrdhi6ahjg7j14cjiqxm1938z9ajf")) |
b7ec276e GH |
949 | (modules '((guix build utils))) |
950 | (snippet | |
951 | '(begin | |
952 | ;; patch needed as sphinx-build is used as a python script | |
953 | ;; whereas the guix package uses a bash script launching the | |
954 | ;; python script | |
955 | (substitute* "docs/conf.py" | |
956 | (("(from kitty.constants import str_version)" kitty-imp) | |
957 | (string-append "sys.path.append(\"..\")\n" kitty-imp))) | |
958 | (substitute* "docs/Makefile" | |
959 | (("^SPHINXBUILD[[:space:]]+= (python3.*)$") | |
960 | "SPHINXBUILD = sphinx-build\n")) | |
961 | #t)))) | |
962 | (build-system gnu-build-system) | |
963 | (inputs | |
964 | `(("python" ,python) | |
965 | ("harfbuzz" ,harfbuzz) | |
966 | ("zlib" ,zlib) | |
932f795c | 967 | ("libcanberra" ,libcanberra) |
b7ec276e GH |
968 | ("libpng" ,libpng) |
969 | ("freetype" ,freetype) | |
970 | ("fontconfig" ,fontconfig) | |
b412ddcb RH |
971 | ("pygments" ,python-pygments) |
972 | ("wayland" ,wayland))) | |
b7ec276e GH |
973 | (native-inputs |
974 | `(("pkg-config" ,pkg-config) | |
975 | ("libxrandr" ,libxrandr) | |
976 | ("libdbus" ,dbus) | |
977 | ("libxcursor" ,libxcursor) | |
978 | ("libxi" ,libxi) | |
979 | ("libxinerama" ,libxinerama) | |
980 | ("libgl1-mesa" ,mesa) | |
981 | ("libxkbcommon" ,libxkbcommon) | |
982 | ("sphinx" ,python-sphinx) | |
983 | ("ncurses" ,ncurses) ;; for tic command | |
984 | ("wayland-protocols" ,wayland-protocols))) | |
985 | (arguments | |
986 | '(#:phases (modify-phases %standard-phases | |
987 | (delete 'configure) | |
b412ddcb RH |
988 | ;; Wayland backend requires EGL, which isn't found |
989 | ;; out-of-the-box for some reason. Hard-code it instead. | |
990 | (add-after 'unpack 'hard-code-libegl | |
991 | (lambda _ | |
992 | (let* ((mesa (assoc-ref %build-inputs "libgl1-mesa")) | |
993 | (libegl (string-append mesa "/lib/libEGL.so.1"))) | |
994 | (substitute* "glfw/egl_context.c" | |
995 | (("libEGL.so.1") libegl))) | |
996 | #t)) | |
b7ec276e GH |
997 | (replace 'build |
998 | (lambda _ | |
999 | (invoke "python3" "setup.py" "linux-package"))) | |
1000 | (replace 'check | |
1001 | (lambda _ | |
1002 | (invoke "python3" "setup.py" "test"))) | |
1003 | (add-before 'install 'rm-pycache | |
1004 | ;; created python cache __pycache__ are non deterministic | |
1005 | (lambda _ | |
1006 | (let ((pycaches (find-files "linux-package/" | |
1007 | "__pycache__" | |
1008 | #:directories? #t))) | |
1009 | (for-each delete-file-recursively pycaches) | |
1010 | #t))) | |
1011 | (replace 'install | |
1012 | (lambda _ | |
1013 | (let* ((out (assoc-ref %outputs "out")) | |
1014 | (obin (string-append out "/bin")) | |
1015 | (olib (string-append out "/lib")) | |
1016 | (oshare (string-append out "/share"))) | |
1017 | (copy-recursively "linux-package/bin" obin) | |
1018 | (copy-recursively "linux-package/share" oshare) | |
1019 | (copy-recursively "linux-package/lib" olib) | |
1020 | #t)))))) | |
1021 | (synopsis "Fast, featureful, GPU based terminal emulator") | |
1022 | (description "Kitty is a fast and featureful GPU-based terminal emulator: | |
1023 | @itemize | |
1024 | @item Offloads rendering to the GPU for lower system load and buttery smooth | |
1025 | scrolling. Uses threaded rendering to minimize input latency. | |
1026 | @item Supports all modern terminal features: graphics (images), unicode, | |
1027 | true-color, OpenType ligatures, mouse protocol, focus tracking, bracketed | |
1028 | paste and several new terminal protocol extensions. | |
1029 | @item Supports tiling multiple terminal windows side by side in different | |
1030 | layouts without needing to use an extra program like tmux. | |
1031 | @item Can be controlled from scripts or the shell prompt, even over SSH. | |
1032 | @item Has a framework for Kittens, small terminal programs that can be used to | |
1033 | extend kitty's functionality. For example, they are used for Unicode input, | |
1034 | hints, and side-by-side diff. | |
1035 | @item Supports startup sessions which allow you to specify the window/tab | |
1036 | layout, working directories and programs to run on startup. | |
1037 | @item Allows you to open the scrollback buffer in a separate window using | |
1038 | arbitrary programs of your choice. This is useful for browsing the history | |
1039 | comfortably in a pager or editor. | |
1040 | @end itemize") | |
1041 | (license license:gpl3+))) | |
2206f236 EF |
1042 | |
1043 | (define-public eternalterminal | |
1044 | (package | |
1045 | (name "eternalterminal") | |
b37fa81d | 1046 | (version "5.1.10") |
2206f236 EF |
1047 | (source |
1048 | (origin | |
1049 | (method git-fetch) | |
1050 | (uri (git-reference | |
1051 | (url "https://github.com/MisterTea/EternalTerminal.git") | |
1052 | (commit (string-append "et-v" version)))) | |
1053 | (file-name (git-file-name name version)) | |
1054 | (sha256 | |
b37fa81d | 1055 | (base32 "0jh89229bd9s82h3aj6faaybwr5xvnk8w2kgz47gq263pz021zpl")))) |
2206f236 EF |
1056 | (build-system cmake-build-system) |
1057 | (arguments | |
1058 | '(#:configure-flags '("-DBUILD_TEST=ON") | |
1059 | #:phases | |
1060 | (modify-phases %standard-phases | |
1061 | (add-after 'unpack 'insert-googletests | |
1062 | (lambda* (#:key inputs #:allow-other-keys) | |
1063 | (let ((tests (assoc-ref inputs "googletest"))) | |
d5640c58 EF |
1064 | (copy-recursively tests "external/googletest")) |
1065 | #t)) | |
2206f236 EF |
1066 | (add-after 'install 'dont-provide-gtest-libraries |
1067 | (lambda* (#:key outputs #:allow-other-keys) | |
1068 | (let ((out (assoc-ref outputs "out"))) | |
1069 | (delete-file-recursively (string-append out "/include")) | |
1070 | (delete-file-recursively (string-append out "/lib"))) | |
1071 | #t))))) | |
1072 | (inputs | |
1073 | `(("gflags" ,gflags) | |
1074 | ("libsodium" ,libsodium) | |
1075 | ("protobuf" ,protobuf))) | |
1076 | (native-inputs | |
1077 | `(("googletest" ,(package-source googletest)))) | |
1078 | (home-page "https://mistertea.github.io/EternalTerminal/") | |
1079 | (synopsis "Remote shell that reconnects without interrupting the session") | |
1080 | (description "@dfn{Eternal Terminal} (ET) is a remote shell that | |
1081 | automatically reconnects without interrupting the session. ET uses SSH to | |
1082 | initialize a secure connection. Unlike SSH sessions, which must be killed and | |
1083 | reconnected after a network outage an ET session will survive network outages | |
1084 | and IP roaming. ET provides the same core functionality as @command{mosh}, | |
1085 | while also supporting native scrolling and @command{tmux} control mode | |
1086 | (@code{tmux -CC}).") | |
1087 | (license license:asl2.0))) | |
f9948ab6 | 1088 | |
1089 | (define-public wterm | |
1090 | (package | |
1091 | (name "wterm") | |
1092 | (version "0.7") | |
1093 | (source | |
1094 | (origin | |
1095 | (method git-fetch) | |
1096 | (uri (git-reference | |
1097 | (url "https://github.com/majestrate/wterm.git") | |
1098 | (commit "0ae42717c08a85a6509214e881422c7fbe7ecc45"))) | |
1099 | (sha256 | |
1100 | (base32 | |
1101 | "0g4lzmc1w6na81i6hny32xds4xfig4xzswzfijyi6p93a1226dv0")) | |
1102 | (file-name (git-file-name name version)))) | |
1103 | (build-system gnu-build-system) | |
1104 | (native-inputs | |
1105 | `(("pkg-config" ,pkg-config))) | |
1106 | (inputs | |
1107 | `(("fontconfig" ,fontconfig) | |
1108 | ("freetype" ,freetype) | |
1109 | ("libdrm" ,libdrm) | |
1110 | ("libxkbcommon" ,libxkbcommon) | |
1111 | ("ncurses" ,ncurses) | |
1112 | ("pixman" ,pixman) | |
1113 | ("wayland" ,wayland))) | |
1114 | (arguments | |
1115 | '(#:tests? #f | |
1116 | ||
1117 | ;; Without -j1 it fails to find file libwld.a. | |
1118 | #:parallel-build? #f | |
1119 | ||
1120 | #:make-flags (list "CC=gcc" | |
1121 | (string-append "PREFIX=" %output) | |
1122 | (string-append "TERMINFO=" | |
1123 | (assoc-ref %outputs "out") | |
1124 | "/share/terminfo")) | |
1125 | #:phases | |
1126 | (modify-phases %standard-phases | |
1127 | (delete 'configure) | |
1128 | (add-after 'unpack 'terminfo-fix | |
1129 | (lambda _ | |
1130 | (substitute* "Makefile" | |
1131 | (("\ttic .*") "\tmkdir -p $(SHARE_PREFIX)/share/terminfo | |
1132 | \ttic -o $(SHARE_PREFIX)/share/terminfo -s wterm.info\n")) | |
1133 | #t))))) | |
1134 | (native-search-paths | |
1135 | (list (search-path-specification | |
1136 | (variable "TERMINFO_DIRS") | |
1137 | (files '("share/terminfo"))))) | |
1138 | (home-page "https://github.com/majestrate/wterm") | |
1139 | (synopsis "Terminal emulator for Wayland") | |
1140 | (description "wterm is a native Wayland terminal emulator based on | |
1141 | an st fork using wld. st is a simple terminal emulator for X originally | |
1142 | made by suckless.") | |
1143 | (license license:x11))) |