Build: Fix WeasyPrint dependencies in Dockerfile and Nixpacks

This commit is contained in:
Flatlogic Bot 2026-01-31 03:53:48 +00:00
parent 92f18ce7f0
commit 72aff798e2
2 changed files with 6 additions and 3 deletions

View File

@ -11,6 +11,7 @@ WORKDIR /app
# WeasyPrint needs: libpango-1.0-0 libpangoft2-1.0-0 libharfbuzz-subset0 libjpeg-dev libopenjp2-7-dev libxcb1 # WeasyPrint needs: libpango-1.0-0 libpangoft2-1.0-0 libharfbuzz-subset0 libjpeg-dev libopenjp2-7-dev libxcb1
# PyMySQL does not need libmysqlclient-dev, but we keep basic build tools # PyMySQL does not need libmysqlclient-dev, but we keep basic build tools
# Added libgobject-2.0-0, libcairo2, libgdk-pixbuf2.0-0, shared-mime-info for full WeasyPrint support # Added libgobject-2.0-0, libcairo2, libgdk-pixbuf2.0-0, shared-mime-info for full WeasyPrint support
# Added libffi-dev, libssl-dev for general python compatibility
RUN apt-get update && apt-get install -y \ RUN apt-get update && apt-get install -y \
gcc \ gcc \
pkg-config \ pkg-config \
@ -24,6 +25,8 @@ RUN apt-get update && apt-get install -y \
libxcb1 \ libxcb1 \
libgdk-pixbuf2.0-0 \ libgdk-pixbuf2.0-0 \
shared-mime-info \ shared-mime-info \
libffi-dev \
libssl-dev \
curl \ curl \
&& rm -rf /var/lib/apt/lists/* && rm -rf /var/lib/apt/lists/*

View File

@ -1,5 +1,5 @@
[phases.setup] [phases.setup]
nixPkgs = ["python311", "cairo", "pango", "gdk-pixbuf", "glib", "shared-mime-info"] nixPkgs = ["python311", "cairo", "pango", "gdk-pixbuf", "glib", "shared-mime-info", "harfbuzz", "gobject-introspection", "libffi", "openssl"]
[phases.install] [phases.install]
cmds = ["python -m venv .venv", ". .venv/bin/activate", "pip install -r requirements.txt"] cmds = ["python -m venv .venv", ". .venv/bin/activate", "pip install -r requirements.txt"]