diff --git a/pkgs/development/python-modules/pomegranate/default.nix b/pkgs/development/python-modules/pomegranate/default.nix index 8f260ad8ccb..518840d415a 100644 --- a/pkgs/development/python-modules/pomegranate/default.nix +++ b/pkgs/development/python-modules/pomegranate/default.nix @@ -1,19 +1,41 @@ -{ lib, buildPythonPackage, fetchFromGitHub, numpy, scipy, cython, networkx, joblib, nose, pyyaml }: +{ lib +, buildPythonPackage +, fetchFromGitHub +, fetchpatch +, numpy +, scipy +, cython +, networkx +, joblib +, pandas +, nose +, pyyaml +}: + buildPythonPackage rec { pname = "pomegranate"; - version = "0.11.2"; + version = "0.13.5"; src = fetchFromGitHub { repo = pname; owner = "jmschrei"; rev = "v${version}"; - sha256 = "070ciwww1lhjmfwd5n1kcwgxwbgdfvmhjs4l156bnf08z9dlrafl"; + sha256 = "1hbxchp3daykkf1fa79a9mh34p78bygqcf1nv4qwkql3gw0pd6l7"; }; + patches = lib.optionals (lib.versionOlder version "13.6") [ + # Fix compatibility with recent joblib release, will be part of the next + # pomegranate release after 0.13.5 + (fetchpatch { + url = "https://github.com/jmschrei/pomegranate/commit/42d14bebc44ffd4a778b2a6430aa845591b7c3b7.patch"; + sha256 = "0f9cx0fj9xkr3hch7jyrn76zjypilh5bqw734caaw6g2m49lvbff"; + }) + ]; + propagatedBuildInputs = [ numpy scipy cython networkx joblib pyyaml ]; - checkInputs = [ nose ]; + checkInputs = [ pandas nose ]; # as of 0.13.5, it depends explicitly on nose, rather than pytest. meta = with lib; { description = "Probabilistic and graphical models for Python, implemented in cython for speed";