From 682da86024e6102a559bc0cb630dd4155277f353 Mon Sep 17 00:00:00 2001 From: Luflosi Date: Tue, 2 Feb 2021 14:24:19 +0100 Subject: [PATCH] glfw: hardwire path to libGL.so.1 the intended way GLFW provides a better way to specify the path to libGL than to patch the source code. --- pkgs/development/libraries/glfw/3.x.nix | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pkgs/development/libraries/glfw/3.x.nix b/pkgs/development/libraries/glfw/3.x.nix index 8698b71567e2..e2e0ba3bccf4 100644 --- a/pkgs/development/libraries/glfw/3.x.nix +++ b/pkgs/development/libraries/glfw/3.x.nix @@ -22,11 +22,11 @@ stdenv.mkDerivation rec { buildInputs = [ libX11 libXrandr libXinerama libXcursor libXi libXext ] ++ lib.optionals stdenv.isDarwin [ Cocoa Kernel ]; - cmakeFlags = [ "-DBUILD_SHARED_LIBS=ON" ]; - - preConfigure = lib.optional (!stdenv.isDarwin) '' - substituteInPlace src/glx_context.c --replace "libGL.so.1" "${lib.getLib libGL}/lib/libGL.so.1" - ''; + cmakeFlags = [ + "-DBUILD_SHARED_LIBS=ON" + ] ++ lib.optional (!stdenv.isDarwin) [ + "-DCMAKE_C_FLAGS=-D_GLFW_GLX_LIBRARY='\"${lib.getLib libGL}/lib/libGL.so.1\"'" + ]; meta = with lib; { description = "Multi-platform library for creating OpenGL contexts and managing input, including keyboard, mouse, joystick and time";