2019-01-17 20:25:35 +01:00
|
|
|
{ lib
|
2018-01-16 14:28:55 +01:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
2019-01-17 20:25:35 +01:00
|
|
|
, isPy3k
|
2018-01-16 14:28:55 +01:00
|
|
|
, numpy
|
|
|
|
, six
|
2019-01-17 20:25:35 +01:00
|
|
|
, bz2file
|
|
|
|
, nose
|
|
|
|
, mock
|
2018-01-16 14:28:55 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "nibabel";
|
2019-06-02 21:36:02 +02:00
|
|
|
version = "2.4.1";
|
2018-01-16 14:28:55 +01:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2019-06-02 21:36:02 +02:00
|
|
|
sha256 = "f165ff1cb4464902d6594eb2694e2cfb6f8b9fe233b856c976c3cff623ee0e17";
|
2018-01-16 14:28:55 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
numpy
|
|
|
|
six
|
2019-01-17 20:25:35 +01:00
|
|
|
] ++ lib.optional (!isPy3k) bz2file;
|
|
|
|
|
|
|
|
checkInputs = [ nose mock ];
|
2018-01-16 14:28:55 +01:00
|
|
|
|
2019-01-17 20:25:35 +01:00
|
|
|
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}
|
|
|
|
'';
|
2018-01-16 14:28:55 +01:00
|
|
|
|
2019-01-17 20:25:35 +01:00
|
|
|
meta = with lib; {
|
2019-04-22 10:14:28 +02:00
|
|
|
homepage = https://nipy.org/nibabel/;
|
2018-01-16 14:28:55 +01:00
|
|
|
description = "Access a multitude of neuroimaging data formats";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ ashgillman ];
|
|
|
|
};
|
|
|
|
}
|