nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildPythonPackage,
4 datalad,
5 dcm2niix,
6 dcmstack,
7 etelemetry,
8 fetchPypi,
9 filelock,
10 git,
11 git-annex,
12 nibabel,
13 nipype,
14 pydicom,
15 pytestCheckHook,
16 setuptools,
17 versioningit,
18}:
19
20buildPythonPackage rec {
21 pname = "heudiconv";
22 version = "1.3.4";
23 pyproject = true;
24
25 src = fetchPypi {
26 inherit pname version;
27 hash = "sha256-zT/xy9f0GBmhGJm4Gd0ZEKNSifBBjx0RmTOqq6qN4ao=";
28 };
29
30 postPatch = ''
31 substituteInPlace pyproject.toml \
32 --replace-fail "versioningit ~=" "versioningit >="
33 '';
34
35 build-system = [
36 setuptools
37 versioningit
38 ];
39
40 dependencies = [
41 dcmstack
42 etelemetry
43 filelock
44 nibabel
45 nipype
46 pydicom
47 ];
48
49 nativeCheckInputs = [
50 datalad
51 dcm2niix
52 pytestCheckHook
53 git
54 git-annex
55 ];
56
57 preCheck = ''
58 export HOME=$(mktemp -d)
59 '';
60
61 pythonImportsCheck = [ "heudiconv" ];
62
63 disabledTests = [
64 # No such file or directory
65 "test_bvals_are_zero"
66
67 # tries to access internet
68 "test_partial_xa_conversion"
69 ];
70
71 meta = {
72 description = "Flexible DICOM converter for organizing imaging data";
73 homepage = "https://heudiconv.readthedocs.io";
74 changelog = "https://github.com/nipy/heudiconv/releases/tag/v${version}";
75 license = lib.licenses.asl20;
76 maintainers = with lib.maintainers; [ bcdarwin ];
77 };
78}