diff --git a/pkgs/development/python-modules/fonttools/default.nix b/pkgs/development/python-modules/fonttools/default.nix index b7f7b7e1326f..7fc9a62294a4 100644 --- a/pkgs/development/python-modules/fonttools/default.nix +++ b/pkgs/development/python-modules/fonttools/default.nix @@ -39,6 +39,12 @@ buildPythonPackage rec { hash = "sha256-ZkC1+I2d9wY9J7IoCGHGWG2gOVN7wW274UpN1lQxmJY="; }; + patches = [ + # https://github.com/fonttools/fonttools/pull/3855 + # FIXME: remove when merged + ./python-3.13.4.patch + ]; + build-system = [ setuptools setuptools-scm diff --git a/pkgs/development/python-modules/fonttools/python-3.13.4.patch b/pkgs/development/python-modules/fonttools/python-3.13.4.patch new file mode 100644 index 000000000000..c05def255b17 --- /dev/null +++ b/pkgs/development/python-modules/fonttools/python-3.13.4.patch @@ -0,0 +1,25 @@ +diff --git a/Lib/fontTools/feaLib/ast.py b/Lib/fontTools/feaLib/ast.py +index efcce8c680..18e5a891d3 100644 +--- a/Lib/fontTools/feaLib/ast.py ++++ b/Lib/fontTools/feaLib/ast.py +@@ -719,7 +719,8 @@ def __init__(self, prefix, glyphs, suffix, lookups, location=None): + for i, lookup in enumerate(lookups): + if lookup: + try: +- (_ for _ in lookup) ++ for _ in lookup: ++ break + except TypeError: + self.lookups[i] = [lookup] + +@@ -777,7 +778,8 @@ def __init__(self, prefix, glyphs, suffix, lookups, location=None): + for i, lookup in enumerate(lookups): + if lookup: + try: +- (_ for _ in lookup) ++ for _ in lookup: ++ break + except TypeError: + self.lookups[i] = [lookup] + +