Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 21.05 46 lines 1.2 kB view raw
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 36 propagatedBuildInputs = [ numpy scipy cython networkx joblib pyyaml ]; 37 38 checkInputs = [ pandas nose ]; # as of 0.13.5, it depends explicitly on nose, rather than pytest. 39 40 meta = with lib; { 41 description = "Probabilistic and graphical models for Python, implemented in cython for speed"; 42 homepage = "https://github.com/jmschrei/pomegranate"; 43 license = licenses.mit; 44 maintainers = with maintainers; [ rybern ]; 45 }; 46}