1{ lib
2, buildPythonPackage
3, datalad
4, dcm2niix
5, dcmstack
6, etelemetry
7, fetchPypi
8, filelock
9, git
10, nibabel
11, nipype
12, pydicom
13, pytestCheckHook
14, pythonOlder
15, setuptools
16, versioningit
17, wheel
18}:
19
20buildPythonPackage rec {
21 pname = "heudiconv";
22 version = "1.0.0";
23 format = "pyproject";
24
25 disabled = pythonOlder "3.7";
26
27 src = fetchPypi {
28 inherit pname version;
29 hash = "sha256-cW6G2NtPZiyqqJ3w9a3Y/6blEaXtR9eGG5epPknimsw=";
30 };
31
32 postPatch = ''
33 substituteInPlace pyproject.toml \
34 --replace "versioningit ~=" "versioningit >="
35 '';
36
37 nativeBuildInputs = [
38 setuptools
39 versioningit
40 wheel
41 ];
42
43 propagatedBuildInputs = [
44 nibabel
45 pydicom
46 nipype
47 dcmstack
48 etelemetry
49 filelock
50 ];
51
52 nativeCheckInputs = [
53 datalad
54 dcm2niix
55 pytestCheckHook
56 git
57 ];
58
59 preCheck = ''
60 export HOME=$(mktemp -d)
61 '';
62
63 pythonImportsCheck = [
64 "heudiconv"
65 ];
66
67 meta = with lib; {
68 homepage = "https://heudiconv.readthedocs.io";
69 description = "Flexible DICOM converter for organizing imaging data";
70 changelog = "https://github.com/nipy/heudiconv/releases/tag/v${version}";
71 license = licenses.asl20;
72 maintainers = with maintainers; [ bcdarwin ];
73 };
74}