1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, fetchpatch 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 = "0.13.5"; 19 20 src = fetchFromGitHub { 21 repo = pname; 22 owner = "jmschrei"; 23 rev = "v${version}"; 24 sha256 = "1hbxchp3daykkf1fa79a9mh34p78bygqcf1nv4qwkql3gw0pd6l7"; 25 }; 26 27 patches = lib.optionals (lib.versionOlder version "13.6") [ 28 # Fix compatibility with recent joblib release, will be part of the next 29 # pomegranate release after 0.13.5 30 (fetchpatch { 31 url = "https://github.com/jmschrei/pomegranate/commit/42d14bebc44ffd4a778b2a6430aa845591b7c3b7.patch"; 32 sha256 = "0f9cx0fj9xkr3hch7jyrn76zjypilh5bqw734caaw6g2m49lvbff"; 33 }) 34 ] ++ [ 35 # Likely an upstream test bug and not a real problem: 36 # https://github.com/jmschrei/pomegranate/issues/939 37 ./disable-failed-on-nextworkx-2.6.patch 38 ] ; 39 40 propagatedBuildInputs = [ numpy scipy cython networkx joblib pyyaml ]; 41 42 checkInputs = [ pandas nose ]; # as of 0.13.5, it depends explicitly on nose, rather than pytest. 43 44 meta = with lib; { 45 description = "Probabilistic and graphical models for Python, implemented in cython for speed"; 46 homepage = "https://github.com/jmschrei/pomegranate"; 47 license = licenses.mit; 48 maintainers = with maintainers; [ rybern ]; 49 }; 50}