lean2: fix build with cmake4

This commit is contained in:
Sigmanificient
2026-01-04 14:24:10 +01:00
parent 3f36ffa238
commit 6c492fdc28
+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