Unverified Commit c4ea0f97 authored by Vincent Laporte's avatar Vincent Laporte
Browse files

minisat: fix build with CMake 4

parent f18aed0c
Loading
Loading
Loading
Loading
+10 −4
Original line number Diff line number Diff line
@@ -6,17 +6,23 @@
  zlib,
}:

stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
  pname = "minisat";
  version = "2.2.1";

  src = fetchFromGitHub {
    owner = "stp";
    repo = "minisat";
    rev = "releases/${version}";
    sha256 = "14vcbjnlia00lpyv2fhbmw3wbc9bk9h7bln9zpyc3nwiz5cbjz4a";
    tag = "releases/${finalAttrs.version}";
    hash = "sha256-iny5WPmR28H8/cnSdWCaK7HFB68LOrH9pQCoSK1cbJM=";
  };

  postPatch = ''
    substituteInPlace CMakeLists.txt --replace-fail \
      'cmake_minimum_required(VERSION 2.6 FATAL_ERROR)' \
      'cmake_minimum_required(VERSION 4.1)'
  '';

  nativeBuildInputs = [ cmake ];
  buildInputs = [ zlib ];

@@ -29,4 +35,4 @@ stdenv.mkDerivation rec {
    license = licenses.mit;
    homepage = "http://minisat.se/";
  };
}
})