Unverified Commit 07b5b5ea authored by Yohann Boniface's avatar Yohann Boniface Committed by GitHub
Browse files

creduce: fix build with cmake4 (#454157)

parents c61990ad b0912adb
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -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
    '';