1{ lib 2, buildPythonPackage 3, fetchPypi 4, isPy27 5, pytest 6, mock 7, dcm2niix 8, nibabel 9, pydicom 10, nipype 11, dcmstack 12, etelemetry 13, filelock 14}: 15 16buildPythonPackage rec { 17 version = "0.8.0"; 18 pname = "heudiconv"; 19 20 disabled = isPy27; 21 22 src = fetchPypi { 23 inherit pname version; 24 #sha256 = "0gzqqa4pzhywdbvks2qjniwhr89sgipl5k7h9hcjs7cagmy9gb05"; 25 sha256 = "1r6y93125mc84c09970ifps5xysp8ffp62rwlzili3q2k1m3fh4v"; 26 }; 27 28 postPatch = '' 29 # doesn't exist as a separate package with Python 3: 30 substituteInPlace heudiconv/info.py --replace "'pathlib'," "" 31 ''; 32 33 propagatedBuildInputs = [ 34 dcm2niix nibabel pydicom nipype dcmstack etelemetry filelock 35 ]; 36 37 checkInputs = [ dcm2niix pytest mock ]; 38 39 # test_monitor and test_dlad require 'inotify' and 'datalad' respectively, 40 # and these aren't in Nixpkgs 41 checkPhase = "pytest -k 'not test_dlad and not test_monitor' heudiconv/tests"; 42 43 meta = with lib; { 44 homepage = "https://heudiconv.readthedocs.io"; 45 description = "Flexible DICOM converter for organizing imaging data"; 46 license = licenses.asl20; 47 maintainers = with maintainers; [ bcdarwin ]; 48 }; 49}