2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
2020-04-24 23:36:52 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, pythonOlder
|
2023-02-16 17:41:37 +00:00
|
|
|
, cython
|
2020-04-24 23:36:52 +00:00
|
|
|
, nose
|
|
|
|
, matplotlib
|
|
|
|
, nibabel
|
|
|
|
, numpy
|
|
|
|
, scipy
|
|
|
|
, sympy
|
|
|
|
, python
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2021-06-28 23:13:55 +00:00
|
|
|
version = "0.5.0";
|
2024-01-02 11:29:13 +00:00
|
|
|
format = "setuptools";
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "nipy";
|
|
|
|
disabled = pythonOlder "2.6";
|
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-06-28 23:13:55 +00:00
|
|
|
sha256 = "a8a2c97ce854fece4aced5a6394b9fdca5846150ad6d2a36b86590924af3c848";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-02-16 17:41:37 +00:00
|
|
|
nativeBuildInputs = [ cython ];
|
2022-10-30 15:09:59 +00:00
|
|
|
buildInputs = lib.optionals doCheck [ nose ];
|
2020-04-24 23:36:52 +00:00
|
|
|
propagatedBuildInputs = [ matplotlib nibabel numpy scipy sympy ];
|
|
|
|
|
2023-02-16 17:41:37 +00:00
|
|
|
preBuild = ''
|
|
|
|
make recythonize
|
|
|
|
'';
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
checkPhase = '' # wants to be run in a different directory
|
|
|
|
mkdir nosetests
|
|
|
|
cd nosetests
|
|
|
|
${python.interpreter} -c "import nipy; nipy.test()"
|
|
|
|
rm -rf .
|
|
|
|
'';
|
|
|
|
|
|
|
|
# failing test:
|
|
|
|
# nipy.algorithms.statistics.models.tests.test_olsR.test_results(11.593139639404727, 11.593140144880794, 6) # disagrees by 1 at 6th decimal place
|
|
|
|
# erroring tests:
|
|
|
|
# nipy.modalities.fmri.fmristat.tests.test_FIAC.test_altprotocol
|
|
|
|
# nipy.modalities.fmri.fmristat.tests.test_FIAC.test_agreement
|
|
|
|
# nipy.tests.test_scripts.test_nipy_4d_realign # because `nipy_4d_realign` script isn't found at test time; works from nix-shell, so could be patched
|
|
|
|
# nipy.tests.test_scripts.test_nipy_3_4d # ditto re.: `nipy_3_4d` script
|
|
|
|
doCheck = false;
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://nipy.org/nipy";
|
|
|
|
description = "Software for structural and functional neuroimaging analysis";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|