mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-22 03:53:47 +00:00
glfw-wayland: drop
as of 3.4, upstream now builds with Wayland by default
This commit is contained in:
parent
10eac32529
commit
c857877a3a
@ -1,7 +1,7 @@
|
||||
{ stdenv, lib, fetchFromGitHub, cmake
|
||||
, libGL, libXrandr, libXinerama, libXcursor, libX11, libXi, libXext
|
||||
, Carbon, Cocoa, Kernel, OpenGL, fixDarwinDylibNames
|
||||
, waylandSupport ? false, extra-cmake-modules, wayland
|
||||
, extra-cmake-modules, wayland
|
||||
, wayland-scanner, wayland-protocols, libxkbcommon
|
||||
}:
|
||||
|
||||
@ -17,33 +17,38 @@ stdenv.mkDerivation rec {
|
||||
};
|
||||
|
||||
# Fix linkage issues on X11 (https://github.com/NixOS/nixpkgs/issues/142583)
|
||||
patches = lib.optional (!waylandSupport) ./x11.patch;
|
||||
patches = ./x11.patch;
|
||||
|
||||
propagatedBuildInputs =
|
||||
lib.optionals stdenv.isDarwin [ OpenGL ]
|
||||
++ lib.optionals stdenv.isLinux [ libGL ];
|
||||
|
||||
nativeBuildInputs = [ cmake ]
|
||||
nativeBuildInputs = [ cmake extra-cmake-modules ]
|
||||
++ lib.optional stdenv.isDarwin fixDarwinDylibNames
|
||||
++ lib.optionals waylandSupport [ extra-cmake-modules wayland-scanner ];
|
||||
++ lib.optionals stdenv.isLinux [ wayland-scanner ];
|
||||
|
||||
buildInputs =
|
||||
lib.optionals stdenv.isDarwin [ Carbon Cocoa Kernel ]
|
||||
++ lib.optionals (stdenv.isLinux && waylandSupport) [ wayland wayland-protocols libxkbcommon ]
|
||||
++ lib.optionals (stdenv.isLinux && !waylandSupport) [ libX11 libXrandr libXinerama libXcursor libXi libXext ];
|
||||
++ lib.optionals stdenv.isLinux [
|
||||
wayland
|
||||
wayland-protocols
|
||||
libxkbcommon
|
||||
libX11
|
||||
libXrandr
|
||||
libXinerama
|
||||
libXcursor
|
||||
libXi
|
||||
libXext
|
||||
];
|
||||
|
||||
cmakeFlags = [
|
||||
"-DBUILD_SHARED_LIBS=ON"
|
||||
] ++ lib.optionals (!stdenv.isDarwin && !stdenv.hostPlatform.isWindows) [
|
||||
"-DCMAKE_C_FLAGS=-D_GLFW_GLX_LIBRARY='\"${lib.getLib libGL}/lib/libGL.so.1\"'"
|
||||
] ++ lib.optionals waylandSupport [
|
||||
"-DGLFW_BUILD_X11=OFF"
|
||||
"-DCMAKE_C_FLAGS=-D_GLFW_EGL_LIBRARY='\"${lib.getLib libGL}/lib/libEGL.so.1\"'"
|
||||
] ++ lib.optionals (!waylandSupport) [
|
||||
"-DGLFW_BUILD_WAYLAND=OFF"
|
||||
];
|
||||
|
||||
postPatch = lib.optionalString waylandSupport ''
|
||||
postPatch = lib.optionalString stdenv.isLinux ''
|
||||
substituteInPlace src/wl_init.c \
|
||||
--replace "libxkbcommon.so.0" "${lib.getLib libxkbcommon}/lib/libxkbcommon.so.0"
|
||||
'';
|
||||
|
@ -355,6 +355,7 @@ mapAliases ({
|
||||
|
||||
gitter = throw "gitter has been removed since the client has been abandoned by upstream with the backend migration to Matrix"; # Added 2023-09-18
|
||||
glide = throw "'glide' has been removed as it is unmaintained, please use Go modules instead"; # Added 2023-12-26
|
||||
glfw-wayland = glfw; # Added 2024-04-19
|
||||
gmailieer = lieer; # Added 2020-04-19
|
||||
gmic-qt-krita = throw "gmic-qt-krita was removed as it's no longer supported upstream."; # Converted to throw 2023-02-02
|
||||
gnatboot11 = gnat-bootstrap11;
|
||||
|
@ -21347,9 +21347,6 @@ with pkgs;
|
||||
};
|
||||
|
||||
glfw = glfw3;
|
||||
glfw-wayland = glfw.override {
|
||||
waylandSupport = true;
|
||||
};
|
||||
glfw-wayland-minecraft = callPackage ../development/libraries/glfw/3.x-wayland-minecraft.nix {};
|
||||
glfw2 = callPackage ../development/libraries/glfw/2.x.nix { };
|
||||
glfw3 = callPackage ../development/libraries/glfw/3.x.nix {
|
||||
|
Loading…
Reference in New Issue
Block a user