summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/python-sat/default.nix
blob: bf1c6c45982c789ec2adc34be81118a6855bf939 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
{
  buildPythonPackage,
  fetchFromGitHub,
  lib,
  six,
  pypblib,
  pytestCheckHook,
}:

buildPythonPackage rec {
  pname = "python-sat";
  version = "0.1.7.dev1";
  format = "setuptools";

  src = fetchFromGitHub {
    owner = "pysathq";
    repo = "pysat";
    rev = version;
    hash = "sha256-zGdgD+SgoMB7/zDQI/trmV70l91TB7OkDxaJ30W3dkI=";
  };

  propagatedBuildInputs = [
    six
    pypblib
  ];

  nativeCheckInputs = [ pytestCheckHook ];

  # https://github.com/pysathq/pysat/pull/102
  postPatch = ''
        # Fix for case-insensitive filesystem
        cat >>solvers/patches/cadical.patch <<EOF
    diff --git solvers/cadical/VERSION solvers/cdc/VERSION
    deleted file mode 100644
    --- solvers/cadical/VERSION
    +++ /dev/null
    @@ -1 +0,0 @@
    -1.0.3
    EOF
  '';

  meta = with lib; {
    description = "Toolkit to provide interface for various SAT (without optional dependancy py-aiger-cnf)";
    homepage = "https://github.com/pysathq/pysat";
    license = licenses.mit;
    maintainers = [ maintainers.marius851000 ];
  };
}