From db7fb49d9b595acae017e1360d42cc5d4bca8c97 Mon Sep 17 00:00:00 2001 From: Emily Date: Thu, 11 Sep 2025 01:15:20 +0100 Subject: [PATCH] gflags: backport patch for CMake 4 Co-authored-by: K900 --- pkgs/by-name/gf/gflags/package.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pkgs/by-name/gf/gflags/package.nix b/pkgs/by-name/gf/gflags/package.nix index b01b862804e3..331aa6087332 100644 --- a/pkgs/by-name/gf/gflags/package.nix +++ b/pkgs/by-name/gf/gflags/package.nix @@ -2,6 +2,7 @@ lib, stdenv, fetchFromGitHub, + fetchpatch, cmake, enableShared ? !stdenv.hostPlatform.isStatic, }: @@ -17,6 +18,15 @@ stdenv.mkDerivation rec { sha256 = "147i3md3nxkjlrccqg4mq1kyzc7yrhvqv5902iibc7znkvzdvlp0"; }; + patches = [ + # Fix the build with CMake 4. + (fetchpatch { + name = "gflags-fix-cmake-4.patch"; + url = "https://github.com/gflags/gflags/commit/70c01a642f08734b7bddc9687884844ca117e080.patch"; + hash = "sha256-TYdroBbF27Wvvm/rOahBEvhezuKCcxbtgh/ZhpA5ESo="; + }) + ]; + nativeBuildInputs = [ cmake ]; # This isn't used by the build and breaks the CMake build on case-insensitive filesystems (e.g., on Darwin)