1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 hatch-vcs, 6 hatchling, 7 pytestCheckHook, 8 attrs, 9 importlib-resources, 10 jinja2, 11 looseversion, 12 matplotlib, 13 nibabel, 14 nilearn, 15 nipype, 16 nitransforms, 17 numpy, 18 packaging, 19 pandas, 20 pybids, 21 pyyaml, 22 scikit-image, 23 scipy, 24 seaborn, 25 svgutils, 26 templateflow, 27 traits, 28 transforms3d, 29}: 30 31buildPythonPackage rec { 32 pname = "niworkflows"; 33 version = "1.10.1"; 34 pyproject = true; 35 36 src = fetchFromGitHub { 37 owner = "nipreps"; 38 repo = "niworkflows"; 39 rev = "refs/tags/${version}"; 40 hash = "sha256-ZOn3KSaPAA8zTdyexrjF9Wkb5C5qA/5eSJahg2DcX20="; 41 }; 42 43 postPatch = '' 44 substituteInPlace pyproject.toml --replace '"traits < 6.4"' '"traits"' 45 ''; 46 47 nativeBuildInputs = [ 48 hatch-vcs 49 hatchling 50 ]; 51 52 propagatedBuildInputs = [ 53 attrs 54 importlib-resources 55 jinja2 56 looseversion 57 matplotlib 58 nibabel 59 nilearn 60 nipype 61 nitransforms 62 numpy 63 packaging 64 pandas 65 pybids 66 pyyaml 67 scikit-image 68 scipy 69 seaborn 70 svgutils 71 templateflow 72 traits 73 transforms3d 74 ]; 75 76 env.SETUPTOOLS_SCM_PRETEND_VERSION = version; 77 78 nativeCheckInputs = [ pytestCheckHook ]; 79 preCheck = ''export HOME=$(mktemp -d)''; 80 pytestFlagsArray = [ "niworkflows" ]; 81 # try to download data: 82 disabledTests = [ 83 "test_GenerateCifti" 84 "ROIsPlot" 85 "ROIsPlot2" 86 "test_SimpleShowMaskRPT" 87 "test_cifti_surfaces_plot" 88 "niworkflows.utils.misc.get_template_specs" 89 "niworkflows.interfaces.cifti._prepare_cifti" 90 ]; 91 disabledTestPaths = [ "niworkflows/tests/test_registration.py" ]; 92 93 pythonImportsCheck = [ "niworkflows" ]; 94 95 meta = with lib; { 96 description = "Common workflows for MRI (anatomical, functional, diffusion, etc.)"; 97 mainProgram = "niworkflows-boldref"; 98 homepage = "https://github.com/nipreps/niworkflows"; 99 changelog = "https://github.com/nipreps/niworkflows/blob/${src.rev}/CHANGES.rst"; 100 license = licenses.asl20; 101 maintainers = with maintainers; [ bcdarwin ]; 102 }; 103}