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; {