diff --git a/pkgs/development/python-modules/brax/default.nix b/pkgs/development/python-modules/brax/default.nix index 849d44c7fab2..dbde33329245 100644 --- a/pkgs/development/python-modules/brax/default.nix +++ b/pkgs/development/python-modules/brax/default.nix @@ -54,13 +54,21 @@ buildPythonPackage (finalAttrs: { ./dont-use-device_put_replicated-compat.patch ]; - # TypeError: clip() got an unexpected keyword argument 'a_min' - postPatch = '' - substituteInPlace brax/fluid.py \ - --replace-fail \ - "box = 6.0 * jp.clip(jp.sum(diag_inertia_v, axis=-1), a_min=1e-12)" \ - "box = 6.0 * jp.clip(jp.sum(diag_inertia_v, axis=-1), min=1e-12)" - ''; + postPatch = + # TypeError: clip() got an unexpected keyword argument 'a_min' + '' + substituteInPlace brax/fluid.py \ + --replace-fail \ + "box = 6.0 * jp.clip(jp.sum(diag_inertia_v, axis=-1), a_min=1e-12)" \ + "box = 6.0 * jp.clip(jp.sum(diag_inertia_v, axis=-1), min=1e-12)" + '' + # mujoco >= 3.10 changed mj_fullM's signature from (m, dst, qM) to (m, d, dst). + + '' + substituteInPlace brax/generalized/mass_test.py \ + --replace-fail \ + "mujoco.mj_fullM(model, mj_mass_mx, mj_next.qM)" \ + "mujoco.mj_fullM(model, mj_next, mj_mass_mx)" + ''; build-system = [ hatchling