diff --git a/pkgs/development/python-modules/vispy/default.nix b/pkgs/development/python-modules/vispy/default.nix index eb3b16c0a3ea..dd74e0212bc5 100644 --- a/pkgs/development/python-modules/vispy/default.nix +++ b/pkgs/development/python-modules/vispy/default.nix @@ -31,6 +31,13 @@ buildPythonPackage rec { hash = "sha256-77u4R6kIuvfnFpq5vylhOKOTZPNn5ssKjsA61xaZ0x0="; }; + postPatch = '' + # https://numpy.org/devdocs/dev/depending_on_numpy.html#numpy-2-0-specific-advice + # upstream enforce builds with numpy 2+, which is backward compat with 1.xx + substituteInPlace pyproject.toml \ + --replace-fail "numpy>=2.0.0rc2" "numpy" + ''; + patches = lib.optionals (!stdenv.hostPlatform.isDarwin) [ (substituteAll { src = ./library-paths.patch;