diff --git a/pkgs/development/python-modules/clu/default.nix b/pkgs/development/python-modules/clu/default.nix index 9f6f4f966517..5818e92219e3 100644 --- a/pkgs/development/python-modules/clu/default.nix +++ b/pkgs/development/python-modules/clu/default.nix @@ -31,6 +31,7 @@ buildPythonPackage (finalAttrs: { pname = "clu"; version = "0.0.12"; pyproject = true; + __structuredAttrs = true; src = fetchFromGitHub { owner = "google"; @@ -39,6 +40,15 @@ buildPythonPackage (finalAttrs: { hash = "sha256-ntqRz3fCXMf0EDQsddT68Mdi105ECBVQpVsStzk2kvQ="; }; + # Fix Jax 0.10.0 compatibility + # TypeError: clip() got an unexpected keyword argument 'a_min' + postPatch = '' + substituteInPlace clu/metrics.py \ + --replace-fail \ + "variance = jnp.clip(variance, a_min=0.0)" \ + "variance = jnp.clip(variance, min=0.0)" + ''; + build-system = [ setuptools ];