about summary refs log tree commit diff
path: root/pkgs/development/python-modules/pomegranate/default.nix
blob: 93c42374876c50462a64d57fd901b61830f19c1f (plain) (blame)
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
57
58
59
{ stdenv
, lib
, buildPythonPackage
, fetchFromGitHub

# build-system
, setuptools

# dependencies
, apricot-select
, networkx
, numpy
, scikit-learn
, scipy
, torch

# tests
, pytestCheckHook
}:


buildPythonPackage rec {
  pname = "pomegranate";
  version = "1.0.0";
  format = "pyproject";

  src = fetchFromGitHub {
    repo = pname;
    owner = "jmschrei";
    # no tags for recent versions: https://github.com/jmschrei/pomegranate/issues/974
    rev = "refs/tags/v${version}";
    sha256 = "sha256-EnxKlRRfsOIDLAhYOq7bUSbI/NvPoSyYCZ9D5VCXFGQ=";
  };

  nativeBuildInputs = [
    setuptools
  ];

  propagatedBuildInputs = [
    apricot-select
    networkx
    numpy
    scikit-learn
    scipy
    torch
  ];

  nativeCheckInputs = [
    pytestCheckHook
  ];

  meta = with lib; {
    broken = stdenv.isDarwin;
    description = "Probabilistic and graphical models for Python, implemented in cython for speed";
    homepage = "https://github.com/jmschrei/pomegranate";
    license = licenses.mit;
    maintainers = with maintainers; [ rybern ];
  };
}