1{ lib
2, stdenv
3, buildPythonPackage
4, fetchFromGitHub
5, pydicom
6, pyfakefs
7, pytestCheckHook
8, sqlalchemy
9, pythonOlder
10}:
11
12buildPythonPackage rec {
13 pname = "pynetdicom";
14 version = "2.0.2";
15 format = "setuptools";
16
17 disabled = pythonOlder "3.7";
18
19 src = fetchFromGitHub {
20 owner = "pydicom";
21 repo = pname;
22 rev = "v${version}";
23 hash = "sha256-/JWQUtFBW4uqCbs/nUxj1pRBfTCXV4wcqTkqvzpdFrM=";
24 };
25
26 propagatedBuildInputs = [
27 pydicom
28 ];
29
30 nativeCheckInputs = [
31 pyfakefs
32 pytestCheckHook
33 sqlalchemy
34 ];
35
36 disabledTests = [
37 # Some tests needs network capabilities
38 "test_str_types_empty"
39 "test_associate_reject"
40 "TestAEGoodAssociation"
41 "TestEchoSCP"
42 "TestEchoSCPCLI"
43 "TestEventHandlingAcceptor"
44 "TestEventHandlingRequestor"
45 "TestFindSCP"
46 "TestFindSCPCLI"
47 "TestGetSCP"
48 "TestGetSCPCLI"
49 "TestMoveSCP"
50 "TestMoveSCPCLI"
51 "TestPrimitive_N_GET"
52 "TestQRGetServiceClass"
53 "TestQRMoveServiceClass"
54 "TestSearch"
55 "TestState"
56 "TestStorageServiceClass"
57 "TestStoreSCP"
58 "TestStoreSCPCLI"
59 "TestStoreSCU"
60 "TestStoreSCUCLI"
61 ];
62
63 disabledTestPaths = [
64 # Ignore apps tests
65 "pynetdicom/apps/tests/"
66 ];
67
68 pythonImportsCheck = [
69 "pynetdicom"
70 ];
71
72 meta = with lib; {
73 description = "Python implementation of the DICOM networking protocol";
74 homepage = "https://github.com/pydicom/pynetdicom";
75 license = with licenses; [ mit ];
76 maintainers = with maintainers; [ fab ];
77 # Tests are not passing on Darwin/Aarch64, thus it's assumed that it doesn't work
78 broken = stdenv.isDarwin || stdenv.isAarch64;
79 };
80}