From b0912adb84c68732c6f52a6b65d73d21070f7687 Mon Sep 17 00:00:00 2001 From: Rafael Ieda Date: Tue, 21 Oct 2025 07:13:40 -0300 Subject: [PATCH] creduce: fix build with cmake4 Co-authored-by: Michael Daniels --- pkgs/development/tools/misc/creduce/default.nix | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pkgs/development/tools/misc/creduce/default.nix b/pkgs/development/tools/misc/creduce/default.nix index 3061968e2b71..abd83ca195a5 100644 --- a/pkgs/development/tools/misc/creduce/default.nix +++ b/pkgs/development/tools/misc/creduce/default.nix @@ -23,12 +23,16 @@ stdenv.mkDerivation { hash = "sha256-RbxFqZegsCxnUaIIA5OfTzx1wflCPeF+enQt90VwMgA="; }; - postPatch = + postPatch = '' + substituteInPlace {clex,clang_delta,delta,unifdef,creduce,.}/CMakeLists.txt --replace-fail \ + "cmake_minimum_required(VERSION 2.8.12)" "cmake_minimum_required(VERSION 3.10)" + '' + + # On Linux, c-reduce's preferred way to reason about # the cpu architecture/topology is to use 'lscpu', # so let's make sure it knows where to find it: lib.optionalString stdenv.hostPlatform.isLinux '' - substituteInPlace creduce/creduce_utils.pm --replace \ + substituteInPlace creduce/creduce_utils.pm --replace-fail \ lscpu ${util-linux}/bin/lscpu '';