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