base16-schemes: unstable-2024-06-21 -> unstable-2024-11-12
[NixPkgs.git] / pkgs / by-name / zc / zchaff / package.nix
blob5e22ff448ed376f8d987d17f18ef0eafc9111782
1 { lib, clangStdenv, fetchzip }:
3 clangStdenv.mkDerivation rec {
4   pname = "zchaff";
5   version = "2007.3.12";
7   src = fetchzip {
8     url = "https://www.princeton.edu/~chaff/zchaff/zchaff.64bit.${version}.zip";
9     sha256 = "sha256-88fAtJb7o+Qv2GohTdmquxMEq4oCbiKbqLFmS7zs1Ak=";
10   };
12   patches = [ ./sat_solver.patch ];
13   postPatch = ''
14     substituteInPlace zchaff_solver.cpp --replace "// #define VERIFY_ON" "#define VERIFY_ON"
15   '';
17   makeFlags = [ "CC=${clangStdenv.cc.targetPrefix}c++" ];
18   installPhase= ''
19     runHook preInstall
20     install -Dm755 -t $out/bin zchaff
21     runHook postInstall
22   '';
24   meta = with lib; {
25     homepage = "https://www.princeton.edu/~chaff/zchaf";
26     description = "Accelerated SAT Solver from Princeton";
27     mainProgram = "zchaff";
28     license = licenses.mit;
29     maintainers = with maintainers; [ siraben ];
30     platforms = platforms.unix;
31   };