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