1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 pythonOlder, 6 pytestCheckHook, 7 setuptools, 8 numpy, 9 pydicom, 10}: 11 12buildPythonPackage rec { 13 pname = "dicom-numpy"; 14 version = "0.6.5"; 15 format = "pyproject"; 16 17 disabled = pythonOlder "3.6"; 18 19 src = fetchFromGitHub { 20 owner = "innolitics"; 21 repo = "dicom-numpy"; 22 tag = "v${version}"; 23 hash = "sha256-pgmREQlstr0GY2ThIWt4hbcSWmaNWgkr2gO4PSgGHqE="; 24 }; 25 26 postPatch = '' 27 substituteInPlace dicom_numpy/zip_archive.py \ 28 --replace-fail "pydicom.read_file" "pydicom.dcmread" 29 ''; 30 31 build-system = [ 32 setuptools 33 ]; 34 35 propagatedBuildInputs = [ 36 numpy 37 pydicom 38 ]; 39 40 nativeCheckInputs = [ pytestCheckHook ]; 41 42 pythonImportsCheck = [ "dicom_numpy" ]; 43 44 meta = with lib; { 45 description = "Read DICOM files into Numpy arrays"; 46 homepage = "https://github.com/innolitics/dicom-numpy"; 47 license = licenses.mit; 48 maintainers = with maintainers; [ bcdarwin ]; 49 }; 50}