git.iko.soy/typeable/nixpkgs
on master help sign in
kitty: fix wayland support (EGL: Library not found)
cec27cejosephtheengineer
pkgs/applications/misc/kitty/default.nix+7−1
@@ -1,6 +1,6 @@
1{ stdenv, substituteAll, fetchFromGitHub, python3Packages, glfw, libunistring,
1{ stdenv, substituteAll, fetchFromGitHub, python3Packages, glfw, libunistring,
2 harfbuzz, fontconfig, pkgconfig, ncurses, imagemagick, xsel,
2 harfbuzz, fontconfig, pkgconfig, ncurses, imagemagick, xsel,
3− libstartup_notification, libX11, libXrandr, libXinerama, libXcursor,
3+ libstartup_notification, libGL, libX11, libXrandr, libXinerama, libXcursor,
4 libxkbcommon, libXi, libXext, wayland-protocols, wayland,
4 libxkbcommon, libXi, libXext, wayland-protocols, wayland,
5 which, dbus,
5 which, dbus,
6 Cocoa,
6 Cocoa,
@@ -57,6 +57,8 @@ buildPythonApplication rec {
57 optipng
57 optipng
58 ];
58 ];
59
59
60+ propagatedBuildInputs = stdenv.lib.optional stdenv.isLinux libGL;
61+
60 outputs = [ "out" "terminfo" ];
62 outputs = [ "out" "terminfo" ];
61
63
62 patches = [
64 patches = [
@@ -70,6 +72,10 @@ buildPythonApplication rec {
70 ./png2icns.patch
72 ./png2icns.patch
71 ];
73 ];
72
74
75+ preConfigure = stdenv.lib.optional (!stdenv.isDarwin) ''
76+ substituteInPlace glfw/egl_context.c --replace "libEGL.so.1" "${stdenv.lib.getLib libGL}/lib/libEGL.so.1"
77+ '';
78+
73 buildPhase = if stdenv.isDarwin then ''
79 buildPhase = if stdenv.isDarwin then ''
74 make app
80 make app
75 '' else ''
81 '' else ''