at 23.05-pre 1.1 kB view raw
1{ lib 2, buildPythonPackage 3, fetchpatch 4, fetchPypi 5, pythonOlder 6, cython 7, numpy 8, scipy 9, scikit-learn 10, persim 11, pytestCheckHook 12}: 13 14buildPythonPackage rec { 15 pname = "ripser"; 16 version = "0.6.1"; 17 disabled = pythonOlder "3.6"; 18 19 src = fetchPypi { 20 inherit pname version; 21 sha256 = "335112a0f94532ccbe686db7826ee8d0714b32f65891abf92c0a02f3cb0fc5fd"; 22 }; 23 24 patches = [ 25 (fetchpatch { 26 url = "https://github.com/scikit-tda/ripser.py/commit/4baa248994cee9a65d710fac91809bad8ed4e5f1.patch"; 27 sha256 = "sha256-J/nxMOGOUiBueojJrUlAaXwktHDploYG/XL8/siF2kY="; 28 }) 29 ]; 30 31 propagatedBuildInputs = [ 32 cython 33 numpy 34 scipy 35 scikit-learn 36 persim 37 ]; 38 39 checkInputs = [ 40 pytestCheckHook 41 ]; 42 43 preCheck = '' 44 # specifically needed for darwin 45 export HOME=$(mktemp -d) 46 mkdir -p $HOME/.matplotlib 47 echo "backend: ps" > $HOME/.matplotlib/matplotlibrc 48 ''; 49 50 meta = with lib; { 51 description = "A Lean Persistent Homology Library for Python"; 52 homepage = "https://ripser.scikit-tda.org"; 53 license = licenses.mit; 54 maintainers = [ maintainers.costrouc ]; 55 }; 56}