2020-05-15 21:57:56 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, isPy27
|
|
|
|
, gdcm
|
|
|
|
, nose
|
|
|
|
, nibabel
|
|
|
|
, numpy
|
|
|
|
, pydicom
|
|
|
|
, scipy
|
2021-02-24 18:30:23 +00:00
|
|
|
, setuptools
|
2020-05-15 21:57:56 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "dicom2nifti";
|
2021-07-04 02:40:35 +00:00
|
|
|
version = "2.3.0";
|
2020-05-15 21:57:56 +00:00
|
|
|
disabled = isPy27;
|
|
|
|
|
|
|
|
# no tests in PyPI dist
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "icometrix";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2021-07-04 02:40:35 +00:00
|
|
|
sha256 = "sha256-QSu9CGXFjDpI25Cy6QSbrwiQ2bwsVezCUxSovRLs6AI=";
|
2020-05-15 21:57:56 +00:00
|
|
|
};
|
|
|
|
|
2021-02-24 18:30:23 +00:00
|
|
|
propagatedBuildInputs = [ nibabel numpy pydicom scipy setuptools ];
|
2020-05-15 21:57:56 +00:00
|
|
|
|
|
|
|
checkInputs = [ nose gdcm ];
|
|
|
|
checkPhase = "nosetests tests";
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/icometrix/dicom2nifti";
|
|
|
|
description = "Library for converting dicom files to nifti";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ bcdarwin ];
|
|
|
|
};
|
|
|
|
}
|