ctranslate2: fix CMake 4 compatibility

This commit is contained in:
Gaetan Lepage
2025-10-07 21:43:02 +00:00
parent c0b9be4e54
commit 127236cb72
+13
View File
@@ -38,6 +38,19 @@ stdenv'.mkDerivation (finalAttrs: {
hash = "sha256-EM2kunqtxo0BTIzrEomfaRsdav7sx6QEOhjDtjjSoYY=";
};
# Fix CMake 4 compatibility
postPatch = ''
substituteInPlace third_party/cpu_features/CMakeLists.txt \
--replace-fail \
'cmake_minimum_required(VERSION 3.0)' \
'cmake_minimum_required(VERSION 3.10)'
substituteInPlace third_party/ruy/third_party/cpuinfo/deps/clog/CMakeLists.txt \
--replace-fail \
'CMAKE_MINIMUM_REQUIRED(VERSION 3.1 FATAL_ERROR)' \
'CMAKE_MINIMUM_REQUIRED(VERSION 3.10 FATAL_ERROR)'
'';
nativeBuildInputs = [
cmake
]