diff options
author | Ben Siraphob <bensiraphob@gmail.com> | 2022-05-21 16:26:06 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-21 16:26:06 -0700 |
commit | 3c31489f15d49215529318055864e813c6691357 (patch) | |
tree | d379a33990bbbd0ba88d7b0876f1cd9e6e3fabdb /pkgs/applications/science/logic | |
parent | d913798903b1ec8ea3d1328ad6d06512d28ad6d1 (diff) | |
parent | a6aa08532c30e3b009988280f25144a4df23d1ff (diff) |
Merge pull request #173933 from siraben/zchaff-init
zchaff: init at 2004.5.13
Diffstat (limited to 'pkgs/applications/science/logic')
-rw-r--r-- | pkgs/applications/science/logic/zchaff/default.nix | 27 | ||||
-rw-r--r-- | pkgs/applications/science/logic/zchaff/sat_solver.patch | 12 |
2 files changed, 39 insertions, 0 deletions
diff --git a/pkgs/applications/science/logic/zchaff/default.nix b/pkgs/applications/science/logic/zchaff/default.nix new file mode 100644 index 0000000000000..8eedd9b43e535 --- /dev/null +++ b/pkgs/applications/science/logic/zchaff/default.nix @@ -0,0 +1,27 @@ +{ lib, stdenv, fetchurl }: + +stdenv.mkDerivation rec { + pname = "zchaff"; + version = "2004.5.13"; + + src = fetchurl { + url = "https://www.princeton.edu/~chaff/zchaff/zchaff.${version}.tar.gz"; + sha256 = "sha256-IgOdb2KsFbRV3gPvIPkHa71ixnYRxyx91vt7m0jzIAw="; + }; + + patches = [ ./sat_solver.patch ]; + makeFlags = [ "CC=${stdenv.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; + }; +} diff --git a/pkgs/applications/science/logic/zchaff/sat_solver.patch b/pkgs/applications/science/logic/zchaff/sat_solver.patch new file mode 100644 index 0000000000000..2a84ba18de245 --- /dev/null +++ b/pkgs/applications/science/logic/zchaff/sat_solver.patch @@ -0,0 +1,12 @@ +diff --git a/sat_solver.cpp b/sat_solver.cpp +index e191881..07c0926 100644 +--- a/sat_solver.cpp ++++ b/sat_solver2.cpp +@@ -43,6 +43,7 @@ + #include <vector> + #include <dirent.h> + #include "SAT.h" ++#include <cstring> + + using namespace std; + |