From b41a83676e3e199f508b2eb75b6c7348cd1206e7 Mon Sep 17 00:00:00 2001 From: natsukium Date: Fri, 1 Nov 2024 02:27:48 +0900 Subject: [PATCH] python312Packages.einops: fix compatibility with numpy>=2 --- pkgs/development/python-modules/einops/default.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pkgs/development/python-modules/einops/default.nix b/pkgs/development/python-modules/einops/default.nix index 4a6dfc6ab777..0b1fd24a3ac3 100644 --- a/pkgs/development/python-modules/einops/default.nix +++ b/pkgs/development/python-modules/einops/default.nix @@ -2,6 +2,7 @@ lib, buildPythonPackage, fetchFromGitHub, + fetchpatch2, hatchling, jupyter, nbconvert, @@ -26,6 +27,15 @@ buildPythonPackage rec { hash = "sha256-6x9AttvSvgYrHaS5ESKOwyEnXxD2BitYTGtqqSKur+0="; }; + patches = [ + # https://github.com/arogozhnikov/einops/pull/325 + (fetchpatch2 { + name = "numpy_2-compatibility.patch"; + url = "https://github.com/arogozhnikov/einops/commit/11680b457ce2216d9827330d0b794565946847d7.patch"; + hash = "sha256-OKWp319ClYarNrek7TdRHt+NKTOEfBdJaV0U/6vLeMc="; + }) + ]; + nativeBuildInputs = [ hatchling ]; nativeCheckInputs = [