Skip to content

Commit 8a11417

Browse files
committed
Use cabal install
1 parent 7aeefa7 commit 8a11417

File tree

1 file changed

+5
-33
lines changed

1 file changed

+5
-33
lines changed

3.5/bookworm/Dockerfile

+5-33
Original file line numberDiff line numberDiff line change
@@ -44,50 +44,22 @@ apt-get install --assume-yes --no-install-recommends \
4444
zlib1g-dev
4545
EOF
4646

47-
RUN <<EOF
48-
set -eux; \
49-
# Get pandoc-cli sources
50-
cabal update
51-
cabal get pandoc-cli-${PANDOC}
52-
cd pandoc-cli-${PANDOC}
53-
54-
# Setup to include pandoc-crossref
55-
printf 'packages: pandoc-cli.cabal\n' > cabal.project
56-
# Add pandoc-crossref to project
57-
printf 'extra-packages: pandoc-crossref\n' >> cabal.project
58-
cat cabal.project
59-
EOF
60-
61-
RUN <<EOF
62-
set -eux
63-
cd pandoc-cli-${PANDOC}
6447
# Build and install
65-
cabal install pandoc-cli:exes pandoc-crossref:exes \
48+
RUN cabal update
49+
RUN cabal install pandoc-cli pandoc-crossref \
6650
--jobs \
6751
--disable-tests \
6852
--disable-bench \
53+
--install-method=copy \
6954
--allow-newer='lib:pandoc' \
70-
--prefix=/usr \
71-
--docdir=/usr/share/doc/pandoc \
55+
--prefix=/usr/local \
56+
--docdir=/usr/local/share/doc/pandoc \
7257
--flags='+server +lua' \
7358
--sysconfdir=/etc \
7459
--ghc-options='-O1 -optc-Os -optl=-pthread -fPIC -j +RTS -A128m -n2m -RTS'
7560

76-
EOF
77-
78-
RUN <<EOF
79-
set -eux
80-
cd pandoc-cli-${PANDOC}
81-
cabal list-bin pandoc-cli:exes | xargs install -Dm755 -t /usr/bin
82-
#
83-
find /root/.cabal \
84-
-name 'pandoc*' -type f -perm -u+x \
85-
-exec strip '{}' ';' \
86-
-exec cp '{}' /usr/local/bin/ ';'
87-
8861
# cd /
8962
# ls -l -d /root/.*
9063
# rm -rf /root/.cabal /root/.ghc
9164
# rm -rf /tmp/*
9265
# rm -rf /var/lib/apt/lists/*
93-
EOF

0 commit comments

Comments
 (0)