2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv
|
2020-04-24 23:36:52 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
2023-04-29 16:46:19 +00:00
|
|
|
, pythonOlder
|
|
|
|
, pythonRelaxDepsHook
|
2020-04-24 23:36:52 +00:00
|
|
|
# python dependencies
|
|
|
|
, click
|
2021-07-04 02:40:35 +00:00
|
|
|
, python-dateutil
|
2020-04-24 23:36:52 +00:00
|
|
|
, etelemetry
|
|
|
|
, filelock
|
|
|
|
, funcsigs
|
|
|
|
, future
|
2023-04-29 16:46:19 +00:00
|
|
|
, looseversion
|
2020-04-24 23:36:52 +00:00
|
|
|
, mock
|
|
|
|
, networkx
|
|
|
|
, nibabel
|
|
|
|
, numpy
|
|
|
|
, packaging
|
|
|
|
, prov
|
|
|
|
, psutil
|
|
|
|
, pybids
|
|
|
|
, pydot
|
|
|
|
, pytest
|
2021-07-24 12:14:16 +00:00
|
|
|
, pytest-xdist
|
2020-04-24 23:36:52 +00:00
|
|
|
, pytest-forked
|
2020-11-30 08:33:03 +00:00
|
|
|
, rdflib
|
2020-04-24 23:36:52 +00:00
|
|
|
, scipy
|
|
|
|
, simplejson
|
|
|
|
, traits
|
|
|
|
, xvfbwrapper
|
|
|
|
, codecov
|
|
|
|
# other dependencies
|
|
|
|
, which
|
|
|
|
, bash
|
|
|
|
, glibcLocales
|
|
|
|
, callPackage
|
2020-11-30 08:33:03 +00:00
|
|
|
# causes Python packaging conflict with any package requiring rdflib,
|
|
|
|
# so use the unpatched rdflib by default (disables Nipype provenance tracking);
|
|
|
|
# see https://github.com/nipy/nipype/issues/2888:
|
|
|
|
, useNeurdflib ? false
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "nipype";
|
2023-05-24 13:37:59 +00:00
|
|
|
version = "1.8.6";
|
2023-04-29 16:46:19 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
format = "setuptools";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2023-05-24 13:37:59 +00:00
|
|
|
hash = "sha256-l3sTFej3D5QWPsB+MeVXG+g/Kt1gIxQcWgascAEm+NE=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace nipype/interfaces/base/tests/test_core.py \
|
|
|
|
--replace "/usr/bin/env bash" "${bash}/bin/bash"
|
|
|
|
'';
|
|
|
|
|
2020-05-15 21:57:56 +00:00
|
|
|
nativeBuildInputs = [
|
2023-04-29 16:46:19 +00:00
|
|
|
pythonRelaxDepsHook
|
2020-05-15 21:57:56 +00:00
|
|
|
];
|
|
|
|
|
2023-04-29 16:46:19 +00:00
|
|
|
pythonRelaxDeps = [ "traits" ];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
click
|
2021-07-04 02:40:35 +00:00
|
|
|
python-dateutil
|
2020-04-24 23:36:52 +00:00
|
|
|
etelemetry
|
|
|
|
filelock
|
|
|
|
funcsigs
|
|
|
|
future
|
2023-04-29 16:46:19 +00:00
|
|
|
looseversion
|
2020-04-24 23:36:52 +00:00
|
|
|
networkx
|
|
|
|
nibabel
|
|
|
|
numpy
|
|
|
|
packaging
|
|
|
|
prov
|
|
|
|
psutil
|
|
|
|
pydot
|
2023-04-29 16:46:19 +00:00
|
|
|
rdflib
|
2020-04-24 23:36:52 +00:00
|
|
|
scipy
|
|
|
|
simplejson
|
|
|
|
traits
|
|
|
|
xvfbwrapper
|
2023-04-29 16:46:19 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2020-04-24 23:36:52 +00:00
|
|
|
pybids
|
|
|
|
codecov
|
|
|
|
glibcLocales
|
|
|
|
mock
|
|
|
|
pytest
|
|
|
|
pytest-forked
|
2021-07-24 12:14:16 +00:00
|
|
|
pytest-xdist
|
2020-04-24 23:36:52 +00:00
|
|
|
which
|
|
|
|
];
|
|
|
|
|
|
|
|
# checks on darwin inspect memory which doesn't work in build environment
|
|
|
|
doCheck = !stdenv.isDarwin;
|
|
|
|
# ignore tests which incorrect fail to detect xvfb
|
|
|
|
checkPhase = ''
|
2023-04-29 16:46:19 +00:00
|
|
|
LC_ALL="en_US.UTF-8" pytest nipype/tests -k 'not display and not test_no_et_multiproc'
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
2020-05-15 21:57:56 +00:00
|
|
|
pythonImportsCheck = [ "nipype" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://nipy.org/nipype/";
|
|
|
|
description = "Neuroimaging in Python: Pipelines and Interfaces";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "nipypecli";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ ashgillman ];
|
|
|
|
};
|
|
|
|
}
|