File tree Expand file tree Collapse file tree 4 files changed +59
-3
lines changed Expand file tree Collapse file tree 4 files changed +59
-3
lines changed Original file line number Diff line number Diff line change @@ -120,6 +120,10 @@ jobs:
120
120
if : ${{ matrix.stack != 'static' }}
121
121
run : make latex
122
122
123
+ - name : Build Typst image
124
+ if : ${{ matrix.stack != 'static' }}
125
+ run : make typst
126
+
123
127
- name : Build extra image
124
128
if : ${{ matrix.stack != 'static' }}
125
129
run : make extra
@@ -147,6 +151,7 @@ jobs:
147
151
make push-minimal
148
152
if [ "$STACK" != 'static' ]; then
149
153
make push-core
154
+ make push-typst
150
155
make push-latex
151
156
make push-extra
152
157
fi
Original file line number Diff line number Diff line change @@ -69,15 +69,17 @@ $(1) $(1)-minimal $(1)-freeze-file: STACK = $(1)
69
69
$(1 ) : $(1 ) -minimal
70
70
$(1 ) -minimal: minimal
71
71
$(1 ) -freeze-file: $(1 ) /$(stack_freeze_file )
72
- # Only alpine and ubuntu support core, latex, and extra images
72
+ # Only alpine and ubuntu support core, latex, typst, and extra images
73
73
ifeq ($(1 ) ,$(filter $(1 ) ,alpine ubuntu) )
74
74
.PHONY : \
75
75
$(1 ) -core \
76
76
$(1 ) -latex \
77
+ $(1 ) -typst \
77
78
$(1 ) -extra
78
- $(1 ) $(1 ) -core $(1 ) -latex $(1 ) -extra : STACK = $(1 )
79
+ $(1 ) $(1 ) -core $(1 ) -latex $(1 ) -typst $( 1 ) - extra : STACK = $(1 )
79
80
$(1 ) -core : core
80
81
$(1 ) -latex : latex
82
+ $(1 ) -typst : typst
81
83
$(1 ) -extra : extra
82
84
endif
83
85
@@ -168,6 +170,16 @@ latex: $(STACK)/$(stack_freeze_file)
168
170
-d " $( makefile_dir) " \
169
171
-t " $( STACK) -latex" \
170
172
$(docker_cpu_options )
173
+ # Typst #################################################################
174
+ .PHONY : typst
175
+ typst : $(STACK ) /$(stack_freeze_file )
176
+ ./build.sh build -v \
177
+ -r typst \
178
+ -s " $( STACK) " \
179
+ -c " $( PANDOC_COMMIT) " \
180
+ -d " $( makefile_dir) " \
181
+ -t " $( STACK) -typst" \
182
+ $(docker_cpu_options )
171
183
# Extra #################################################################
172
184
.PHONY : extra
173
185
extra : $(STACK ) /$(stack_freeze_file )
Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ ARG extra_packages="pandoc-cli pandoc-crossref"
50
50
# Build pandoc and pandoc-crossref. The `allow-newer` is required for
51
51
# when pandoc-crossref has not been updated yet, but we want to build
52
52
# anyway.
53
- RUN cabal build \
53
+ RUN cabal update && cabal build \
54
54
--allow-newer 'lib:pandoc' \
55
55
--disable-tests \
56
56
--disable-bench \
@@ -161,6 +161,11 @@ RUN echo "binary_x86_64-linuxmusl 1" >> /root/texlive.profile \
161
161
162
162
WORKDIR /data
163
163
164
+ # Typst #################################################################
165
+ FROM alpine-core AS alpine-typst
166
+
167
+ RUN apk --no-cache add typst
168
+
164
169
# extra ##############################################################
165
170
FROM alpine-latex AS alpine-extra
166
171
Original file line number Diff line number Diff line change @@ -161,6 +161,40 @@ RUN ( [ -z "$texlive_version" ] || printf '-t\n%s\n"' "$texlive_version" \
161
161
162
162
WORKDIR /data
163
163
164
+ # typst ##############################################################
165
+ FROM ubuntu-core as ubuntu-typst
166
+
167
+ RUN set -eux; \
168
+ apt-get -q --no-allow-insecure-repositories update; \
169
+ apt-get install --assume-yes --no-install-recommends --mark-auto \
170
+ curl dpkg-dev tar; \
171
+ cd /tmp; \
172
+ ARCH="$(dpkg-architecture --query DEB_BUILD_GNU_CPU)" ; \
173
+ TYPST_GITHUB="https://github.com/typst/typst/releases/download/" ; \
174
+ TYPST_VERSION="v0.11.1" ; \
175
+ TYPST_BUILD="typst-${ARCH}-unknown-linux-musl" ; \
176
+ TYPST_URL="$TYPST_GITHUB/$TYPST_VERSION/$TYPST_BUILD.tar.xz" ; \
177
+ case "$ARCH" in \
178
+ ('aarch64' ) \
179
+ TYPST_SHA256='7f14f7fb37b26febffd13e683f90cdacddfde420d5fdc7f809228a78545c4b26' ; \
180
+ ;; \
181
+ ('x86_64' ) \
182
+ TYPST_SHA256='bb637d1d65634b2ee4b4e101d0b2d541bf3f1e03ac5f51f9619941e48dd28bd0' ; \
183
+ ;; \
184
+ (*) echo >&2 "error: unsupported architecture '$ARCH'" ; \
185
+ exit 1 \
186
+ ;; \
187
+ esac; \
188
+ curl -sSL "$TYPST_URL" -o typst.tar.xz; \
189
+ echo "$TYPST_SHA256 typst.tar.xz" | sha256sum --strict --check; \
190
+ tar -xf typst.tar.xz \
191
+ -C /usr/local/bin \
192
+ --strip-components=1 \
193
+ "$TYPST_BUILD/typst" ; \
194
+ apt-get autoremove --purge --assume-yes; \
195
+ rm typst.tar.xz; \
196
+ rm -rf /var/lib/apt/lists/*;
197
+
164
198
# extra ##############################################################
165
199
FROM ubuntu-latex AS ubuntu-extra
166
200
You can’t perform that action at this time.
0 commit comments