at 23.05-pre 2.2 kB view raw
1{ lib, stdenv 2, buildPythonPackage 3, fetchPypi 4, isPy27 5# python dependencies 6, click 7, python-dateutil 8, etelemetry 9, filelock 10, funcsigs 11, future 12, mock 13, networkx 14, nibabel 15, numpy 16, packaging 17, prov 18, psutil 19, pybids 20, pydot 21, pytest 22, pytest-xdist 23, pytest-forked 24, rdflib 25, scipy 26, simplejson 27, traits 28, xvfbwrapper 29, pytest-cov 30, codecov 31, sphinx 32# other dependencies 33, which 34, bash 35, glibcLocales 36, callPackage 37# causes Python packaging conflict with any package requiring rdflib, 38# so use the unpatched rdflib by default (disables Nipype provenance tracking); 39# see https://github.com/nipy/nipype/issues/2888: 40, useNeurdflib ? false 41}: 42 43let 44 45 # This is a temporary convenience package for changes waiting to be merged into the primary rdflib repo. 46 neurdflib = callPackage ./neurdflib.nix { }; 47 48in 49 50buildPythonPackage rec { 51 pname = "nipype"; 52 version = "1.8.4"; 53 disabled = isPy27; 54 55 src = fetchPypi { 56 inherit pname version; 57 sha256 = "sha256-yoG6iLfF7ugBL4eNC9OLINIzBj1YgF4TVngFKb77qak="; 58 }; 59 60 postPatch = '' 61 substituteInPlace nipype/interfaces/base/tests/test_core.py \ 62 --replace "/usr/bin/env bash" "${bash}/bin/bash" 63 ''; 64 65 nativeBuildInputs = [ 66 sphinx 67 ]; 68 69 propagatedBuildInputs = [ 70 click 71 python-dateutil 72 etelemetry 73 filelock 74 funcsigs 75 future 76 networkx 77 nibabel 78 numpy 79 packaging 80 prov 81 psutil 82 pydot 83 scipy 84 simplejson 85 traits 86 xvfbwrapper 87 ] ++ [ (if useNeurdflib then neurdflib else rdflib) ]; 88 89 checkInputs = [ 90 pybids 91 codecov 92 glibcLocales 93 mock 94 pytest 95 pytest-forked 96 pytest-xdist 97 pytest-cov 98 which 99 ]; 100 101 # checks on darwin inspect memory which doesn't work in build environment 102 doCheck = !stdenv.isDarwin; 103 # ignore tests which incorrect fail to detect xvfb 104 checkPhase = '' 105 LC_ALL="en_US.UTF-8" pytest nipype/tests -k 'not display' 106 ''; 107 pythonImportsCheck = [ "nipype" ]; 108 109 meta = with lib; { 110 homepage = "https://nipy.org/nipype/"; 111 description = "Neuroimaging in Python: Pipelines and Interfaces"; 112 license = licenses.bsd3; 113 maintainers = with maintainers; [ ashgillman ]; 114 }; 115}