diff --git a/components/fix-lxml-libxml-2.15-build.patch b/components/fix-lxml-libxml-2.15-build.patch new file mode 100644 index 0000000..3cc369b --- /dev/null +++ b/components/fix-lxml-libxml-2.15-build.patch @@ -0,0 +1,12 @@ +diff --git a/src/lxml/etree.c b/src/lxml/etree.c +index 9fbfe5a..74c83c7 100644 +--- a/src/lxml/etree.c ++++ b/src/lxml/etree.c +@@ -35183,7 +35183,6 @@ static void __pyx_f_4lxml_5etree_fixThreadDictNamesForDtd(xmlDtd *__pyx_v_c_dtd, + * _fixThreadDictPtr(&c_attribute.name, c_src_dict, c_dict) + * _fixThreadDictPtr(&c_attribute.prefix, c_src_dict, c_dict) + */ +- __pyx_f_4lxml_5etree__fixThreadDictPtr((&__pyx_v_c_attribute->defaultValue), __pyx_v_c_src_dict, __pyx_v_c_dict); + + /* "src/lxml/proxy.pxi":578 + * while c_attribute: diff --git a/components/python-overrides.nix b/components/python-overrides.nix index 4e9d1d5..a6d665c 100644 --- a/components/python-overrides.nix +++ b/components/python-overrides.nix @@ -77,6 +77,7 @@ let lxml = prev.lxml.overrideAttrs ( { buildInputs ? [ ], + patches ? [ ], ... }: { @@ -85,6 +86,13 @@ let libxml2 zlib ]; + patches = patches ++ [ + # The upstream fix for this is + # https://github.com/lxml/lxml/commit/f7a813483c4482dd114e7ee8b42b54337e285503, + # however, this doesn't help us here because the `etree.c` file is already generated + # (we're using the wheel), so we have to patch the C file directly. + ./fix-lxml-libxml-2.15-build.patch + ]; } ); xmlsec = prev.xmlsec.overrideAttrs (