1{ stdenv, buildPythonPackage, fetchPypi, pytest, nose
2, nibabel, numpy, pandas, scikitlearn, scipy, matplotlib, joblib }:
3
4buildPythonPackage rec {
5 pname = "nilearn";
6 version = "0.6.2";
7
8 src = fetchPypi {
9 inherit pname version;
10 sha256 = "cfc6cfda59a6f4247189f8ccf92e364de450460a15c0ec21bdb857c420dd198c";
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 nose ];
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}