aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/terminals.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/terminals.scm')
-rw-r--r--gnu/packages/terminals.scm119
1 files changed, 117 insertions, 2 deletions
diff --git a/gnu/packages/terminals.scm b/gnu/packages/terminals.scm
index 369e79bf5b..7f52c6efd4 100644
--- a/gnu/packages/terminals.scm
+++ b/gnu/packages/terminals.scm
@@ -3,7 +3,7 @@
;;; Copyright © 2016 Mckinley Olsen <mck.olsen@gmail.com>
;;; Copyright © 2016, 2017 Alex Griffin <a@ajgrf.com>
;;; Copyright © 2016 David Craven <david@craven.ch>
-;;; Copyright © 2016, 2017 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2016, 2017, 2019 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2016, 2017 José Miguel Sánchez García <jmi2k@openmailbox.org>
;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2017 Kei Kebreau <kkebreau@posteo.net>
@@ -11,6 +11,8 @@
;;; Copyright © 2017 Petter <petter@mykolab.ch>
;;; Copyright © 2018 Hartmut Goebel <h.goebel@crazy-compilers.com>
;;; Copyright © 2018 Arun Isaac <arunisaac@systemreboot.net>
+;;; Copyright © 2018 Gabriel Hondet <gabrielhondet@gmail.com>
+;;; Copyright © 2019 Rutger Helling <rhelling@mykolab.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -29,7 +31,6 @@
(define-module (gnu packages terminals)
#:use-module ((guix licenses) #:prefix license:)
- #:use-module (guix build utils)
#:use-module (guix build-system cmake)
#:use-module (guix build-system gnu)
#:use-module (guix build-system glib-or-gtk)
@@ -41,13 +42,16 @@
#:use-module (gnu packages)
#:use-module (gnu packages autotools)
#:use-module (gnu packages check)
+ #:use-module (gnu packages compression)
#:use-module (gnu packages docbook)
+ #:use-module (gnu packages fontutils)
#:use-module (gnu packages freedesktop)
#:use-module (gnu packages gettext)
#:use-module (gnu packages gl)
#:use-module (gnu packages glib)
#:use-module (gnu packages gnome)
#:use-module (gnu packages gtk)
+ #:use-module (gnu packages image)
#:use-module (gnu packages libevent)
#:use-module (gnu packages linux)
#:use-module (gnu packages ncurses)
@@ -56,6 +60,7 @@
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages python)
#:use-module (gnu packages python-web)
+ #:use-module (gnu packages python-xyz)
#:use-module (gnu packages qt)
#:use-module (gnu packages serialization)
#:use-module (gnu packages ssh)
@@ -238,6 +243,8 @@ compatibility to existing emulators like xterm, gnome-terminal, konsole, etc.")
(sha256
(base32
"0q62kjsvy2iwy8adfiygx2bfwlh83rphgxbis95ycspqidg9py87"))
+ (patches
+ (search-patches "kmscon-runtime-keymap-switch.patch"))
(modules '((guix build utils)))))
(build-system gnu-build-system)
(arguments
@@ -900,3 +907,111 @@ per-line fullscreen terminal rendering, and keyboard input event reporting.")
share your terminal with other users over the Internet. tmate is a fork of
tmux.")
(license license:isc)))
+
+(define-public kitty
+ (package
+ (name "kitty")
+ (version "0.13.3")
+ (home-page "https://sw.kovidgoyal.net/kitty/")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/kovidgoyal/kitty.git")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1y0vd75j8g61jdj8miml79w5ri3pqli5rv9iq6zdrxvzfa4b2rmb"))
+ (modules '((guix build utils)))
+ (snippet
+ '(begin
+ ;; patch needed as sphinx-build is used as a python script
+ ;; whereas the guix package uses a bash script launching the
+ ;; python script
+ (substitute* "docs/conf.py"
+ (("(from kitty.constants import str_version)" kitty-imp)
+ (string-append "sys.path.append(\"..\")\n" kitty-imp)))
+ (substitute* "docs/Makefile"
+ (("^SPHINXBUILD[[:space:]]+= (python3.*)$")
+ "SPHINXBUILD = sphinx-build\n"))
+ #t))))
+ (build-system gnu-build-system)
+ (inputs
+ `(("python" ,python)
+ ("harfbuzz" ,harfbuzz)
+ ("zlib" ,zlib)
+ ("libpng" ,libpng)
+ ("freetype" ,freetype)
+ ("fontconfig" ,fontconfig)
+ ("pygments" ,python-pygments)
+ ("wayland" ,wayland)))
+ (native-inputs
+ `(("pkg-config" ,pkg-config)
+ ("libxrandr" ,libxrandr)
+ ("libdbus" ,dbus)
+ ("libxcursor" ,libxcursor)
+ ("libxi" ,libxi)
+ ("libxinerama" ,libxinerama)
+ ("libgl1-mesa" ,mesa)
+ ("libxkbcommon" ,libxkbcommon)
+ ("sphinx" ,python-sphinx)
+ ("ncurses" ,ncurses) ;; for tic command
+ ("wayland-protocols" ,wayland-protocols)))
+ (arguments
+ '(#:phases (modify-phases %standard-phases
+ (delete 'configure)
+ ;; Wayland backend requires EGL, which isn't found
+ ;; out-of-the-box for some reason. Hard-code it instead.
+ (add-after 'unpack 'hard-code-libegl
+ (lambda _
+ (let* ((mesa (assoc-ref %build-inputs "libgl1-mesa"))
+ (libegl (string-append mesa "/lib/libEGL.so.1")))
+ (substitute* "glfw/egl_context.c"
+ (("libEGL.so.1") libegl)))
+ #t))
+ (replace 'build
+ (lambda _
+ (invoke "python3" "setup.py" "linux-package")))
+ (replace 'check
+ (lambda _
+ (invoke "python3" "setup.py" "test")))
+ (add-before 'install 'rm-pycache
+ ;; created python cache __pycache__ are non deterministic
+ (lambda _
+ (let ((pycaches (find-files "linux-package/"
+ "__pycache__"
+ #:directories? #t)))
+ (for-each delete-file-recursively pycaches)
+ #t)))
+ (replace 'install
+ (lambda _
+ (let* ((out (assoc-ref %outputs "out"))
+ (obin (string-append out "/bin"))
+ (olib (string-append out "/lib"))
+ (oshare (string-append out "/share")))
+ (copy-recursively "linux-package/bin" obin)
+ (copy-recursively "linux-package/share" oshare)
+ (copy-recursively "linux-package/lib" olib)
+ #t))))))
+ (synopsis "Fast, featureful, GPU based terminal emulator")
+ (description "Kitty is a fast and featureful GPU-based terminal emulator:
+@itemize
+@item Offloads rendering to the GPU for lower system load and buttery smooth
+scrolling. Uses threaded rendering to minimize input latency.
+@item Supports all modern terminal features: graphics (images), unicode,
+true-color, OpenType ligatures, mouse protocol, focus tracking, bracketed
+paste and several new terminal protocol extensions.
+@item Supports tiling multiple terminal windows side by side in different
+layouts without needing to use an extra program like tmux.
+@item Can be controlled from scripts or the shell prompt, even over SSH.
+@item Has a framework for Kittens, small terminal programs that can be used to
+extend kitty's functionality. For example, they are used for Unicode input,
+hints, and side-by-side diff.
+@item Supports startup sessions which allow you to specify the window/tab
+layout, working directories and programs to run on startup.
+@item Allows you to open the scrollback buffer in a separate window using
+arbitrary programs of your choice. This is useful for browsing the history
+comfortably in a pager or editor.
+@end itemize")
+ (license license:gpl3+)))