lol

glfw: patch linkage with X11

+21 -1
+3 -1
pkgs/development/libraries/glfw/3.x.nix
··· 16 16 sha256 = "sha256-1KkzYclOLGqiV1/8BsJ3e+pXMQ6a+sjLwZ7mjSuxxbA="; 17 17 }; 18 18 19 - patches = lib.optional waylandSupport ./wayland.patch; 19 + # Fix freezing on Wayland (https://github.com/glfw/glfw/pull/1711) 20 + # and linkage issues on X11 (https://github.com/NixOS/nixpkgs/issues/142583) 21 + patches = if waylandSupport then ./wayland.patch else ./x11.patch; 20 22 21 23 propagatedBuildInputs = [ libGL ]; 22 24
+18
pkgs/development/libraries/glfw/x11.patch
··· 1 + diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt 2 + index a0be580e..ba143851 100644 3 + --- a/src/CMakeLists.txt 4 + +++ b/src/CMakeLists.txt 5 + @@ -219,6 +219,13 @@ if (GLFW_BUILD_X11) 6 + if (NOT X11_Xshape_INCLUDE_PATH) 7 + message(FATAL_ERROR "X Shape headers not found; install libxext development package") 8 + endif() 9 + + 10 + + target_link_libraries(glfw PRIVATE ${X11_Xrandr_LIB} 11 + + ${X11_Xinerama_LIB} 12 + + ${X11_Xkb_LIB} 13 + + ${X11_Xcursor_LIB} 14 + + ${X11_Xi_LIB} 15 + + ${X11_Xshape_LIB}) 16 + endif() 17 + 18 + if (UNIX AND NOT APPLE)