2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
datalad,
|
|
|
|
dcm2niix,
|
|
|
|
dcmstack,
|
|
|
|
etelemetry,
|
|
|
|
fetchPypi,
|
|
|
|
filelock,
|
|
|
|
git,
|
|
|
|
nibabel,
|
|
|
|
nipype,
|
|
|
|
pydicom,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
|
|
|
setuptools,
|
|
|
|
versioningit,
|
2020-05-15 21:57:56 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "heudiconv";
|
2024-06-05 15:53:02 +00:00
|
|
|
version = "1.1.3";
|
|
|
|
pyproject = true;
|
2020-05-15 21:57:56 +00:00
|
|
|
|
2024-01-25 14:12:00 +00:00
|
|
|
disabled = pythonOlder "3.8";
|
2020-05-15 21:57:56 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2024-06-05 15:53:02 +00:00
|
|
|
hash = "sha256-ktw/XrvA5G+DunjEB8LeQuQnjs6zQOKsZ+RGpzDZ5DQ=";
|
2020-05-15 21:57:56 +00:00
|
|
|
};
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
2024-06-05 15:53:02 +00:00
|
|
|
--replace-fail "versioningit ~=" "versioningit >="
|
2023-10-09 19:29:22 +00:00
|
|
|
'';
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
build-system = [
|
2023-10-09 19:29:22 +00:00
|
|
|
setuptools
|
|
|
|
versioningit
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
dependencies = [
|
2023-07-15 17:15:38 +00:00
|
|
|
dcmstack
|
|
|
|
etelemetry
|
|
|
|
filelock
|
2024-06-05 15:53:02 +00:00
|
|
|
nibabel
|
|
|
|
nipype
|
|
|
|
pydicom
|
2020-05-15 21:57:56 +00:00
|
|
|
];
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
nativeCheckInputs = [
|
|
|
|
datalad
|
|
|
|
dcm2niix
|
|
|
|
pytestCheckHook
|
|
|
|
git
|
|
|
|
];
|
2020-05-15 21:57:56 +00:00
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
preCheck = ''
|
|
|
|
export HOME=$(mktemp -d)
|
|
|
|
'';
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "heudiconv" ];
|
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
# No such file or directory
|
|
|
|
"test_bvals_are_zero"
|
2023-10-09 19:29:22 +00:00
|
|
|
];
|
2020-05-15 21:57:56 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-05-15 21:57:56 +00:00
|
|
|
description = "Flexible DICOM converter for organizing imaging data";
|
2024-06-05 15:53:02 +00:00
|
|
|
homepage = "https://heudiconv.readthedocs.io";
|
2023-07-15 17:15:38 +00:00
|
|
|
changelog = "https://github.com/nipy/heudiconv/releases/tag/v${version}";
|
2020-05-15 21:57:56 +00:00
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ bcdarwin ];
|
|
|
|
};
|
|
|
|
}
|