From 10eac325290ea3d4b1a02dfb2540a12b1c016fc0 Mon Sep 17 00:00:00 2001 From: seth Date: Mon, 4 Mar 2024 11:54:53 -0500 Subject: [PATCH 1/3] glfw: 3.3.10 -> 3.4 Diff: https://github.com/glfw/GLFW/compare/3.3.10...3.4 --- pkgs/development/libraries/glfw/3.x.nix | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/pkgs/development/libraries/glfw/3.x.nix b/pkgs/development/libraries/glfw/3.x.nix index 014e5f7e9f0e..278214aa809a 100644 --- a/pkgs/development/libraries/glfw/3.x.nix +++ b/pkgs/development/libraries/glfw/3.x.nix @@ -2,18 +2,18 @@ , libGL, libXrandr, libXinerama, libXcursor, libX11, libXi, libXext , Carbon, Cocoa, Kernel, OpenGL, fixDarwinDylibNames , waylandSupport ? false, extra-cmake-modules, wayland -, wayland-protocols, libxkbcommon +, 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) @@ -25,7 +25,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake ] ++ lib.optional stdenv.isDarwin fixDarwinDylibNames - ++ lib.optional waylandSupport extra-cmake-modules; + ++ lib.optionals waylandSupport [ extra-cmake-modules wayland-scanner ]; buildInputs = lib.optionals stdenv.isDarwin [ Carbon Cocoa Kernel ] @@ -37,8 +37,10 @@ stdenv.mkDerivation rec { ] ++ 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" + "-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 '' From c857877a3a220604f86d4b4f9426db880ed6e808 Mon Sep 17 00:00:00 2001 From: seth Date: Sun, 31 Mar 2024 18:10:10 -0400 Subject: [PATCH 2/3] glfw-wayland: drop as of 3.4, upstream now builds with Wayland by default --- pkgs/development/libraries/glfw/3.x.nix | 27 +++++++++++++++---------- pkgs/top-level/aliases.nix | 1 + pkgs/top-level/all-packages.nix | 3 --- 3 files changed, 17 insertions(+), 14 deletions(-) diff --git a/pkgs/development/libraries/glfw/3.x.nix b/pkgs/development/libraries/glfw/3.x.nix index 278214aa809a..5e0b6adbb226 100644 --- a/pkgs/development/libraries/glfw/3.x.nix +++ b/pkgs/development/libraries/glfw/3.x.nix @@ -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" ''; diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index 1d55f600d2f9..725e410e041c 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -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; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 5de7219b376e..a7b2b9bf84ec 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -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 { From d9f0c7947673bd10f12598f37abf4229ee90e670 Mon Sep 17 00:00:00 2001 From: seth Date: Sun, 31 Mar 2024 18:12:47 -0400 Subject: [PATCH 3/3] vkdt-wayland: drop this follows `glfw-wayland` also being dropped --- pkgs/top-level/aliases.nix | 1 + pkgs/top-level/all-packages.nix | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index 725e410e041c..bc33d6633a9a 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -1168,6 +1168,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 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index a7b2b9bf84ec..a885b5075557 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -25211,8 +25211,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 { };