1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 pythonOlder,
6 setuptools,
7 click,
8 isodate,
9 progressbar2,
10 pydicom,
11 requests,
12}:
13
14buildPythonPackage rec {
15 pname = "xnatpy";
16 version = "0.5.1";
17 format = "pyproject";
18
19 disabled = pythonOlder "3.7";
20
21 src = fetchPypi {
22 pname = "xnat";
23 inherit version;
24 hash = "sha256-iOw9cVWP5Am4S9JQ0NTmtew38KZiKmau+19K2KG2aKQ=";
25 };
26
27 nativeBuildInputs = [ setuptools ];
28
29 propagatedBuildInputs = [
30 click
31 isodate
32 progressbar2
33 pydicom
34 requests
35 ];
36
37 # tests missing in PyPI dist and require network access and Docker container
38 doCheck = false;
39
40 pythonImportsCheck = [ "xnat" ];
41
42 meta = with lib; {
43 homepage = "https://xnat.readthedocs.io";
44 description = "New XNAT client (distinct from pyxnat) that exposes XNAT objects/functions as Python objects/functions";
45 changelog = "https://gitlab.com/radiology/infrastructure/xnatpy/-/blob/${version}/CHANGELOG?ref_type=tags";
46 license = licenses.asl20;
47 maintainers = with maintainers; [ bcdarwin ];
48 mainProgram = "xnat";
49 };
50}