Skip to content

Instantly share code, notes, and snippets.

@maxdevjs
Last active February 28, 2020 04:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save maxdevjs/1632d199cb4f5e582fb02285a89c94f6 to your computer and use it in GitHub Desktop.
Save maxdevjs/1632d199cb4f5e582fb02285a89c94f6 to your computer and use it in GitHub Desktop.
Guix - Kitty - Error - Thu 27 Feb 2020 11:14:08 PM -03

[guix issues] [guile debbugs] [Builds matching kitty] [path: root/gnu/packages/terminals.scm]

Kitty error:

$ kitty
X Error of failed request:  BadMatch (invalid parameter attributes)
  Major opcode of failed request:  130 (MIT-SHM) 
  Minor opcode of failed request:  3 (X_ShmPutImage)
  Serial number of failed request:  322
  Current serial number in output stream:  323 

Last successful build details:

Build details
Build ID	2231731
Status	Succeeded
System	x86_64-linux
Name	kitty-0.16.0
Duration	137 seconds
Finished	11 Feb 06:38 +0100
Log file	raw
Derivation	

/gnu/store/l4dbx8v3y9rsjkfdz093a2ips15w8p6r-kitty-0.16.0.drv

Outputs	

/gnu/store/crvwzyk2ab2yaivyqcry78wxgmcphl33-kitty-0.16.0

Last failed build details:

Build ID	2290855
Status	Failed (dependency)
System	x86_64-linux
Name	kitty-0.16.0
Duration	1582816784 seconds
Finished	—
Log file	—
Derivation	

/gnu/store/hy03bfp25aqslbw3xa8zc89wj17w76x1-kitty-0.16.0.drv

Outputs	

/gnu/store/v6agrdh4p9bbwwc3764r87yvflkhsnq0-kitty-0.16.0
(define-public kitty
(package
(name "kitty")
(version "0.16.0")
(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 "1bszyddar0g1gdz67h8rd3gbrdhi6ahjg7j14cjiqxm1938z9ajf"))
(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)
("libcanberra" ,libcanberra)
("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+)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment