Commit | Line | Data |
---|---|---|
6a7e1a18 | 1 | ;;; GNU Guix --- Functional package management for GNU |
37042a0f | 2 | ;;; Copyright © 2015, 2016 Efraim Flashner <efraim@flashner.co.il> |
89978a0a | 3 | ;;; Copyright © 2016 Mckinley Olsen <mck.olsen@gmail.com> |
98b9732c | 4 | ;;; Copyright © 2016, 2017 Alex Griffin <a@ajgrf.com> |
af39609b | 5 | ;;; Copyright © 2016 David Craven <david@craven.ch> |
c2ffcc44 | 6 | ;;; Copyright © 2016, 2017 Ludovic Courtès <ludo@gnu.org> |
abe2ec73 JMSG |
7 | ;;; Copyright © 2016, 2017 José Miguel Sánchez García <jmi2k@openmailbox.org> |
8 | ;;; Copyright © 2017 Tobias Geerinckx-Rice <me@tobias.gr> | |
f2b7be09 | 9 | ;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net> |
f9ff014b | 10 | ;;; Copyright © 2017 Petter <petter@mykolab.ch> |
6a7e1a18 EF |
11 | ;;; |
12 | ;;; This file is part of GNU Guix. | |
13 | ;;; | |
14 | ;;; GNU Guix is free software; you can redistribute it and/or modify it | |
15 | ;;; under the terms of the GNU General Public License as published by | |
16 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
17 | ;;; your option) any later version. | |
18 | ;;; | |
19 | ;;; GNU Guix is distributed in the hope that it will be useful, but | |
20 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of | |
21 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
22 | ;;; GNU General Public License for more details. | |
23 | ;;; | |
24 | ;;; You should have received a copy of the GNU General Public License | |
25 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. | |
26 | ||
27 | (define-module (gnu packages terminals) | |
28 | #:use-module ((guix licenses) #:prefix license:) | |
29 | #:use-module (guix build utils) | |
30 | #:use-module (guix build-system gnu) | |
cb55f9c6 | 31 | #:use-module (guix build-system python) |
6a7e1a18 | 32 | #:use-module (guix download) |
89978a0a | 33 | #:use-module (guix git-download) |
6a7e1a18 | 34 | #:use-module (guix packages) |
f9ff014b | 35 | #:use-module (gnu packages) |
6a7e1a18 | 36 | #:use-module (gnu packages autotools) |
78a81e37 | 37 | #:use-module (gnu packages docbook) |
e8bb4336 | 38 | #:use-module (gnu packages freedesktop) |
6a7e1a18 | 39 | #:use-module (gnu packages gettext) |
e8bb4336 | 40 | #:use-module (gnu packages gl) |
6a7e1a18 EF |
41 | #:use-module (gnu packages glib) |
42 | #:use-module (gnu packages gnome) | |
43 | #:use-module (gnu packages gtk) | |
e8bb4336 | 44 | #:use-module (gnu packages linux) |
78a81e37 | 45 | #:use-module (gnu packages ncurses) |
db913ac4 | 46 | #:use-module (gnu packages perl) |
6a7e1a18 | 47 | #:use-module (gnu packages pkg-config) |
cb55f9c6 | 48 | #:use-module (gnu packages python) |
78a81e37 | 49 | #:use-module (gnu packages qt) |
89978a0a | 50 | #:use-module (gnu packages wm) |
78325fa8 | 51 | #:use-module (gnu packages xdisorg) |
7326944b | 52 | #:use-module (gnu packages xml) |
78325fa8 | 53 | #:use-module (srfi srfi-26)) |
6a7e1a18 EF |
54 | |
55 | (define-public tilda | |
56 | (package | |
57 | (name "tilda") | |
37042a0f | 58 | (version "1.3.3") |
6a7e1a18 EF |
59 | (source (origin |
60 | (method url-fetch) | |
61 | (uri (string-append "https://github.com/lanoxx/tilda/archive/" | |
d2a52108 | 62 | "tilda-" version ".tar.gz")) |
6a7e1a18 EF |
63 | (sha256 |
64 | (base32 | |
37042a0f | 65 | "1cc4qbg1m3i04lj5p6i6xbd0zvy1320pxdgmjhz5p3j95ibsbfki")))) |
6a7e1a18 EF |
66 | (build-system gnu-build-system) |
67 | (arguments | |
68 | `(#:phases (modify-phases %standard-phases | |
69 | (add-before 'patch-source-shebangs 'autogen | |
70 | (lambda _ ; Avoid running ./configure. | |
71 | (substitute* "autogen.sh" | |
72 | (("^.*\\$srcdir/configure.*") "")) | |
73 | (zero? (system* "sh" "autogen.sh"))))))) | |
74 | (native-inputs | |
75 | `(("autoconf" ,autoconf) | |
76 | ("automake" ,automake) | |
b94a6ca0 | 77 | ("gettext" ,gettext-minimal) |
d2a52108 | 78 | ("pkg-config" ,pkg-config))) |
6a7e1a18 EF |
79 | (inputs |
80 | `(("glib" ,glib "bin") | |
81 | ("gtk+" ,gtk+) | |
82 | ("libconfuse" ,libconfuse) | |
d2a52108 | 83 | ("vte" ,vte))) |
6a7e1a18 EF |
84 | (synopsis "GTK+-based drop-down terminal") |
85 | (description "Tilda is a terminal emulator similar to normal terminals like | |
86 | gnome-terminal (GNOME) or Konsole (KDE), with the difference that it drops down | |
87 | from the edge of a screen when a certain configurable hotkey is pressed. This | |
88 | is similar to the built-in consoles in some applications. Tilda is highly | |
d1e4ad1b | 89 | configurable through a graphical wizard.") |
6a7e1a18 EF |
90 | (home-page "https://github.com/lanoxx/tilda") |
91 | (license license:gpl2+))) | |
89978a0a MO |
92 | |
93 | (define-public termite | |
94 | (package | |
95 | (name "termite") | |
ebe3515f | 96 | (version "12") |
89978a0a MO |
97 | (source |
98 | (origin | |
99 | (method git-fetch) | |
100 | (uri (git-reference | |
101 | (url (string-append "https://github.com/thestinger/" | |
102 | name ".git")) | |
103 | (commit (string-append "v" version)) | |
104 | (recursive? #t))) | |
105 | (file-name (string-append name "-" version "-checkout")) | |
106 | (sha256 | |
ebe3515f EF |
107 | (base32 |
108 | "0s6dyg3vcqk5qcx90bs24wdnd3p56rdjdcanx4pcxvp6ksjl61jz")))) | |
89978a0a MO |
109 | (build-system gnu-build-system) |
110 | (arguments | |
66bb5db7 EF |
111 | `(#:phases |
112 | (modify-phases %standard-phases | |
113 | (delete 'configure)) | |
89978a0a MO |
114 | #:tests? #f |
115 | ;; This sets the destination when installing the necessary terminal | |
116 | ;; capability data, which are not provided by 'ncurses'. See | |
117 | ;; <https://lists.gnu.org/archive/html/bug-ncurses/2009-10/msg00031.html>. | |
118 | #:make-flags (list "PREFIX=" | |
119 | (string-append "VERSION=v" (version)) | |
120 | (string-append "DESTDIR=" | |
121 | (assoc-ref %outputs "out"))))) | |
122 | (inputs | |
123 | `(("vte", vte-ng) | |
124 | ("gtk+", gtk+) | |
125 | ("ncurses", ncurses))) | |
126 | (native-inputs | |
127 | `(("pkg-config" ,pkg-config))) | |
128 | ||
129 | ;; FIXME: This should only be located in 'ncurses'. Nonetheless it is | |
130 | ;; provided for usability reasons. See <https://bugs.gnu.org/22138>. | |
131 | (native-search-paths | |
132 | (list (search-path-specification | |
133 | (variable "TERMINFO_DIRS") | |
134 | (files '("share/terminfo"))))) | |
135 | (home-page "https://github.com/thestinger/termite/") | |
136 | (synopsis "Keyboard-centric, VTE-based terminal") | |
137 | (description "Termite is a minimal terminal emulator designed for use with | |
138 | tiling window managers. It is a modal application, similar to Vim, with an | |
139 | insert mode and command mode where keybindings have different functions.") | |
140 | ||
141 | ;; Files under util/ are under the Expat license; the rest is LGPLv2+. | |
142 | (license license:lgpl2.0+))) | |
cb55f9c6 AG |
143 | |
144 | (define-public asciinema | |
145 | (package | |
146 | (name "asciinema") | |
98b9732c | 147 | (version "1.4.0") |
cb55f9c6 AG |
148 | (source |
149 | (origin | |
150 | (method url-fetch) | |
98b9732c | 151 | (uri (pypi-uri "asciinema" version)) |
cb55f9c6 AG |
152 | (sha256 |
153 | (base32 | |
98b9732c | 154 | "1jrf8c8711gkdilmvyv3d37kp8xfvdc5cqighw5k92a6g9z4acgv")))) |
cb55f9c6 AG |
155 | (build-system python-build-system) |
156 | (arguments | |
157 | `(#:phases | |
158 | (modify-phases %standard-phases | |
159 | (add-before 'build 'patch-exec-paths | |
160 | (lambda* (#:key inputs #:allow-other-keys) | |
161 | (let ((ncurses (assoc-ref inputs "ncurses"))) | |
162 | (substitute* "asciinema/recorder.py" | |
163 | (("'tput'") | |
164 | (string-append "'" ncurses "/bin/tput'")))) | |
165 | #t))))) | |
f3b98f4f | 166 | (inputs `(("ncurses" ,ncurses))) |
39d0de33 MB |
167 | (native-inputs |
168 | ;; For tests. | |
169 | `(("python-requests" ,python-requests))) | |
cb55f9c6 AG |
170 | (home-page "https://asciinema.org") |
171 | (synopsis "Terminal session recorder") | |
172 | (description | |
173 | "Use asciinema to record and share your terminal sessions, the right way. | |
174 | Forget screen recording apps and blurry video. Enjoy a lightweight, purely | |
175 | text-based approach to terminal recording.") | |
176 | (license license:gpl3))) | |
af39609b DC |
177 | |
178 | (define-public libtsm | |
179 | (package | |
180 | (name "libtsm") | |
181 | (version "3") | |
182 | (source (origin | |
183 | (method url-fetch) | |
184 | (uri (string-append | |
185 | "https://freedesktop.org/software/kmscon/releases/" | |
186 | "libtsm-" version ".tar.xz")) | |
187 | (sha256 | |
188 | (base32 | |
189 | "01ygwrsxfii0pngfikgqsb4fxp8n1bbs47l7hck81h9b9bc1ah8i")))) | |
190 | (build-system gnu-build-system) | |
191 | (native-inputs | |
192 | `(("pkg-config" ,pkg-config))) | |
193 | (inputs | |
194 | `(("libxkbcommon" ,libxkbcommon))) | |
195 | (synopsis "Xterm state machine library") | |
196 | (description "TSM is a state machine for DEC VT100-VT520 compatible | |
197 | terminal emulators. It tries to support all common standards while keeping | |
198 | compatibility to existing emulators like xterm, gnome-terminal, konsole, etc.") | |
199 | (home-page "https://www.freedesktop.org/wiki/Software/libtsm") | |
d7af202b DC |
200 | ;; Hash table implementation is lgpl2.1+ licensed. |
201 | ;; The wcwidth implementation in external/wcwidth.{h,c} uses a license | |
202 | ;; derived from ISC. | |
203 | ;; UCS-4 to UTF-8 encoding is copied from "terminology" which is released | |
204 | ;; under the bsd 2 license. | |
205 | (license (list license:expat license:lgpl2.1+ license:isc license:bsd-2)))) | |
e8bb4336 DC |
206 | |
207 | (define-public kmscon | |
208 | (package | |
209 | (name "kmscon") | |
210 | (version "8") | |
211 | (source (origin | |
212 | (method url-fetch) | |
213 | (uri (string-append | |
214 | "https://freedesktop.org/software/kmscon/releases/" | |
215 | "kmscon-" version ".tar.xz")) | |
216 | (sha256 | |
217 | (base32 | |
5acf00f9 LC |
218 | "0axfwrp3c8f4gb67ap2sqnkn75idpiw09s35wwn6kgagvhf1rc0a")) |
219 | (modules '((guix build utils))) | |
220 | (snippet | |
221 | ;; Use elogind instead of systemd. | |
222 | '(begin | |
223 | (substitute* "configure" | |
224 | (("libsystemd-daemon libsystemd-login") | |
225 | "libelogind")) | |
226 | (substitute* "src/uterm_systemd.c" | |
227 | (("#include <systemd/sd-login.h>") | |
228 | "#include <elogind/sd-login.h>") | |
229 | ;; We don't have this header. | |
230 | (("#include <systemd/sd-daemon\\.h>") | |
231 | "") | |
232 | ;; Replace the call to 'sd_booted' by the truth value. | |
233 | (("sd_booted\\(\\)") | |
234 | "1")))))) | |
e8bb4336 DC |
235 | (build-system gnu-build-system) |
236 | (native-inputs | |
7326944b LC |
237 | `(("pkg-config" ,pkg-config) |
238 | ("libxslt" ,libxslt) ;to build the man page | |
239 | ("libxml2" ,libxml2) ;for XML_CATALOG_FILES | |
240 | ("docbook-xsl" ,docbook-xsl))) | |
e8bb4336 | 241 | (inputs |
c2ffcc44 | 242 | `(("libdrm" ,libdrm) |
e8bb4336 DC |
243 | ("libtsm" ,libtsm) |
244 | ("libxkbcommon" ,libxkbcommon) | |
245 | ("logind" ,elogind) | |
246 | ("mesa" ,mesa) | |
247 | ("pango" ,pango) | |
248 | ("udev" ,eudev))) | |
78325fa8 LC |
249 | (synopsis "Linux KMS-based terminal emulator") |
250 | (description "Kmscon is a terminal emulator based on Linux's @dfn{kernel | |
251 | mode setting} (KMS). It can replace the in-kernel virtual terminal (VT) | |
252 | implementation with a user-space console. Compared to the Linux console, | |
253 | kmscon provides enhanced features including XKB-compatible internationalized | |
254 | keyboard support, UTF-8 input/font support, hardware-accelerated rendering, | |
255 | multi-seat support, a replacement for @command{mingetty}, and more.") | |
e8bb4336 | 256 | (home-page "https://www.freedesktop.org/wiki/Software/kmscon") |
3eb2fca6 DC |
257 | ;; Hash table implementation is lgpl2.1+ licensed. |
258 | ;; The wcwidth implementation in external/wcwidth.{h,c} uses a license | |
259 | ;; derived from ISC. | |
260 | ;; UCS-4 to UTF-8 encoding is copied from "terminology" which is released | |
261 | ;; under the bsd 2 license. | |
262 | ;; Unifont-Font is from http://unifoundry.com/unifont.html and licensed | |
263 | ;; under the terms of the GNU GPL. | |
78325fa8 LC |
264 | (license (list license:expat license:lgpl2.1+ license:bsd-2 |
265 | license:gpl2+)) | |
266 | (supported-systems (filter (cut string-suffix? "-linux" <>) | |
267 | %supported-systems)))) | |
a3af70ac | 268 | |
db913ac4 JMSG |
269 | (define-public libtermkey |
270 | (package | |
271 | (name "libtermkey") | |
b5b46f87 | 272 | (version "0.20") |
db913ac4 JMSG |
273 | (source (origin |
274 | (method url-fetch) | |
275 | (uri (string-append "http://www.leonerd.org.uk/code/" | |
276 | name "/" name "-" version ".tar.gz")) | |
277 | (sha256 | |
b5b46f87 | 278 | (base32 "1xfj6lchhfljmbcl6dz8dpakppyy13nbl4ykxiv5x4dr9b4qf3bc")))) |
db913ac4 JMSG |
279 | (build-system gnu-build-system) |
280 | (arguments | |
281 | '(#:make-flags (list | |
282 | "CC=gcc" | |
283 | (string-append "PREFIX=" (assoc-ref %outputs "out"))) | |
284 | #:phases (modify-phases %standard-phases | |
285 | (delete 'configure)) | |
286 | #:test-target "test")) | |
287 | (inputs `(("ncurses", ncurses))) | |
288 | (native-inputs `(("libtool", libtool) | |
289 | ("perl-test-harness" ,perl-test-harness) | |
290 | ("pkg-config", pkg-config))) | |
291 | (synopsis "Keyboard entry processing library for terminal-based programs") | |
292 | (description | |
293 | "Libtermkey handles all the necessary logic to recognise special keys, UTF-8 | |
294 | combining, and so on, with a simple interface.") | |
295 | (home-page "http://www.leonerd.org.uk/code/libtermkey") | |
296 | (license license:expat))) | |
297 | ||
a3af70ac DC |
298 | (define-public picocom |
299 | (package | |
300 | (name "picocom") | |
d0cddec2 | 301 | (version "2.2") |
a3af70ac DC |
302 | (source (origin |
303 | (method url-fetch) | |
304 | (uri (string-append | |
305 | "https://github.com/npat-efault/picocom" | |
306 | "/archive/" version ".tar.gz")) | |
307 | (file-name (string-append name "-" version ".tar.gz")) | |
308 | (sha256 | |
309 | (base32 | |
d0cddec2 | 310 | "1knl6dglnrynx1fhy21nylw56i1q3dkizkgxzkq42mb7ilah8f9y")))) |
a3af70ac DC |
311 | (build-system gnu-build-system) |
312 | (arguments | |
313 | `(#:make-flags '("CC=gcc") | |
314 | #:tests? #f ; No tests | |
315 | #:phases | |
316 | (modify-phases %standard-phases | |
317 | (delete 'configure) | |
318 | (replace 'install | |
319 | (lambda* (#:key outputs #:allow-other-keys) | |
320 | (let* ((out (assoc-ref outputs "out")) | |
321 | (bin (string-append out "/bin")) | |
322 | (man (string-append out "/share/man/man1"))) | |
323 | (install-file "picocom" bin) | |
324 | (install-file "picocom.1" man))))))) | |
325 | (home-page "https://github.com/npat-efault/picocom") | |
326 | (synopsis "Minimal dumb-terminal emulation program") | |
327 | (description "It was designed to serve as a simple, manual, modem | |
328 | configuration, testing, and debugging tool. It has also serves well | |
329 | as a low-tech serial communications program to allow access to all | |
330 | types of devices that provide serial consoles.") | |
331 | (license license:gpl2+))) | |
abe2ec73 JMSG |
332 | |
333 | (define-public beep | |
334 | (package | |
335 | (name "beep") | |
336 | (version "1.3") | |
337 | (source (origin | |
338 | (method url-fetch) | |
339 | (uri (string-append "http://www.johnath.com/" name "/" | |
340 | name "-" version ".tar.gz")) | |
341 | (sha256 | |
342 | (base32 | |
343 | "0bgch6jq5cahakk3kbr9549iysf2dik09afixxy5brbxk1xfzb2r")))) | |
344 | (build-system gnu-build-system) | |
345 | (arguments | |
346 | `(#:tests? #f ; no tests. | |
347 | #:phases | |
348 | (modify-phases %standard-phases | |
349 | (delete 'configure) | |
350 | (add-after 'unpack 'patch-makefile | |
351 | (lambda* (#:key outputs #:allow-other-keys) | |
12c15242 TGR |
352 | (substitute* "Makefile" (("/usr") (assoc-ref outputs "out"))) |
353 | #t)) | |
abe2ec73 JMSG |
354 | (add-before 'install 'create-output-directories |
355 | (lambda* (#:key outputs #:allow-other-keys) | |
356 | (let ((out (assoc-ref %outputs "out"))) | |
357 | (mkdir-p (string-append out "/bin")) | |
358 | (mkdir-p (string-append out "/man/man1")))))))) | |
359 | (synopsis "Linux command-line utility to control the PC speaker") | |
360 | (description "beep allows the user to control the PC speaker with precision, | |
361 | allowing different sounds to indicate different events. While it can be run | |
362 | quite happily on the command line, its intended place of residence is within | |
363 | scripts, notifying the user when something interesting occurs. Of course, it | |
364 | has no notion of what's interesing, but it's very good at that notifying part.") | |
365 | (home-page "http://www.johnath.com/beep") | |
366 | (license license:gpl2+))) | |
f2b7be09 RW |
367 | |
368 | (define-public unibilium | |
369 | (package | |
370 | (name "unibilium") | |
371 | (version "1.2.0") | |
372 | (source | |
373 | (origin | |
374 | (method url-fetch) | |
375 | (uri (string-append "https://github.com/mauke/unibilium/" | |
376 | "archive/v" version ".tar.gz")) | |
377 | (file-name (string-append name "-" version ".tar.gz")) | |
378 | (sha256 | |
379 | (base32 | |
380 | "1n7a0jrlwhn9nnkna76sbnjrr808m0pmzbiwznmp7rhmjl4z2fk2")))) | |
381 | (build-system gnu-build-system) | |
382 | (arguments | |
383 | `(#:make-flags | |
384 | (list "CC=gcc" | |
385 | (string-append "PREFIX=" (assoc-ref %outputs "out"))) | |
386 | #:test-target "test" | |
387 | ;; FIXME: tests require "prove" | |
388 | #:tests? #f | |
389 | #:phases | |
390 | (modify-phases %standard-phases | |
391 | (delete 'configure)))) | |
392 | (native-inputs | |
393 | `(("libtool" ,libtool))) | |
394 | (home-page "https://github.com/mauke/unibilium") | |
395 | (synopsis "Terminfo parsing library") | |
396 | (description "Unibilium is a basic C terminfo library. It doesn't depend | |
397 | on curses or any other library. It also doesn't use global variables, so it | |
398 | should be thread-safe.") | |
399 | (license license:lgpl3+))) | |
ee869cd6 RW |
400 | |
401 | (define-public libvterm | |
402 | (package | |
403 | (name "libvterm") | |
404 | (version "0+bzr681") | |
405 | (source | |
406 | (origin | |
407 | (method url-fetch) | |
408 | (uri (string-append "http://www.leonerd.org.uk/code/libvterm/" | |
409 | "libvterm-" version ".tar.gz")) | |
410 | (sha256 | |
411 | (base32 | |
412 | "1s56c8p1qz6frkcri0hg4qyydv2wcccj6n2xmz1dwcdqn38ldsmb")))) | |
413 | (build-system gnu-build-system) | |
414 | (arguments | |
415 | `(#:make-flags | |
416 | (list "CC=gcc" | |
417 | (string-append "PREFIX=" (assoc-ref %outputs "out"))) | |
418 | #:test-target "test" | |
419 | #:phases | |
420 | (modify-phases %standard-phases | |
421 | (delete 'configure)))) | |
422 | (native-inputs | |
423 | `(("libtool" ,libtool) | |
424 | ("perl" ,perl))) | |
425 | (home-page "http://www.leonerd.org.uk/code/libvterm/") | |
426 | (synopsis "VT220/xterm/ECMA-48 terminal emulator library") | |
427 | (description "Libvterm is an abstract C99 library which implements a VT220 | |
428 | or xterm-like terminal emulator. It doesn't use any particular graphics | |
429 | toolkit or output system, instead it invokes callback function pointers that | |
430 | its embedding program should provide it to draw on its behalf. It avoids | |
431 | calling @code{malloc} during normal running state, allowing it to be used in | |
432 | embedded kernel situations.") | |
433 | (license license:expat))) | |
f9ff014b P |
434 | |
435 | (define-public cool-retro-term | |
436 | (let ((commit "e48719fa44e5307df71dbd0fad234f8a6a53f863") | |
437 | (revision "1")) | |
438 | (package | |
439 | (name "cool-retro-term") | |
440 | (version (string-append "1.0.0-" revision "." (string-take commit 7))) | |
441 | (source (origin | |
442 | (method git-fetch) | |
443 | (file-name (string-append name "-" version "-checkout")) | |
444 | (uri (git-reference | |
445 | (url (string-append "https://github.com/Swordfish90/" name)) | |
446 | (commit commit) | |
447 | (recursive? #t))) | |
448 | (sha256 | |
449 | (base32 "1sgqbirninkvgwchr35zgn5vzqvsmrf3cp7lqady1xgrawb8lsz3")) | |
450 | (patches | |
451 | (search-patches "cool-retro-term-remove-non-free-fonts.patch" | |
452 | "cool-retro-term-fix-array-size.patch" | |
453 | "cool-retro-term-dont-check-uninit-member.patch" | |
454 | "cool-retro-term-memory-leak-1.patch")) | |
455 | (modules '((guix build utils))) | |
456 | (snippet | |
457 | '(for-each (lambda (font) | |
458 | (delete-file-recursively | |
459 | (string-append "app/qml/fonts/" font)) | |
460 | (substitute* '("app/qml/resources.qrc") | |
461 | (((string-append "<file>fonts/" font ".*")) | |
462 | ""))) | |
463 | '(;"1971-ibm-3278" ; BSD 3-clause | |
464 | "1977-apple2" ; Non-Free | |
465 | "1977-commodore-pet" ; Non-Free | |
466 | "1979-atari-400-800" ; Non-Free | |
467 | "1982-commodore64" ; Non-Free | |
468 | "1985-atari-st" ; ? | |
469 | "1985-ibm-pc-vga" ; Unclear | |
470 | ;"modern-fixedsys-excelsior" ; Redistributable | |
471 | ;"modern-hermit" ; SIL | |
472 | ;"modern-inconsolata"; SIL | |
473 | ;"modern-pro-font-win-tweaked" ; X11 | |
474 | ;"modern-proggy-tiny"; X11 | |
475 | ;"modern-terminus" ; SIL | |
476 | "modern-monaco"))))) ; Apple non-free | |
477 | (build-system gnu-build-system) | |
478 | (inputs | |
479 | `(("qtbase" ,qtbase) | |
480 | ("qtdeclarative" ,qtdeclarative) | |
481 | ("qtgraphicaleffects" ,qtgraphicaleffects) | |
482 | ("qtquickcontrols" ,qtquickcontrols))) | |
483 | (arguments | |
484 | `(#:phases | |
485 | (modify-phases %standard-phases | |
486 | (replace 'configure | |
487 | (lambda* (#:key outputs #:allow-other-keys) | |
488 | (let* ((out (assoc-ref outputs "out")) | |
489 | (share (string-append out "/share"))) | |
490 | (substitute* '("qmltermwidget/qmltermwidget.pro") | |
491 | (("INSTALL_DIR = \\$\\$\\[QT_INSTALL_QML\\]") | |
492 | (string-append "INSTALL_DIR = " out "/qml"))) | |
493 | (substitute* '("app/app.pro") | |
494 | (("target.path \\+= /usr") | |
495 | (string-append "target.path += " out)) | |
496 | (("icon32.path = /usr/share") | |
497 | (string-append "icon32.path = " share)) | |
498 | (("icon64.path = /usr/share") | |
499 | (string-append "icon64.path = " share)) | |
500 | (("icon128.path = /usr/share") | |
501 | (string-append "icon128.path = " share)) | |
502 | (("icon256.path = /usr/share") | |
503 | (string-append "icon256.path = " share))) | |
504 | (zero? (system* "qmake"))))) | |
505 | (add-before 'install 'fix-Makefiles | |
506 | (lambda* (#:key outputs #:allow-other-keys) | |
507 | (let* ((out (assoc-ref outputs "out"))) | |
508 | (substitute* '("Makefile") | |
509 | (("\\$\\(INSTALL_ROOT\\)/usr") out))))) | |
510 | (add-after 'install 'wrap-executable | |
511 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
512 | (let* ((out (assoc-ref outputs "out")) | |
513 | (qml "/qml")) | |
514 | (wrap-program (string-append out "/bin/cool-retro-term") | |
515 | `("QML2_IMPORT_PATH" ":" prefix | |
516 | (,(string-append out qml) | |
517 | ,(string-append | |
518 | (assoc-ref inputs "qtdeclarative") qml) | |
519 | ,(string-append | |
520 | (assoc-ref inputs "qtgraphicaleffects") qml) | |
521 | ,(string-append | |
522 | (assoc-ref inputs "qtquickcontrols") qml))))))) | |
523 | (add-after 'install 'add-alternate-name | |
524 | (lambda* (#:key outputs #:allow-other-keys) | |
525 | (let* ((bin (string-append (assoc-ref outputs "out") "/bin"))) | |
526 | (symlink (string-append bin "/cool-retro-term") | |
527 | (string-append bin "/crt")))))))) | |
528 | (synopsis "Terminal emulator") | |
529 | (description | |
530 | "Cool-retro-term (crt) is a terminal emulator which mimics the look and | |
531 | feel of the old cathode ray tube (CRT) screens. It has been designed to be | |
532 | eye-candy, customizable, and reasonably lightweight.") | |
533 | (home-page "https://github.com/Swordfish90/cool-retro-term") | |
534 | (license (list | |
535 | license:gpl2+ ; qmltermwidget | |
536 | license:gpl3+ ; cool-retro-term | |
537 | ;; Fonts | |
538 | license:silofl1.1 | |
539 | license:x11 | |
540 | license:bsd-3))))) |