2023-04-12 12:48:02 +00:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
2020-04-24 23:36:52 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
2023-04-12 12:48:02 +00:00
|
|
|
, pythonOlder
|
2021-01-09 10:05:03 +00:00
|
|
|
, pytestCheckHook
|
2020-04-24 23:36:52 +00:00
|
|
|
, cython
|
2023-10-09 19:29:22 +00:00
|
|
|
, setuptools
|
|
|
|
, setuptools-scm
|
|
|
|
, wheel
|
2020-04-24 23:36:52 +00:00
|
|
|
, numpy
|
|
|
|
, scipy
|
|
|
|
, matplotlib
|
|
|
|
, networkx
|
|
|
|
, nibabel
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "nitime";
|
2023-11-16 04:20:00 +00:00
|
|
|
version = "0.10.2";
|
2023-04-12 12:48:02 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
format = "pyproject";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2023-11-16 04:20:00 +00:00
|
|
|
hash = "sha256-NCaWr7ZqL1XV0QfUD+4+Yn33N1cCP33ib5oJ91OtJLU=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
# Upstream wants to build against the oldest version of numpy possible, but
|
|
|
|
# we only want to build against the most recent version.
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
|
|
|
--replace "numpy==" "numpy>="
|
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
cython
|
|
|
|
setuptools
|
|
|
|
setuptools-scm
|
|
|
|
wheel
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
numpy
|
|
|
|
scipy
|
|
|
|
matplotlib
|
|
|
|
networkx
|
|
|
|
nibabel
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-04-12 12:48:02 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2023-10-09 19:29:22 +00:00
|
|
|
|
2023-04-12 12:48:02 +00:00
|
|
|
doCheck = !stdenv.isDarwin; # tests hang indefinitely
|
2023-10-09 19:29:22 +00:00
|
|
|
|
2023-04-12 12:48:02 +00:00
|
|
|
pythonImportsCheck = [ "nitime" ];
|
2022-06-16 17:23:12 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://nipy.org/nitime";
|
|
|
|
description = "Algorithms and containers for time-series analysis in time and spectral domains";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = [ maintainers.bcdarwin ];
|
|
|
|
};
|
|
|
|
}
|