From 98ccf946dd46c828f0641d7596174ac565947720 Mon Sep 17 00:00:00 2001 From: Kirill Radzikhovskyy Date: Tue, 30 Dec 2025 09:18:33 +1100 Subject: [PATCH] python3Packages.funsor: fix build with recent torch --- pkgs/development/python-modules/funsor/default.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pkgs/development/python-modules/funsor/default.nix b/pkgs/development/python-modules/funsor/default.nix index 5cd1266db7cd..3288521439b6 100644 --- a/pkgs/development/python-modules/funsor/default.nix +++ b/pkgs/development/python-modules/funsor/default.nix @@ -3,6 +3,7 @@ buildPythonPackage, pythonOlder, fetchFromGitHub, + fetchpatch, # build-system setuptools, @@ -43,6 +44,14 @@ buildPythonPackage rec { hash = "sha256-Prj1saT0yoPAP8rDE0ipBEpR3QMk4PS12VSJlxc22p8="; }; + patches = [ + # Compatibility with torch >= 2.5 (arg_constraints is now a property) + (fetchpatch { + url = "https://github.com/pyro-ppl/funsor/commit/c5e2a48d73cad4e98058147af4090171272a44e5.patch"; + hash = "sha256-sTR+hbJtS0Th5sIqlvB2bReEC0wnEbnB7gAiZKiqjAQ="; + }) + ]; + build-system = [ setuptools ]; dependencies = [