glfw3: added vulkan support (#354761)

This commit is contained in:
Sefa Eyeoglu 2024-11-10 14:25:33 +01:00 committed by GitHub
commit 2b05865a6f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,8 +1,23 @@
{ stdenv, lib, fetchFromGitHub, cmake, pkg-config { stdenv
, libGL, libXrandr, libXinerama, libXcursor, libX11, libXi, libXext , lib
, darwin, fixDarwinDylibNames , fetchFromGitHub
, cmake
, pkg-config
, libGL
, vulkan-loader
, libXrandr
, libXinerama
, libXcursor
, libX11
, libXi
, libXext
, darwin
, fixDarwinDylibNames
, wayland , wayland
, wayland-scanner, wayland-protocols, libxkbcommon, libdecor , wayland-scanner
, wayland-protocols
, libxkbcommon
, libdecor
, withMinecraftPatch ? false , withMinecraftPatch ? false
}: }:
let let
@ -51,6 +66,7 @@ stdenv.mkDerivation {
] ++ lib.optionals (!stdenv.hostPlatform.isDarwin && !stdenv.hostPlatform.isWindows) [ ] ++ lib.optionals (!stdenv.hostPlatform.isDarwin && !stdenv.hostPlatform.isWindows) [
"-DCMAKE_C_FLAGS=-D_GLFW_GLX_LIBRARY='\"${lib.getLib libGL}/lib/libGL.so.1\"'" "-DCMAKE_C_FLAGS=-D_GLFW_GLX_LIBRARY='\"${lib.getLib libGL}/lib/libGL.so.1\"'"
"-DCMAKE_C_FLAGS=-D_GLFW_EGL_LIBRARY='\"${lib.getLib libGL}/lib/libEGL.so.1\"'" "-DCMAKE_C_FLAGS=-D_GLFW_EGL_LIBRARY='\"${lib.getLib libGL}/lib/libEGL.so.1\"'"
"-DCMAKE_C_FLAGS=-D_GLFW_VULKAN_LIBRARY='\"${lib.getLib vulkan-loader}/lib/libvulkan.so.1\"'"
]; ];
postPatch = lib.optionalString stdenv.hostPlatform.isLinux '' postPatch = lib.optionalString stdenv.hostPlatform.isLinux ''