Skip to content

Fix MkDocs Material CairoSVG crash by adding Cairo runtime deps in devenv

This MR fixes the CI failure in the pages job where MkDocs Material's social card generation (CairoSVG) crashed due to missing libcairo.

Changes:

  • Add native libraries to devenv packages: cairo, pango, gdk-pixbuf, librsvg, fontconfig, freetype, zlib (kept existing libffi, libjpeg, pngquant)
  • Export LD_LIBRARY_PATH via lib.makeLibraryPath so Python's ctypes loaders can resolve shared libs
  • Set LANG to en_US.UTF-8 to silence locale warning

Pipeline context:

  • Wrangler custom build runs pipenv run build, which uses CairoSVG via mkdocs-material. CairoSVG needs libcairo and friends available at runtime.

After merge:

  • Re-run pipeline; the social card build should no longer error on libcairo.

If we later move to Nix Python packages, we can drop LD_LIBRARY_PATH and rely on Nix's wrapped Python instead, but this is the minimal change to fix current setup.

Merge request reports

Loading