summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/simplesat/default.nix
blob: 7c86785ba49b69b0a3629570617055339714d8d6 (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
49
50
51
52
53
54
55
56
{
  lib,
  attrs,
  buildPythonPackage,
  fetchFromGitHub,
  mock,
  okonomiyaki,
  pytestCheckHook,
  pyyaml,
  setuptools,
  six,
}:

buildPythonPackage rec {
  pname = "simplesat";
  version = "0.9.2";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "enthought";
    repo = "sat-solver";
    tag = "v${version}";
    hash = "sha256-C3AQN999iuckaY9I0RTI8Uj6hrV4UB1XYvua5VG8hHw=";
  };

  postPatch = ''
    substituteInPlace setup.cfg \
      --replace-fail "version = file: VERSION" "version = ${version}"
  '';

  build-system = [ setuptools ];

  dependencies = [
    attrs
    okonomiyaki
    six
  ];

  nativeCheckInputs = [
    mock
    pytestCheckHook
    pyyaml
  ];

  pythonImportsCheck = [ "simplesat" ];

  enabledTestPaths = [ "simplesat/tests" ];

  meta = {
    description = "Prototype for SAT-based dependency handling";
    homepage = "https://github.com/enthought/sat-solver";
    changelog = "https://github.com/enthought/sat-solver/blob/${src.tag}/CHANGES.rst";
    license = lib.licenses.bsd3;
    maintainers = [ ];
  };
}