From 5a81bed4a01acefd6c4fea7f94d772af6e3aa44a Mon Sep 17 00:00:00 2001 From: Emily Date: Wed, 10 Sep 2025 02:32:16 +0100 Subject: [PATCH] libuchardet: backport patch for CMake 4 --- pkgs/by-name/li/libuchardet/package.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pkgs/by-name/li/libuchardet/package.nix b/pkgs/by-name/li/libuchardet/package.nix index 321a1d042576..b2645715dced 100644 --- a/pkgs/by-name/li/libuchardet/package.nix +++ b/pkgs/by-name/li/libuchardet/package.nix @@ -2,6 +2,7 @@ lib, stdenv, fetchurl, + fetchpatch, cmake, }: @@ -21,6 +22,15 @@ stdenv.mkDerivation rec { sha256 = "sha256-6Xpgz8AKHBR6Z0sJe7FCKr2fp4otnOPz/cwueKNKxfA="; }; + patches = [ + # Fix the build with CMake 4. + (fetchpatch { + name = "uchardet-cmake-4.patch"; + url = "https://gitlab.freedesktop.org/uchardet/uchardet/-/commit/6e163c978a7c13a6d3ff64a1e3dd4ba81d2d9e09.patch"; + hash = "sha256-WXIQEoIpT7b5vELAfQJFEt2hiYrlnGCjV7ILCmd9kqY="; + }) + ]; + nativeBuildInputs = [ cmake ]; doCheck = !stdenv.hostPlatform.isi686; # tests fail on i686