fa5436e0a7
GitOrigin-RevId: e8057b67ebf307f01bdcc8fba94d94f75039d1f6
76 lines
1.3 KiB
Nix
76 lines
1.3 KiB
Nix
{
|
|
lib,
|
|
buildPythonPackage,
|
|
datalad,
|
|
dcm2niix,
|
|
dcmstack,
|
|
etelemetry,
|
|
fetchPypi,
|
|
filelock,
|
|
git,
|
|
nibabel,
|
|
nipype,
|
|
pydicom,
|
|
pytestCheckHook,
|
|
pythonOlder,
|
|
setuptools,
|
|
versioningit,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "heudiconv";
|
|
version = "1.1.3";
|
|
pyproject = true;
|
|
|
|
disabled = pythonOlder "3.8";
|
|
|
|
src = fetchPypi {
|
|
inherit pname version;
|
|
hash = "sha256-ktw/XrvA5G+DunjEB8LeQuQnjs6zQOKsZ+RGpzDZ5DQ=";
|
|
};
|
|
|
|
postPatch = ''
|
|
substituteInPlace pyproject.toml \
|
|
--replace-fail "versioningit ~=" "versioningit >="
|
|
'';
|
|
|
|
build-system = [
|
|
setuptools
|
|
versioningit
|
|
];
|
|
|
|
dependencies = [
|
|
dcmstack
|
|
etelemetry
|
|
filelock
|
|
nibabel
|
|
nipype
|
|
pydicom
|
|
];
|
|
|
|
nativeCheckInputs = [
|
|
datalad
|
|
dcm2niix
|
|
pytestCheckHook
|
|
git
|
|
];
|
|
|
|
preCheck = ''
|
|
export HOME=$(mktemp -d)
|
|
'';
|
|
|
|
pythonImportsCheck = [ "heudiconv" ];
|
|
|
|
disabledTests = [
|
|
# No such file or directory
|
|
"test_bvals_are_zero"
|
|
];
|
|
|
|
meta = with lib; {
|
|
description = "Flexible DICOM converter for organizing imaging data";
|
|
homepage = "https://heudiconv.readthedocs.io";
|
|
changelog = "https://github.com/nipy/heudiconv/releases/tag/v${version}";
|
|
license = licenses.asl20;
|
|
maintainers = with maintainers; [ bcdarwin ];
|
|
};
|
|
}
|