3
0
Fork 0
forked from mirrors/nixpkgs

Merge pull request #75177 from Luflosi/kitty-change-substitution

kitty: replace library path using patch instead of substituteInPlace
This commit is contained in:
Maximilian Bosch 2019-12-07 23:32:09 +01:00 committed by GitHub
commit 91480faba4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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 @@