2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
2020-05-15 21:57:56 +00:00
|
|
|
, buildPythonPackage
|
2023-07-15 17:15:38 +00:00
|
|
|
, datalad
|
2020-05-15 21:57:56 +00:00
|
|
|
, dcm2niix
|
|
|
|
, dcmstack
|
|
|
|
, etelemetry
|
2023-10-09 19:29:22 +00:00
|
|
|
, fetchPypi
|
2020-05-15 21:57:56 +00:00
|
|
|
, filelock
|
2023-10-09 19:29:22 +00:00
|
|
|
, git
|
|
|
|
, nibabel
|
|
|
|
, nipype
|
|
|
|
, pydicom
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
|
|
|
, setuptools
|
|
|
|
, versioningit
|
|
|
|
, wheel
|
2020-05-15 21:57:56 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "heudiconv";
|
2023-10-09 19:29:22 +00:00
|
|
|
version = "1.0.0";
|
2023-07-15 17:15:38 +00:00
|
|
|
format = "pyproject";
|
2020-05-15 21:57:56 +00:00
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
2020-05-15 21:57:56 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2023-10-09 19:29:22 +00:00
|
|
|
hash = "sha256-cW6G2NtPZiyqqJ3w9a3Y/6blEaXtR9eGG5epPknimsw=";
|
2020-05-15 21:57:56 +00:00
|
|
|
};
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
|
|
|
--replace "versioningit ~=" "versioningit >="
|
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools
|
|
|
|
versioningit
|
|
|
|
wheel
|
|
|
|
];
|
|
|
|
|
2020-05-15 21:57:56 +00:00
|
|
|
propagatedBuildInputs = [
|
2023-07-15 17:15:38 +00:00
|
|
|
nibabel
|
|
|
|
pydicom
|
|
|
|
nipype
|
|
|
|
dcmstack
|
|
|
|
etelemetry
|
|
|
|
filelock
|
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)
|
|
|
|
'';
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"heudiconv"
|
|
|
|
];
|
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
|
|
|
homepage = "https://heudiconv.readthedocs.io";
|
|
|
|
description = "Flexible DICOM converter for organizing imaging data";
|
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 ];
|
|
|
|
};
|
|
|
|
}
|