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