14 buildPythonPackage rec {
15 pname = "dicom2nifti";
17 disabled = pythonOlder "3.6";
19 # no tests in PyPI dist
20 src = fetchFromGitHub {
24 hash = "sha256-2Pspxdeu3pHwXpbjS6bQQnvdeMuITRwYarPuLlmNcv8";
27 propagatedBuildInputs = [ gdcm nibabel numpy pydicom scipy setuptools ];
29 # python-gdcm just builds the python interface provided by the "gdcm" package, so
30 # we should be able to replace "python-gdcm" with "gdcm" but this doesn't work
31 # (similar to https://github.com/NixOS/nixpkgs/issues/84774)
33 substituteInPlace setup.py --replace "python-gdcm" ""
34 substituteInPlace tests/test_generic.py --replace "from common" "from dicom2nifti.common"
37 nativeCheckInputs = [ pytestCheckHook ];
39 pythonImportsCheck = [ "dicom2nifti" ];
42 homepage = "https://github.com/icometrix/dicom2nifti";
43 description = "Library for converting dicom files to nifti";
44 license = licenses.mit;
45 maintainers = with maintainers; [ bcdarwin ];