1{ stdenv, buildPythonPackage, fetchPypi, pytest
2, nibabel, numpy, pandas, scikitlearn, scipy, matplotlib, joblib }:
3
4buildPythonPackage rec {
5 pname = "nilearn";
6 version = "0.6.0";
7
8 src = fetchPypi {
9 inherit pname version;
10 sha256 = "07eb764f2b7b39b487f806a067e394d8ebffff21f57cd1ecdb5c4030b7210210";
11 };
12
13 postPatch = ''
14 substituteInPlace setup.py --replace "required_packages.append('sklearn')" ""
15 '';
16 # https://github.com/nilearn/nilearn/issues/2288
17
18 # disable some failing tests
19 checkPhase = ''
20 pytest nilearn/tests -k 'not test_cache_mixin_with_expand_user' # accesses ~/
21 '';
22
23 checkInputs = [ pytest ];
24
25 propagatedBuildInputs = [
26 joblib
27 matplotlib
28 nibabel
29 numpy
30 pandas
31 scikitlearn
32 scipy
33 ];
34
35 meta = with stdenv.lib; {
36 homepage = http://nilearn.github.io;
37 description = "A module for statistical learning on neuroimaging data";
38 license = licenses.bsd3;
39 };
40}