Skip to content

Instantly share code, notes, and snippets.

@danieldk
Created May 27, 2019 13:03
Show Gist options
  • Save danieldk/aff114edfaa6673271ca7e6646066f7a to your computer and use it in GitHub Desktop.
Save danieldk/aff114edfaa6673271ca7e6646066f7a to your computer and use it in GitHub Desktop.
diff --git a/pkgs/applications/misc/kitty/default.nix b/pkgs/applications/misc/kitty/default.nix
index 1eee203373a..6ead97e80f8 100644
--- a/pkgs/applications/misc/kitty/default.nix
+++ b/pkgs/applications/misc/kitty/default.nix
@@ -1,6 +1,6 @@
{ stdenv, substituteAll, fetchFromGitHub, python3Packages, glfw, libunistring,
harfbuzz, fontconfig, pkgconfig, ncurses, imagemagick, xsel,
- libstartup_notification, libX11, libXrandr, libXinerama, libXcursor,
+ libstartup_notification, libGL, libX11, libXrandr, libXinerama, libXcursor,
libxkbcommon, libXi, libXext, wayland-protocols, wayland,
which, dbus, fetchpatch,
Cocoa,
@@ -59,6 +59,8 @@ buildPythonApplication rec {
optipng
];
+ propagatedBuildInputs = stdenv.lib.optional stdenv.isLinux libGL;
+
outputs = [ "out" "terminfo" ];
patches = [
@@ -72,6 +74,10 @@ buildPythonApplication rec {
./png2icns.patch
];
+ preConfigure = stdenv.lib.optional (!stdenv.isDarwin) ''
+ substituteInPlace glfw/egl_context.c --replace "libEGL.so.1" "${stdenv.lib.getLib libGL}/lib/libEGL.so.1"
+ '';
+
buildPhase = if stdenv.isDarwin then ''
make app
'' else ''
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment