tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
0
fork
atom
lol
0
fork
atom
overview
issues
pulls
pipelines
glfw: patch linkage with X11
Nguyễn Gia Phong
4 years ago
95d7a591
56391a5c
+21
-1
2 changed files
expand all
collapse all
unified
split
pkgs
development
libraries
glfw
3.x.nix
x11.patch
+3
-1
pkgs/development/libraries/glfw/3.x.nix
···
16
16
sha256 = "sha256-1KkzYclOLGqiV1/8BsJ3e+pXMQ6a+sjLwZ7mjSuxxbA=";
17
17
};
18
18
19
19
-
patches = lib.optional waylandSupport ./wayland.patch;
19
19
+
# Fix freezing on Wayland (https://github.com/glfw/glfw/pull/1711)
20
20
+
# and linkage issues on X11 (https://github.com/NixOS/nixpkgs/issues/142583)
21
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
1
+
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
2
2
+
index a0be580e..ba143851 100644
3
3
+
--- a/src/CMakeLists.txt
4
4
+
+++ b/src/CMakeLists.txt
5
5
+
@@ -219,6 +219,13 @@ if (GLFW_BUILD_X11)
6
6
+
if (NOT X11_Xshape_INCLUDE_PATH)
7
7
+
message(FATAL_ERROR "X Shape headers not found; install libxext development package")
8
8
+
endif()
9
9
+
+
10
10
+
+ target_link_libraries(glfw PRIVATE ${X11_Xrandr_LIB}
11
11
+
+ ${X11_Xinerama_LIB}
12
12
+
+ ${X11_Xkb_LIB}
13
13
+
+ ${X11_Xcursor_LIB}
14
14
+
+ ${X11_Xi_LIB}
15
15
+
+ ${X11_Xshape_LIB})
16
16
+
endif()
17
17
+
18
18
+
if (UNIX AND NOT APPLE)