at 23.05-pre 1.4 kB view raw
1{ lib 2, buildPythonPackage 3, fetchPypi 4, pythonOlder 5, nose 6, matplotlib 7, nibabel 8, numpy 9, scipy 10, sympy 11, python 12}: 13 14buildPythonPackage rec { 15 version = "0.5.0"; 16 pname = "nipy"; 17 disabled = pythonOlder "2.6"; 18 19 src = fetchPypi { 20 inherit pname version; 21 sha256 = "a8a2c97ce854fece4aced5a6394b9fdca5846150ad6d2a36b86590924af3c848"; 22 }; 23 24 buildInputs = lib.optionals doCheck [ nose ]; 25 propagatedBuildInputs = [ matplotlib nibabel numpy scipy sympy ]; 26 27 checkPhase = '' # wants to be run in a different directory 28 mkdir nosetests 29 cd nosetests 30 ${python.interpreter} -c "import nipy; nipy.test()" 31 rm -rf . 32 ''; 33 34 # failing test: 35 # nipy.algorithms.statistics.models.tests.test_olsR.test_results(11.593139639404727, 11.593140144880794, 6) # disagrees by 1 at 6th decimal place 36 # erroring tests: 37 # nipy.modalities.fmri.fmristat.tests.test_FIAC.test_altprotocol 38 # nipy.modalities.fmri.fmristat.tests.test_FIAC.test_agreement 39 # 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 40 # nipy.tests.test_scripts.test_nipy_3_4d # ditto re.: `nipy_3_4d` script 41 doCheck = false; 42 43 meta = with lib; { 44 homepage = "https://nipy.org/nipy"; 45 description = "Software for structural and functional neuroimaging analysis"; 46 license = licenses.bsd3; 47 }; 48 49}