diff --git a/pkgs/development/python-modules/mmengine/default.nix b/pkgs/development/python-modules/mmengine/default.nix index 8a247f5979c66..ecedb608e8782 100644 --- a/pkgs/development/python-modules/mmengine/default.nix +++ b/pkgs/development/python-modules/mmengine/default.nix @@ -2,6 +2,7 @@ lib, buildPythonPackage, fetchFromGitHub, + fetchpatch, # build-system setuptools, @@ -41,6 +42,16 @@ buildPythonPackage rec { hash = "sha256-hQnwenuxHQwl+DwQXbIfsKlJkmcRvcHV1roK7q2X1KA="; }; + patches = [ + # Explicitly disable weights_only in torch.load calls + # https://github.com/open-mmlab/mmengine/pull/1650 + (fetchpatch { + name = "torch-2.6.0-compat.patch"; + url = "https://github.com/open-mmlab/mmengine/pull/1650/commits/c21b8431b2c625560a3866c65328cff0380ba1f8.patch"; + hash = "sha256-SLr030IdYD9wM/jPJuZd+Dr1jjFx/5/YkJj/IwhnNQg="; + }) + ]; + build-system = [ setuptools ]; dependencies = [