diff --git a/pkgs/development/python-modules/msprime/default.nix b/pkgs/development/python-modules/msprime/default.nix index 83e1314a5501..c0cd877ccaaa 100644 --- a/pkgs/development/python-modules/msprime/default.nix +++ b/pkgs/development/python-modules/msprime/default.nix @@ -28,6 +28,12 @@ buildPythonPackage rec { hash = "sha256-2K55gHYWf2Mrj9fszVCJ+qqEyQNMppQi+IZCX5SlsBs="; }; + postPatch = '' + # build-time constriant, used to ensure forward and backward compat + substituteInPlace pyproject.toml \ + --replace-fail "numpy>=2" "numpy" + ''; + nativeBuildInputs = [ gsl oldest-supported-numpy diff --git a/pkgs/development/python-modules/tskit/default.nix b/pkgs/development/python-modules/tskit/default.nix index 775284b8990b..e91fba90dc77 100644 --- a/pkgs/development/python-modules/tskit/default.nix +++ b/pkgs/development/python-modules/tskit/default.nix @@ -21,6 +21,12 @@ buildPythonPackage rec { hash = "sha256-Wq7ar96w5hdAyKMMvK4zjYln74RmX1l/VhvS++CN+Xk="; }; + postPatch = '' + # build-time constriant, used to ensure forward and backward compat + substituteInPlace pyproject.toml \ + --replace-fail "numpy>=2.0" "numpy" + ''; + build-system = [ setuptools ]; dependencies = [