From c1eeedaf4a52288f65c002966b2a1a6e002a9ee5 Mon Sep 17 00:00:00 2001 From: Ashley Gillman Date: Tue, 16 Jan 2018 23:29:42 +1000 Subject: [PATCH] pythonPackages.nipype: To separate file. --- .../python-modules/nipype/default.nix | 69 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 40 +---------- 2 files changed, 71 insertions(+), 38 deletions(-) create mode 100644 pkgs/development/python-modules/nipype/default.nix diff --git a/pkgs/development/python-modules/nipype/default.nix b/pkgs/development/python-modules/nipype/default.nix new file mode 100644 index 000000000000..c5174d7f94dd --- /dev/null +++ b/pkgs/development/python-modules/nipype/default.nix @@ -0,0 +1,69 @@ +{ stdenv +, buildPythonPackage +, fetchPypi +, isPy3k +# python dependencies +, click +, configparser ? null +, dateutil +, funcsigs +, future +, mock +, networkx +, nibabel +, numpy +, packaging +, prov +, psutil +, pydot +, pytest +, scipy +, simplejson +, traits +, xvfbwrapper +# other dependencies +, which +}: + +assert !isPy3k -> configparser != null; + +buildPythonPackage rec { + name = "${pname}-${version}"; + pname = "nipype"; + version = "0.14.0"; + + src = fetchPypi { + inherit pname version; + sha256 = "0airdrh93vwmbfkqxp5cqfzm0zzqcvjnvphv3zhg197y39xxpl1k"; + }; + + doCheck = false; # fails with TypeError: None is not callable + checkInputs = [ which ]; + buildInputs = [ pytest mock ]; # required in installPhase + propagatedBuildInputs = [ + click + dateutil + funcsigs + future + networkx + nibabel + numpy + packaging + prov + psutil + pydot + scipy + simplejson + traits + xvfbwrapper + ] ++ stdenv.lib.optional (!isPy3k) [ + configparser + ]; + + meta = with stdenv.lib; { + homepage = http://nipy.org/nipype/; + description = "Neuroimaging in Python: Pipelines and Interfaces"; + license = licenses.bsd3; + maintainers = with maintainers; [ ashgillman ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index bf0665a8e339..7687f735bee4 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -11408,44 +11408,8 @@ in { }; }; - nipype = buildPythonPackage rec { - version = "0.14.0"; - name = "nipype-${version}"; - - src = pkgs.fetchurl { - url = "mirror://pypi/n/nipype/${name}.tar.gz"; - sha256 = "0airdrh93vwmbfkqxp5cqfzm0zzqcvjnvphv3zhg197y39xxpl1k"; - }; - - doCheck = false; # fails with TypeError: None is not callable - checkInputs = [ pkgs.which ]; - buildInputs = with self; [ pytest mock ]; - propagatedBuildInputs = with self; [ - click - dateutil - funcsigs - future - networkx - nibabel - numpy - packaging - prov - psutil - pydot - scipy - simplejson - traits - xvfbwrapper - ] ++ stdenv.lib.optional (!isPy3k) [ - configparser - ]; - - meta = { - homepage = http://nipy.org/nipype/; - description = "Neuroimaging in Python: Pipelines and Interfaces"; - license = licenses.bsd3; - maintainers = with maintainers; [ ashgillman ]; - }; + nipype = callPackage ../development/python-modules/nipype { + inherit (pkgs) which; }; nose = buildPythonPackage rec {