2023-03-04 12:14:45 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, cmake
|
|
|
|
, python3
|
|
|
|
, boost
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "cryptominisat";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "5.11.21";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2023-03-04 12:14:45 +00:00
|
|
|
owner = "msoos";
|
|
|
|
repo = "cryptominisat";
|
|
|
|
rev = version;
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-8oH9moMjQEWnQXKmKcqmXuXcYkEyvr4hwC1bC4l26mo=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
strictDeps = true;
|
|
|
|
buildInputs = [ boost ];
|
|
|
|
nativeBuildInputs = [ python3 cmake ];
|
|
|
|
|
|
|
|
# musl does not have sys/unistd.h
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace src/picosat/picosat.c --replace-fail '<sys/unistd.h>' '<unistd.h>'
|
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "An advanced SAT Solver";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "cryptominisat5";
|
2023-03-04 12:14:45 +00:00
|
|
|
homepage = "https://github.com/msoos/cryptominisat";
|
|
|
|
license = licenses.mit;
|
2020-04-24 23:36:52 +00:00
|
|
|
maintainers = with maintainers; [ mic92 ];
|
2023-03-04 12:14:45 +00:00
|
|
|
platforms = platforms.unix;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|