From a2bb835e2c9e7d05935ad5cba73fe16e826b2dbc Mon Sep 17 00:00:00 2001 From: Theodore Ni <3806110+tjni@users.noreply.github.com> Date: Tue, 22 Aug 2023 23:06:45 -0700 Subject: [PATCH] python3.pkgs.nitime: add build dependencies and relax numpy constraint --- .../python-modules/nitime/default.nix | 28 +++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/nitime/default.nix b/pkgs/development/python-modules/nitime/default.nix index 105cecd95b10..b0870c984911 100644 --- a/pkgs/development/python-modules/nitime/default.nix +++ b/pkgs/development/python-modules/nitime/default.nix @@ -5,6 +5,9 @@ , pythonOlder , pytestCheckHook , cython +, setuptools +, setuptools-scm +, wheel , numpy , scipy , matplotlib @@ -23,11 +26,32 @@ buildPythonPackage rec { hash = "sha256-NnoVrSt6MTTcNup1e+/1v5JoHCYcycuQH4rHLzXJt+Y="; }; - buildInputs = [ cython ]; - propagatedBuildInputs = [ numpy scipy matplotlib networkx nibabel ]; + # Upstream wants to build against the oldest version of numpy possible, but + # we only want to build against the most recent version. + postPatch = '' + substituteInPlace pyproject.toml \ + --replace "numpy==" "numpy>=" + ''; + + nativeBuildInputs = [ + cython + setuptools + setuptools-scm + wheel + ]; + + propagatedBuildInputs = [ + numpy + scipy + matplotlib + networkx + nibabel + ]; nativeCheckInputs = [ pytestCheckHook ]; + doCheck = !stdenv.isDarwin; # tests hang indefinitely + pythonImportsCheck = [ "nitime" ]; meta = with lib; {