Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 20.09 974 B view raw
1{ lib 2, buildPythonPackage 3, fetchPypi 4, scikitlearn 5, numpy 6, matplotlib 7, scipy 8, hopcroftkarp 9, pytest 10}: 11 12buildPythonPackage rec { 13 pname = "persim"; 14 version = "0.1.3"; 15 16 src = fetchPypi { 17 inherit pname version; 18 sha256 = "be4ea4bfc2a0c6fcfc28ebd52e23a351ee00b0ef0ddaf527526bd0f919145348"; 19 }; 20 21 propagatedBuildInputs = [ 22 scikitlearn 23 numpy 24 matplotlib 25 scipy 26 hopcroftkarp 27 ]; 28 29 checkInputs = [ 30 pytest 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 # ignore tests due to python 2.7 fail 40 pytest --ignore test/test_plots.py \ 41 --ignore test/test_visuals.py 42 ''; 43 44 meta = with lib; { 45 description = "Distances and representations of persistence diagrams"; 46 homepage = "https://persim.scikit-tda.org"; 47 license = licenses.mit; 48 maintainers = [ maintainers.costrouc ]; 49 }; 50}