mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-27 01:13:05 +00:00
Merge pull request #293296 from getchoo/pkgs/glfw/3.4
glfw: 3.3.10 -> 3.4
This commit is contained in:
commit
ed36fa3563
@ -1,47 +1,54 @@
|
||||
{ stdenv, lib, fetchFromGitHub, cmake
|
||||
, libGL, libXrandr, libXinerama, libXcursor, libX11, libXi, libXext
|
||||
, Carbon, Cocoa, Kernel, OpenGL, fixDarwinDylibNames
|
||||
, waylandSupport ? false, extra-cmake-modules, wayland
|
||||
, wayland-protocols, libxkbcommon
|
||||
, extra-cmake-modules, wayland
|
||||
, wayland-scanner, wayland-protocols, libxkbcommon
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "3.3.10";
|
||||
version = "3.4";
|
||||
pname = "glfw";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "glfw";
|
||||
repo = "GLFW";
|
||||
rev = version;
|
||||
sha256 = "sha256-kTRXsfQ+9PFurG3ffz0lwnITAYAXtNl3h/3O6FSny5o=";
|
||||
sha256 = "sha256-FcnQPDeNHgov1Z07gjFze0VMz2diOrpbKZCsI96ngz0=";
|
||||
};
|
||||
|
||||
# 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.optional waylandSupport extra-cmake-modules;
|
||||
++ 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_USE_WAYLAND=ON"
|
||||
"-DCMAKE_C_FLAGS=-D_GLFW_EGL_LIBRARY='\"${lib.getLib libGL}/lib/libEGL.so.1\"'"
|
||||
];
|
||||
|
||||
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"
|
||||
'';
|
||||
|
@ -413,6 +413,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;
|
||||
@ -1290,6 +1291,7 @@ mapAliases ({
|
||||
virtmanager-qt = throw "'virtmanager-qt' has been renamed to/replaced by 'virt-manager-qt'"; # Converted to throw 2023-09-10
|
||||
vivaldi-widevine = throw "'vivaldi-widevine' has been renamed to/replaced by 'widevine-cdm'"; # Added 2023-02-25
|
||||
vkBasalt = vkbasalt; # Added 2022-11-22
|
||||
vkdt-wayland = vkdt; # Added 2024-04-19
|
||||
vsmtp = throw "'vsmtp' has been removed, upstream gone"; # Added 2023-12-18
|
||||
vte_290 = throw "'vte_290' has been renamed to/replaced by 'vte'"; # Added 2023-01-05
|
||||
varnish72 = throw "varnish 7.2 is EOL. Either use the LTS or upgrade."; # Added 2023-10-09
|
||||
|
@ -21126,9 +21126,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 {
|
||||
@ -24969,8 +24966,6 @@ with pkgs;
|
||||
|
||||
vkdt = callPackage ../applications/graphics/vkdt { };
|
||||
|
||||
vkdt-wayland = callPackage ../applications/graphics/vkdt { glfw = glfw-wayland; };
|
||||
|
||||
vlock = callPackage ../misc/screensavers/vlock { };
|
||||
|
||||
virtualpg = callPackage ../development/libraries/virtualpg { };
|
||||
|
Loading…
Reference in New Issue
Block a user