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