@@ -23,30 +23,24 @@ RUN git clone --branch=${pandoc_commit} --depth=1 --quiet \
2323 https://github.com/jgm/pandoc /app
2424
2525# Install Haskell dependencies
26- # Add pandoc-crossref to project
27- RUN printf "extra-packages: pandoc-crossref\n" > cabal.project.local;
28-
29- # Build pandoc and pandoc-crossref. The `allow-newer` is required for
30- # when pandoc-crossref has not been updated yet, but we want to build
31- # anyway.
26+ # Build pandoc CLI binary.
3227RUN cabal build \
3328 --jobs \
3429 --disable-tests \
3530 --disable-bench \
3631 --enable-split-sections \
3732 --enable-executable-stripping \
3833 --upgrade-dependencies \
39- --allow-newer='pandoc-crossref:pandoc' \
4034 --ghc-options='-O1 -optc-Os -optl=-pthread -fPIC -j' \
4135 --ghc-options='+RTS -M4G -A128m -n2m -RTS' \
4236$for(cabal.constraints)$
4337 --constraint='${it}' \
4438$endfor$
45- . pandoc-cli pandoc-crossref
39+ . pandoc-cli
4640
4741# Cabal's exec stripping doesn't seem to work reliably, let's do it here.
4842RUN find dist-newstyle \
49- -name 'pandoc* ' -type f -perm -u+x \
43+ -name 'pandoc' -type f -perm -u+x \
5044 -exec strip '{}' ';' \
5145 -exec cp '{}' /usr/local/bin/ ';'
5246
@@ -85,17 +79,3 @@ RUN ln -s /usr/local/bin/pandoc /usr/local/bin/pandoc-lua \
8579 && rm -rf /var/lib/apt/lists/* \
8680# Create user data directory
8781 && mkdir -p "$$XDG_DATA_HOME"/pandoc
88-
89- # Core ##################################################################
90- FROM minimal AS core
91- COPY --from=builder \
92- /usr/local/bin/pandoc-crossref \
93- /usr/local/bin/
94-
95- # Additional packages frequently used during conversions
96- # NOTE: `libsrvg`, pandoc uses `rsvg-convert` for working with svg images.
97- RUN apt-get -q --no-allow-insecure-repositories update \
98- && DEBIAN_FRONTEND=noninteractive \
99- apt-get install --assume-yes --no-install-recommends \
100- librsvg2-bin=2.* \
101- && rm -rf /var/lib/apt/lists/*
0 commit comments