diff --git a/pkgs/development/python-modules/nibabel/default.nix b/pkgs/development/python-modules/nibabel/default.nix index dc6b2e0668d5..9c80301ce931 100644 --- a/pkgs/development/python-modules/nibabel/default.nix +++ b/pkgs/development/python-modules/nibabel/default.nix @@ -1,9 +1,12 @@ -{ stdenv +{ lib , buildPythonPackage , fetchPypi +, isPy3k , numpy -, nose , six +, bz2file +, nose +, mock }: buildPythonPackage rec { @@ -17,17 +20,24 @@ buildPythonPackage rec { propagatedBuildInputs = [ numpy - nose six - ]; + ] ++ lib.optional (!isPy3k) bz2file; - # Failing tests - # nibabel.tests.test_minc1.test_old_namespace - # nibabel.gifti.tests.test_parse_gifti_fast.test_parse_dataarrays - # nibabel.gifti.tests.test_giftiio.test_read_deprecated - doCheck = false; + checkInputs = [ nose mock ]; - meta = with stdenv.lib; { + checkPhase = let + excludeTests = lib.optionals isPy3k [ + # https://github.com/nipy/nibabel/issues/691 + "nibabel.gifti.tests.test_giftiio.test_read_deprecated" + "nibabel.gifti.tests.test_parse_gifti_fast.test_parse_dataarrays" + "nibabel.tests.test_minc1.test_old_namespace" + ]; + # TODO: Add --with-doctest once all doctests pass + in '' + nosetests ${lib.concatMapStrings (test: "-e '${test}' ") excludeTests} + ''; + + meta = with lib; { homepage = http://nipy.org/nibabel/; description = "Access a multitude of neuroimaging data formats"; license = licenses.mit;