1{ stdenv
2, buildPythonPackage
3, fetchPypi
4, isPy3k
5# python dependencies
6, click
7, configparser ? null
8, dateutil
9, funcsigs
10, future
11, mock
12, networkx
13, nibabel
14, numpy
15, packaging
16, prov
17, psutil
18, pydot
19, pytest
20, scipy
21, simplejson
22, traits
23, xvfbwrapper
24, pytestcov
25, codecov
26# other dependencies
27, which
28, bash
29, glibcLocales
30}:
31
32assert !isPy3k -> configparser != null;
33
34buildPythonPackage rec {
35 pname = "nipype";
36 version = "1.0.0";
37
38 src = fetchPypi {
39 inherit pname version;
40 sha256 = "4c14c6cae1f530f89d76fa8136d52488b1daf3a02179da65121b76eaf4a6f0ea";
41 };
42
43 # see https://github.com/nipy/nipype/issues/2240
44 patches = [ ./prov-version.patch ];
45
46 postPatch = ''
47 substituteInPlace nipype/interfaces/base/tests/test_core.py \
48 --replace "/usr/bin/env bash" "${bash}/bin/bash"
49 '';
50
51 propagatedBuildInputs = [
52 click
53 dateutil
54 funcsigs
55 future
56 networkx
57 nibabel
58 numpy
59 packaging
60 prov
61 psutil
62 pydot
63 scipy
64 simplejson
65 traits
66 xvfbwrapper
67 ] ++ stdenv.lib.optional (!isPy3k) [
68 configparser
69 ];
70
71 checkInputs = [ pytest mock pytestcov codecov which glibcLocales ];
72
73 checkPhase = ''
74 LC_ALL="en_US.UTF-8" py.test -v --doctest-modules nipype
75 '';
76
77 meta = with stdenv.lib; {
78 homepage = http://nipy.org/nipype/;
79 description = "Neuroimaging in Python: Pipelines and Interfaces";
80 license = licenses.bsd3;
81 maintainers = with maintainers; [ ashgillman ];
82 };
83}