glfw3: harden wayland substitutions

Including quotes around the library names should make these
substitutions stricter.

Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
This commit is contained in:
Sefa Eyeoglu 2024-11-21 22:50:06 +01:00
parent a913a8d655
commit fbf94f5a7d
No known key found for this signature in database
GPG Key ID: E13DFD4B47127951

View File

@ -63,17 +63,13 @@ stdenv.mkDerivation {
postPatch = lib.optionalString stdenv.hostPlatform.isLinux ''
substituteInPlace src/wl_init.c \
--replace-fail "libxkbcommon.so.0" "${lib.getLib libxkbcommon}/lib/libxkbcommon.so.0" \
--replace-fail "libdecor-0.so.0" "${lib.getLib libdecor}/lib/libdecor-0.so.0" \
--replace-fail "libwayland-client.so.0" "${lib.getLib wayland}/lib/libwayland-client.so.0" \
--replace-fail "libwayland-cursor.so.0" "${lib.getLib wayland}/lib/libwayland-cursor.so.0" \
--replace-fail "libwayland-egl.so.1" "${lib.getLib wayland}/lib/libwayland-egl.so.1"
--replace-fail '"libdecor-0.so.0"' '"${lib.getLib libdecor}/lib/libdecor-0.so.0"' \
--replace-fail '"libwayland-client.so.0"' '"${lib.getLib wayland}/lib/libwayland-client.so.0"' \
--replace-fail '"libwayland-cursor.so.0"' '"${lib.getLib wayland}/lib/libwayland-cursor.so.0"' \
--replace-fail '"libwayland-egl.so.1"' '"${lib.getLib wayland}/lib/libwayland-egl.so.1"' \
--replace-fail '"libxkbcommon.so.0"' '"${lib.getLib libxkbcommon}/lib/libxkbcommon.so.0"'
'';
# glfw may dlopen libwayland-client.so:
postFixup = lib.optionalString stdenv.hostPlatform.isLinux ''
patchelf ''${!outputLib}/lib/libglfw.so --add-rpath ${lib.getLib wayland}/lib
'';
cmakeFlags = [
# Static linking isn't supported