1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, pythonAtLeast
5, nose
6, nibabel
7, pydicom
8}:
9
10buildPythonPackage rec {
11 pname = "dcmstack";
12 version = "0.8";
13
14 disabled = pythonAtLeast "3.8";
15 # https://github.com/moloney/dcmstack/issues/67
16
17 src = fetchFromGitHub {
18 owner = "moloney";
19 repo = pname;
20 rev = "v${version}";
21 sha256 = "1n24pp3rqz7ss1z6276fxynnppraxadbl3b9p8ijrcqnpzbzih7p";
22 };
23
24 propagatedBuildInputs = [ nibabel pydicom ];
25
26 checkInputs = [ nose ];
27 checkPhase = ''
28 runHook preCheck
29 nosetests
30 runHook postCheck
31 '';
32
33 meta = with lib; {
34 homepage = "https://github.com/moloney/dcmstack";
35 description = "DICOM to Nifti conversion preserving metadata";
36 license = licenses.mit;
37 maintainers = with maintainers; [ bcdarwin ];
38 };
39}