summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/dcmstack/default.nix
blob: 393b4d872849d8f345a35caec3da3bd3e9579184 (plain)
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
40
41
42
43
44
45
46
47
48
49
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  nibabel,
  pydicom,
  pylibjpeg,
  pint,
  pytestCheckHook,
  setuptools,
}:

buildPythonPackage {
  pname = "dcmstack";
  version = "0.9-unstable-2024-12-05";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "moloney";
    repo = "dcmstack";
    rev = "68575996c8956152865e3598b15f621d7c803a96";
    hash = "sha256-QXnBtlXkxYDJFdjiqCoEuBMcHnq+87YmHX8j5EPW7HU=";
  };

  build-system = [ setuptools ];

  dependencies = [
    nibabel
    pydicom
    pylibjpeg
    pint
  ];

  nativeCheckInputs = [ pytestCheckHook ];

  pythonImportsCheck = [ "dcmstack" ];

  disabledTestPaths = [
    # AttributeError: 'TestNitoolCli' object has no attribute 'out_dir'
    "test/test_cli.py"
  ];

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