2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
cython,
|
|
|
|
fetchPypi,
|
|
|
|
numpy,
|
|
|
|
persim,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
|
|
|
scikit-learn,
|
|
|
|
scipy,
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "ripser";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "0.6.8";
|
2023-03-04 12:14:45 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
2020-09-25 04:45:31 +00:00
|
|
|
disabled = pythonOlder "3.6";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-J5ctOvGtmg/e2ls7fN59LR4AbHedC9gKk6f8jIDIoFI=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [ cython ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
numpy
|
|
|
|
scipy
|
2021-05-20 23:08:51 +00:00
|
|
|
scikit-learn
|
2020-04-24 23:36:52 +00:00
|
|
|
persim
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2022-04-27 09:35:20 +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
|
|
|
|
'';
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "ripser" ];
|
2023-03-04 12:14:45 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Lean Persistent Homology Library for Python";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://ripser.scikit-tda.org";
|
2023-03-04 12:14:45 +00:00
|
|
|
changelog = "https://github.com/scikit-tda/ripser.py/blob/${version}/CHANGELOG.md";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.mit;
|
2024-07-31 10:19:44 +00:00
|
|
|
maintainers = [ ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|