nixpkgs/pkgs/by-name/zc/zchaff/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

33 lines
887 B
Nix
Raw Normal View History

2022-06-03 17:50:47 +00:00
{ lib, clangStdenv, fetchzip }:
2022-05-21 22:12:08 +00:00
clangStdenv.mkDerivation rec {
2022-05-21 22:12:08 +00:00
pname = "zchaff";
2022-06-03 17:50:47 +00:00
version = "2007.3.12";
2022-05-21 22:12:08 +00:00
2022-06-03 17:50:47 +00:00
src = fetchzip {
url = "https://www.princeton.edu/~chaff/zchaff/zchaff.64bit.${version}.zip";
sha256 = "sha256-88fAtJb7o+Qv2GohTdmquxMEq4oCbiKbqLFmS7zs1Ak=";
2022-05-21 22:12:08 +00:00
};
patches = [ ./sat_solver.patch ];
2022-06-03 17:50:47 +00:00
postPatch = ''
substituteInPlace zchaff_solver.cpp --replace "// #define VERIFY_ON" "#define VERIFY_ON"
'';
makeFlags = [ "CC=${clangStdenv.cc.targetPrefix}c++" ];
2022-05-21 22:12:08 +00:00
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";
mainProgram = "zchaff";
2022-05-21 22:12:08 +00:00
license = licenses.mit;
maintainers = with maintainers; [ siraben ];
platforms = platforms.unix;
};
}