about summary refs log tree commit diff
path: root/pkgs/development/python-modules/xnatpy/default.nix
blob: 4738f137d427db051ed96c99247c431ad6d24f88 (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
40
41
42
43
44
45
46
47
48
49
50
{ lib
, buildPythonPackage
, fetchPypi
, pythonOlder
, setuptools
, click
, isodate
, progressbar2
, pydicom
, requests
}:

buildPythonPackage rec {
  pname = "xnatpy";
  version = "0.5.1";
  format = "pyproject";

  disabled = pythonOlder "3.7";

  src = fetchPypi {
    pname = "xnat";
    inherit version;
    hash = "sha256-iOw9cVWP5Am4S9JQ0NTmtew38KZiKmau+19K2KG2aKQ=";
  };

  nativeBuildInputs = [ setuptools ];

  propagatedBuildInputs = [
    click
    isodate
    progressbar2
    pydicom
    requests
  ];

  # tests missing in PyPI dist and require network access and Docker container
  doCheck = false;

  pythonImportsCheck = [ "xnat" ];

  meta = with lib; {
    homepage = "https://xnat.readthedocs.io";
    description =
      "A new XNAT client (distinct from pyxnat) that exposes XNAT objects/functions as Python objects/functions";
    changelog = "https://gitlab.com/radiology/infrastructure/xnatpy/-/blob/${version}/CHANGELOG?ref_type=tags";
    license = licenses.asl20;
    maintainers = with maintainers; [ bcdarwin ];
    mainProgram = "xnat";
  };
}