catimg: fix build with cmake 4

CMake 4 removed compatibility with CMake versions < 3.5.
Set CMAKE_POLICY_VERSION_MINIMUM to 3.5 to fix the build failure.

Fixes: https://github.com/NixOS/nixpkgs/issues/449801
Signed-off-by: Dave Walker <dave@daviey.com>
This commit is contained in:
Dave Walker
2025-10-08 13:40:34 +01:00
parent 98ecda14ac
commit 288698b6f3
+7
View File
@@ -17,6 +17,13 @@ stdenv.mkDerivation rec {
};
nativeBuildInputs = [ cmake ];
# Fix build with CMake 4: https://github.com/NixOS/nixpkgs/issues/449801
# CMake 4 removed support for CMake < 3.5, so we set the minimum policy version
cmakeFlags = [
(lib.cmakeFeature "CMAKE_POLICY_VERSION_MINIMUM" "3.5")
];
env = lib.optionalAttrs (stdenv.hostPlatform.libc == "glibc") {
CFLAGS = "-D_DEFAULT_SOURCE";
};