diff --git a/pkgs/development/python-modules/nilearn/default.nix b/pkgs/development/python-modules/nilearn/default.nix index 9158ee77e50..a379f236f3f 100644 --- a/pkgs/development/python-modules/nilearn/default.nix +++ b/pkgs/development/python-modules/nilearn/default.nix @@ -1,5 +1,5 @@ -{ stdenv, buildPythonPackage, fetchPypi, nose, nibabel, numpy, scikitlearn -, scipy, matplotlib }: +{ stdenv, buildPythonPackage, fetchPypi, pytest +, nibabel, numpy, pandas, scikitlearn, scipy, matplotlib, joblib }: buildPythonPackage rec { pname = "nilearn"; @@ -10,19 +10,24 @@ buildPythonPackage rec { sha256 = "07eb764f2b7b39b487f806a067e394d8ebffff21f57cd1ecdb5c4030b7210210"; }; + postPatch = '' + substituteInPlace setup.py --replace "required_packages.append('sklearn')" "" + ''; + # https://github.com/nilearn/nilearn/issues/2288 + # disable some failing tests checkPhase = '' - nosetests nilearn/tests \ - -e test_cache_mixin_with_expand_user -e test_clean_confounds -e test_detrend \ - -e test_clean_detrending -e test_high_variance_confounds + pytest nilearn/tests -k 'not test_cache_mixin_with_expand_user' # accesses ~/ ''; - checkInputs = [ nose ]; + checkInputs = [ pytest ]; propagatedBuildInputs = [ + joblib matplotlib nibabel numpy + pandas scikitlearn scipy ];