Merge pull request #147601 from McSinyx/glfw-3.3.5

glfw: 3.3.4 -> 3.3.5 and fix linkage with X11

authored by Guillaume Girol and committed by GitHub b9bb3464 73fa2c6f

+23 -3
+5 -3
pkgs/development/libraries/glfw/3.x.nix
··· 6 6 }: 7 7 8 8 stdenv.mkDerivation rec { 9 - version = "3.3.4"; 9 + version = "3.3.5"; 10 10 pname = "glfw"; 11 11 12 12 src = fetchFromGitHub { 13 13 owner = "glfw"; 14 14 repo = "GLFW"; 15 15 rev = version; 16 - sha256 = "sha256-BP4wxjgm0x0E68tNz5eudkVUyBnXkQlP7LY3ppZunhw="; 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)