summary refs log tree commit diff
path: root/pkgs/development/python-modules/dcmstack/default.nix
blob: f06e361dc7169142b4fd82d364db3041a260b8fa (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
{ stdenv
, buildPythonPackage
, fetchFromGitHub
, pythonAtLeast
, nose
, nibabel
, pydicom
}:

buildPythonPackage rec {
  pname = "dcmstack";
  version = "0.8";

  disabled = pythonAtLeast "3.8";
  # https://github.com/moloney/dcmstack/issues/67

  src = fetchFromGitHub {
    owner = "moloney";
    repo = pname;
    rev = "v${version}";
    sha256 = "1n24pp3rqz7ss1z6276fxynnppraxadbl3b9p8ijrcqnpzbzih7p";
  };

  propagatedBuildInputs = [ nibabel pydicom ];

  checkInputs = [ nose ];
  checkPhase = ''
    runHook preCheck
    nosetests
    runHook postCheck
  '';

  meta = with stdenv.lib; {
    homepage = "https://github.com/moloney/dcmstack";
    description = "DICOM to Nifti conversion preserving metadata";
    license = licenses.mit;
    maintainers = with maintainers; [ bcdarwin ];
  };
}