1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 fetchpatch, 6 7 # build-system 8 poetry-core, 9 10 # dependencies 11 jsonschema, 12 numpy, 13 pydicom, 14 simpleitk, 15 16 # tests 17 pytestCheckHook, 18}: 19 20buildPythonPackage rec { 21 pname = "pydicom-seg"; 22 version = "0.4.1"; 23 pyproject = true; 24 25 src = fetchFromGitHub { 26 owner = "razorx89"; 27 repo = "pydicom-seg"; 28 tag = "v${version}"; 29 fetchSubmodules = true; 30 hash = "sha256-2Y3fZHKfZqdp5EU8HfVsmJ5JFfVGZuAR7+Kj7qaTiPM="; 31 }; 32 33 patches = [ 34 # https://github.com/razorx89/pydicom-seg/pull/54 35 (fetchpatch { 36 name = "replace-poetry-with-poetry-core.patch"; 37 url = "https://github.com/razorx89/pydicom-seg/commit/ac91eaefe3b0aecfe745869972c08de5350d2b61.patch"; 38 hash = "sha256-xBOVjWZPjyQ8gSj6JLe9B531e11TI3FUFFtL+IelZOM="; 39 }) 40 ]; 41 42 pythonRelaxDeps = [ 43 "jsonschema" 44 "numpy" 45 ]; 46 47 build-system = [ poetry-core ]; 48 49 dependencies = [ 50 jsonschema 51 numpy 52 pydicom 53 simpleitk 54 ]; 55 56 nativeCheckInputs = [ pytestCheckHook ]; 57 58 pythonImportsCheck = [ "pydicom_seg" ]; 59 60 meta = { 61 description = "Medical segmentation file reading and writing"; 62 homepage = "https://github.com/razorx89/pydicom-seg"; 63 changelog = "https://github.com/razorx89/pydicom-seg/releases/tag/v${version}"; 64 license = lib.licenses.mit; 65 maintainers = with lib.maintainers; [ bcdarwin ]; 66 # ModuleNotFoundError: No module named 'pydicom._storage_sopclass_uids' 67 broken = true; 68 }; 69}