at master 1.6 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 fetchpatch2, 6 7 # build-system 8 cython, 9 meson-python, 10 ninja, 11 setuptools, 12 13 # dependencies 14 numpy, 15 scipy, 16 nibabel, 17 sympy, 18 transforms3d, 19 20 # optional-dependencies 21 matplotlib, 22 23 # tests 24 pytestCheckHook, 25}: 26 27buildPythonPackage rec { 28 version = "0.6.1"; 29 pname = "nipy"; 30 pyproject = true; 31 32 src = fetchFromGitHub { 33 owner = "nipy"; 34 repo = "nipy"; 35 tag = version; 36 hash = "sha256-KGMGu0/0n1CzN++ri3Ig1AJjeZfkl4KzNgm6jdwXB7o="; 37 }; 38 39 patches = [ 40 # https://github.com/nipy/nipy/pull/589 41 (fetchpatch2 { 42 url = "https://github.com/nipy/nipy/pull/589/commits/76f2aae95dede9b8ac025dc32ce94791904f25e4.patch?full_index=1"; 43 hash = "sha256-Rnwfx6JKl+nE9wvBGKXFtizjuB4Bl1QDF88CvSZU/RQ="; 44 }) 45 ]; 46 47 postPatch = '' 48 patchShebangs nipy/_build_utils/cythoner.py 49 ''; 50 51 build-system = [ 52 cython 53 meson-python 54 setuptools 55 ninja 56 numpy 57 ]; 58 59 dependencies = [ 60 nibabel 61 numpy 62 scipy 63 sympy 64 transforms3d 65 ]; 66 67 optional-dependencies.optional = [ matplotlib ]; 68 69 nativeCheckInputs = [ pytestCheckHook ] ++ optional-dependencies.optional; 70 71 doCheck = false; # partial imports … circular dependencies. needs more time to figure out. 72 73 pythonImportsCheck = [ 74 "nipy" 75 "nipy.testing" 76 "nipy.algorithms" 77 ]; 78 79 meta = with lib; { 80 homepage = "https://nipy.org/nipy"; 81 description = "Software for structural and functional neuroimaging analysis"; 82 downloadPage = "https://github.com/nipy/nipy"; 83 license = licenses.bsd3; 84 }; 85}