From 352d653d24d9aafb2e73f07e5b1f7cb4c06c243b Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Fri, 20 Feb 2026 02:30:03 +0100 Subject: [PATCH] python3Packages.keras: fix tests with numpy 2.4 --- pkgs/development/python-modules/keras/default.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pkgs/development/python-modules/keras/default.nix b/pkgs/development/python-modules/keras/default.nix index e07e79fa3460..27095bc830bb 100644 --- a/pkgs/development/python-modules/keras/default.nix +++ b/pkgs/development/python-modules/keras/default.nix @@ -3,6 +3,7 @@ stdenv, buildPythonPackage, fetchFromGitHub, + fetchpatch, # build-system setuptools, @@ -47,6 +48,14 @@ buildPythonPackage (finalAttrs: { hash = "sha256-7s3bJdkS/G/Ydj9txbtGrqGCE3PjjS1ZiuoGOzk+UIg="; }; + patches = [ + (fetchpatch { + name = "numpy-2.4-compat.patch"; + url = "https://github.com/keras-team/keras/commit/bc3bc4fc167049eb35136deaf5680cdaacc80371.patch"; + hash = "sha256-+eN3QVBpHGIv67hbRxzVHeKjFZIz5LCdbNO0AL65OoQ="; + }) + ]; + build-system = [ setuptools ];