1{ stdenv
2, lib
3, buildPythonPackage
4, fetchFromGitHub
5, numpy
6, scipy
7, cython
8, networkx
9, joblib
10, pandas
11, nose
12, pyyaml
13}:
14
15
16buildPythonPackage rec {
17 pname = "pomegranate";
18 version = "1.0.0";
19 format = "pyproject";
20
21 src = fetchFromGitHub {
22 repo = pname;
23 owner = "jmschrei";
24 # no tags for recent versions: https://github.com/jmschrei/pomegranate/issues/974
25 rev = "refs/tags/v${version}";
26 sha256 = "sha256-EnxKlRRfsOIDLAhYOq7bUSbI/NvPoSyYCZ9D5VCXFGQ=";
27 };
28
29 propagatedBuildInputs = [ numpy scipy cython networkx joblib pyyaml ];
30
31 nativeCheckInputs = [ pandas nose ]; # as of 0.13.5, it depends explicitly on nose, rather than pytest.
32
33 meta = with lib; {
34 broken = stdenv.isDarwin;
35 description = "Probabilistic and graphical models for Python, implemented in cython for speed";
36 homepage = "https://github.com/jmschrei/pomegranate";
37 license = licenses.mit;
38 maintainers = with maintainers; [ rybern ];
39 };
40}