anchor.diff:    # see https://github.com/nipy/nipype/issues/2240
     patches = [ ./prov-version.patch ];
   
  -  doCheck = false;  # fails with TypeError: None is not callable
  -  checkInputs = [ which ];
  -  buildInputs = [ pytest mock ];  # required in installPhase
  +  postPatch = ''
  +    substituteInPlace nipype/interfaces/base/tests/test_core.py \
  +      --replace "/usr/bin/env bash" "${bash}/bin/bash"
  +  '';
  +
     propagatedBuildInputs = [
       click
       dateutil
  
positive.code: , simplejson
  , traits
  , xvfbwrapper
  # other dependencies
  , which
  }:
  
  assert !isPy3k -> configparser != null;
  
negative.code:     configparser
    ];
  
    checkInputs = [ pytest mock pytestcov codecov which glibcLocales ];
  
    checkPhase = ''
      LC_ALL="en_US.UTF-8" py.test -v --doctest-modules nipype
    '';
  
    meta = with stdenv.lib; {
      homepage = http://nipy.org/nipype/;
      description = "Neuroimaging in Python: Pipelines and Interfaces";
  