lean2: fix build with cmake4 (#475695)

This commit is contained in:
Sandro
2026-01-04 15:34:17 +00:00
committed by GitHub
+14
View File
@@ -31,6 +31,20 @@ stdenv.mkDerivation {
sha256 = "060mvqn9y8lsn4l20q9rhamkymzsgh0r1vzkjw78gnj8kjw67jl5";
})
];
postPatch = ''
substituteInPlace src/CMakeLists.txt \
--replace-fail "cmake_minimum_required(VERSION 2.8.12)" "cmake_minimum_required(VERSION 3.10)"
# 'class lean::static_matrix<T, X>' has no member named 'get'
substituteInPlace src/util/lp/static_matrix.h \
--replace-fail "m_matrix.get(" "m_matrix.get_elem("
# 'const class lean::static_matrix<T, X>' has no member named 'get_value_of_column_cell'
substituteInPlace src/util/lp/static_matrix.cpp \
--replace-fail "A.get_value_of_column_cell(col)" "A[col]"
'';
nativeBuildInputs = [
cmake
makeWrapper