2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
2021-05-03 20:48:10 +00:00
|
|
|
, deprecated
|
|
|
|
, hopcroftkarp
|
|
|
|
, joblib
|
2020-04-24 23:36:52 +00:00
|
|
|
, matplotlib
|
2021-05-03 20:48:10 +00:00
|
|
|
, numpy
|
2021-05-20 23:08:51 +00:00
|
|
|
, scikit-learn
|
2020-04-24 23:36:52 +00:00
|
|
|
, scipy
|
2021-05-03 20:48:10 +00:00
|
|
|
, pytestCheckHook
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "persim";
|
2021-06-28 23:13:55 +00:00
|
|
|
version = "0.3.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-06-28 23:13:55 +00:00
|
|
|
sha256 = "ef0f0a247adcf6104ecac14117db0b24581710ea8a8d964816805395700b4975";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
2021-05-03 20:48:10 +00:00
|
|
|
deprecated
|
|
|
|
hopcroftkarp
|
|
|
|
joblib
|
2020-04-24 23:36:52 +00:00
|
|
|
matplotlib
|
2021-05-03 20:48:10 +00:00
|
|
|
numpy
|
2021-05-20 23:08:51 +00:00
|
|
|
scikit-learn
|
2020-04-24 23:36:52 +00:00
|
|
|
scipy
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
2021-05-03 20:48:10 +00:00
|
|
|
pytestCheckHook
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2021-05-03 20:48:10 +00:00
|
|
|
preCheck = ''
|
2020-04-24 23:36:52 +00:00
|
|
|
# specifically needed for darwin
|
|
|
|
export HOME=$(mktemp -d)
|
|
|
|
mkdir -p $HOME/.matplotlib
|
|
|
|
echo "backend: ps" > $HOME/.matplotlib/matplotlibrc
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Distances and representations of persistence diagrams";
|
|
|
|
homepage = "https://persim.scikit-tda.org";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = [ maintainers.costrouc ];
|
|
|
|
};
|
|
|
|
}
|