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