Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 buildPythonPackage, 4 cython, 5 fetchPypi, 6 numpy, 7 persim, 8 pytestCheckHook, 9 pythonOlder, 10 scikit-learn, 11 scipy, 12}: 13 14buildPythonPackage rec { 15 pname = "ripser"; 16 version = "0.6.8"; 17 format = "setuptools"; 18 19 disabled = pythonOlder "3.6"; 20 21 src = fetchPypi { 22 inherit pname version; 23 hash = "sha256-J5ctOvGtmg/e2ls7fN59LR4AbHedC9gKk6f8jIDIoFI="; 24 }; 25 26 nativeBuildInputs = [ cython ]; 27 28 propagatedBuildInputs = [ 29 numpy 30 scipy 31 scikit-learn 32 persim 33 ]; 34 35 nativeCheckInputs = [ pytestCheckHook ]; 36 37 preCheck = '' 38 # specifically needed for darwin 39 export HOME=$(mktemp -d) 40 mkdir -p $HOME/.matplotlib 41 echo "backend: ps" > $HOME/.matplotlib/matplotlibrc 42 ''; 43 44 pythonImportsCheck = [ "ripser" ]; 45 46 meta = with lib; { 47 description = "Lean Persistent Homology Library for Python"; 48 homepage = "https://ripser.scikit-tda.org"; 49 changelog = "https://github.com/scikit-tda/ripser.py/blob/${version}/CHANGELOG.md"; 50 license = licenses.mit; 51 maintainers = [ ]; 52 }; 53}