From 87256fe0bfdc6aa0a538f16eb8e97e2ed9645084 Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Fri, 20 Mar 2026 09:29:29 +0000 Subject: [PATCH] python3Packages.jaxopt: fix build --- .../python-modules/jaxopt/default.nix | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/pkgs/development/python-modules/jaxopt/default.nix b/pkgs/development/python-modules/jaxopt/default.nix index e1b8c30520b4..9729adbe7a45 100644 --- a/pkgs/development/python-modules/jaxopt/default.nix +++ b/pkgs/development/python-modules/jaxopt/default.nix @@ -33,6 +33,23 @@ buildPythonPackage (finalAttrs: { hash = "sha256-vPXrs8J81O+27w9P/fEFr7w4xClKb8T0IASD+iNhztQ="; }; + postPatch = + # TypeError: LogisticRegression.__init__() got an unexpected keyword argument 'multi_class' + '' + substituteInPlace jaxopt/_src/test_util.py \ + --replace-fail "multi_class=multiclass," "" + '' + # AttributeError: jax.experimental.enable_x64 was removed in JAX v0.9.0; use jax.enable_x64(True) instead. + + '' + substituteInPlace \ + tests/zoom_linesearch_test.py \ + tests/lbfgsb_test.py \ + tests/lbfgs_test.py \ + --replace-fail \ + "jax.experimental.enable_x64()" \ + "jax.enable_x64(True)" + ''; + build-system = [ setuptools ]; dependencies = [