Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 19.09 48 lines 831 B view raw
1{ lib 2, buildPythonPackage 3, fetchPypi 4, cython 5, numpy 6, scipy 7, scikitlearn 8, persim 9, pytest 10}: 11 12buildPythonPackage rec { 13 pname = "ripser"; 14 version = "0.3.2"; 15 16 src = fetchPypi { 17 inherit pname version; 18 sha256 = "ff9f50fba911f0e9212077b78014f83e30c97526194dd6bd1df3d81896e6cb58"; 19 }; 20 21 checkInputs = [ 22 pytest 23 ]; 24 25 propagatedBuildInputs = [ 26 cython 27 numpy 28 scipy 29 scikitlearn 30 persim 31 ]; 32 33 checkPhase = '' 34 # specifically needed for darwin 35 export HOME=$(mktemp -d) 36 mkdir -p $HOME/.matplotlib 37 echo "backend: ps" > $HOME/.matplotlib/matplotlibrc 38 39 pytest 40 ''; 41 42 meta = with lib; { 43 description = "A Lean Persistent Homology Library for Python"; 44 homepage = https://ripser.scikit-tda.org; 45 license = licenses.mit; 46 maintainers = [ maintainers.costrouc ]; 47 }; 48}