2022-07-18 16:21:45 +00:00
|
|
|
{ lib, clangStdenv, fetchzip }:
|
2022-06-16 17:23:12 +00:00
|
|
|
|
|
|
|
clangStdenv.mkDerivation rec {
|
|
|
|
pname = "zchaff";
|
2022-07-18 16:21:45 +00:00
|
|
|
version = "2007.3.12";
|
2022-06-16 17:23:12 +00:00
|
|
|
|
2022-07-18 16:21:45 +00:00
|
|
|
src = fetchzip {
|
|
|
|
url = "https://www.princeton.edu/~chaff/zchaff/zchaff.64bit.${version}.zip";
|
|
|
|
sha256 = "sha256-88fAtJb7o+Qv2GohTdmquxMEq4oCbiKbqLFmS7zs1Ak=";
|
2022-06-16 17:23:12 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
patches = [ ./sat_solver.patch ];
|
2022-07-18 16:21:45 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace zchaff_solver.cpp --replace "// #define VERIFY_ON" "#define VERIFY_ON"
|
|
|
|
'';
|
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
makeFlags = [ "CC=${clangStdenv.cc.targetPrefix}c++" ];
|
|
|
|
installPhase= ''
|
|
|
|
runHook preInstall
|
|
|
|
install -Dm755 -t $out/bin zchaff
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://www.princeton.edu/~chaff/zchaf";
|
|
|
|
description = "Accelerated SAT Solver from Princeton";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ siraben ];
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|