2021-01-25 08:26:54 +00:00
|
|
|
{ lib
|
2020-03-29 22:28:31 +01:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pythonAtLeast
|
|
|
|
, nose
|
|
|
|
, nibabel
|
|
|
|
, pydicom
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "dcmstack";
|
|
|
|
version = "0.8";
|
|
|
|
|
|
|
|
disabled = pythonAtLeast "3.8";
|
|
|
|
# https://github.com/moloney/dcmstack/issues/67
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "moloney";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "1n24pp3rqz7ss1z6276fxynnppraxadbl3b9p8ijrcqnpzbzih7p";
|
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [ nibabel pydicom ];
|
|
|
|
|
|
|
|
checkInputs = [ nose ];
|
|
|
|
checkPhase = ''
|
|
|
|
runHook preCheck
|
|
|
|
nosetests
|
|
|
|
runHook postCheck
|
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-03-29 22:28:31 +01:00
|
|
|
homepage = "https://github.com/moloney/dcmstack";
|
|
|
|
description = "DICOM to Nifti conversion preserving metadata";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ bcdarwin ];
|
|
|
|
};
|
|
|
|
}
|