3
0
Fork 0
forked from mirrors/nixpkgs

kitty: replace library path using patch instead of substituteInPlace

This makes patching the path for `libEGL` consistent with `libstartup-notification` and `libcanberra`.
It should also prevent silently doing nothing in case the code in kitty is changed, similar to what was described in 1842c4aaa4.
This commit is contained in:
Luflosi 2019-12-07 22:49:41 +01:00
parent b665c387bc
commit c562eb22ab
No known key found for this signature in database
GPG key ID: 4E41E29EDCC345D0
2 changed files with 13 additions and 4 deletions

View file

@ -70,6 +70,7 @@ buildPythonApplication rec {
src = ./library-paths.patch;
libstartup_notification = "${libstartup_notification}/lib/libstartup-notification-1.so";
libcanberra = "${libcanberra}/lib/libcanberra.so";
libEGL = "${stdenv.lib.getLib libGL}/lib/libEGL.so.1";
})
] ++ stdenv.lib.optionals stdenv.isDarwin [
./no-lto.patch
@ -77,10 +78,6 @@ 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 ''
${python.interpreter} setup.py kitty.app --update-check-interval=0
'' else ''

View file

@ -1,3 +1,15 @@
--- a/glfw/egl_context.c
+++ b/glfw/egl_context.c
@@ -314,7 +314,7 @@ bool _glfwInitEGL(void)
#elif defined(__CYGWIN__)
"libEGL-1.so",
#else
- "libEGL.so.1",
+ "@libEGL@",
#endif
NULL
};
--- a/kitty/desktop.c
+++ b/kitty/desktop.c
@@ -30,7 +30,7 @@