1{
2 buildPythonPackage,
3 fetchFromGitHub,
4 lib,
5 six,
6 pypblib,
7 pytestCheckHook,
8}:
9
10buildPythonPackage rec {
11 pname = "python-sat";
12 version = "0.1.7.dev1";
13 format = "setuptools";
14
15 src = fetchFromGitHub {
16 owner = "pysathq";
17 repo = "pysat";
18 rev = version;
19 hash = "sha256-zGdgD+SgoMB7/zDQI/trmV70l91TB7OkDxaJ30W3dkI=";
20 };
21
22 propagatedBuildInputs = [
23 six
24 pypblib
25 ];
26
27 nativeCheckInputs = [ pytestCheckHook ];
28
29 # https://github.com/pysathq/pysat/pull/102
30 postPatch = ''
31 # Fix for case-insensitive filesystem
32 cat >>solvers/patches/cadical.patch <<EOF
33 diff --git solvers/cadical/VERSION solvers/cdc/VERSION
34 deleted file mode 100644
35 --- solvers/cadical/VERSION
36 +++ /dev/null
37 @@ -1 +0,0 @@
38 -1.0.3
39 EOF
40 '';
41
42 meta = with lib; {
43 description = "Toolkit to provide interface for various SAT (without optional dependancy py-aiger-cnf)";
44 homepage = "https://github.com/pysathq/pysat";
45 license = licenses.mit;
46 maintainers = [ maintainers.marius851000 ];
47 };
48}