Merge pull request #111689 from Luflosi/glfw-dont-substitute

glfw: hardwire path to libGL.so.1 the intended way
This commit is contained in:
Daniël de Kok 2021-02-04 07:52:46 +01:00 committed by GitHub
commit 2fd4001228
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -22,11 +22,11 @@ stdenv.mkDerivation rec {
buildInputs = [ libX11 libXrandr libXinerama libXcursor libXi libXext ] buildInputs = [ libX11 libXrandr libXinerama libXcursor libXi libXext ]
++ lib.optionals stdenv.isDarwin [ Cocoa Kernel ]; ++ lib.optionals stdenv.isDarwin [ Cocoa Kernel ];
cmakeFlags = [ "-DBUILD_SHARED_LIBS=ON" ]; cmakeFlags = [
"-DBUILD_SHARED_LIBS=ON"
preConfigure = lib.optional (!stdenv.isDarwin) '' ] ++ lib.optional (!stdenv.isDarwin) [
substituteInPlace src/glx_context.c --replace "libGL.so.1" "${lib.getLib libGL}/lib/libGL.so.1" "-DCMAKE_C_FLAGS=-D_GLFW_GLX_LIBRARY='\"${lib.getLib libGL}/lib/libGL.so.1\"'"
''; ];
meta = with lib; { meta = with lib; {
description = "Multi-platform library for creating OpenGL contexts and managing input, including keyboard, mouse, joystick and time"; description = "Multi-platform library for creating OpenGL contexts and managing input, including keyboard, mouse, joystick and time";