Skip to content

Commit d727d7e

Browse files
committed
fix: Also pin {coq-core, coq-stdlib, coqide-server} for coq >= 8.17
This patch happens to be necessary for coq/opam projects that depend on coq-core (for example), and not on coq directly. See-also: rocq-community/gaia#27 (comment)
1 parent 35e285a commit d727d7e

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

coq/stable/Dockerfile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
ARG BASE_TAG="latest"
22
FROM rocq/base:${BASE_TAG}
33

4+
# The following variable should be nonempty for coq >= 8.17
5+
ARG COQ_CORE_PINNED
6+
47
ARG COQ_EXTRA_OPAM="coq-bignums"
58
ENV COQ_EXTRA_OPAM="${COQ_EXTRA_OPAM}"
69

@@ -18,6 +21,10 @@ RUN set -x \
1821
&& eval $(opam env "--switch=${COMPILER}" --set-switch) \
1922
&& opam update -y -u \
2023
&& opam pin add -n -k version coq ${COQ_VERSION} \
24+
&& if [ -n "${COQ_CORE_PINNED}" ]; then \
25+
opam pin add -n -k version coq-core ${COQ_VERSION};
26+
opam pin add -n -k version coq-stdlib ${COQ_VERSION};
27+
opam pin add -n -k version coqide-server ${COQ_VERSION}; fi \
2128
&& opam install -y -v -j "${NJOBS}" coq ${COQ_EXTRA_OPAM} ${COQ_INSTALL_SERAPI:+coq-serapi} \
2229
&& opam clean -a -c -s --logs \
2330
&& chmod -R g=u /home/coq/.opam \

images.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ images:
5656
BASE_TAG: 'coq_{matrix[base]}'
5757
COQ_VERSION: '{matrix[coq]}'
5858
VCS_REF: 'V{matrix[coq]}'
59+
COQ_CORE_PINNED: 'true'
5960
COQ_EXTRA_OPAM: 'coq-bignums'
6061
# +- coq-native
6162
COQ_INSTALL_SERAPI: '{matrix[base][//4.09.1-flambda/]}'
@@ -93,6 +94,7 @@ images:
9394
BASE_TAG: 'coq_{matrix[base]}'
9495
COQ_VERSION: '{matrix[coq]}'
9596
VCS_REF: 'V{matrix[coq]}'
97+
COQ_CORE_PINNED: 'true'
9698
COQ_EXTRA_OPAM: 'coq-native coq-bignums'
9799
COQ_INSTALL_SERAPI: 'true'
98100
# (or any nonempty string) as coq-serapi 8.20.0+_ supports ocaml 4.12.0+
@@ -147,6 +149,7 @@ images:
147149
BASE_TAG: 'coq_{matrix[base]}'
148150
COQ_VERSION: '{matrix[coq]}'
149151
VCS_REF: 'V{matrix[coq]}'
152+
COQ_CORE_PINNED: 'true'
150153
COQ_EXTRA_OPAM: 'coq-bignums'
151154
# +- coq-native
152155
COQ_INSTALL_SERAPI: 'true'
@@ -169,6 +172,7 @@ images:
169172
COQ_VERSION: '{matrix[coq]}'
170173
VCS_REF: 'V{matrix[coq]}'
171174
COQ_EXTRA_OPAM: 'coq-bignums'
175+
COQ_CORE_PINNED: 'true'
172176
# +- coq-native
173177
COQ_INSTALL_SERAPI: 'true'
174178
## coqorg/coq:8.18-native
@@ -189,6 +193,7 @@ images:
189193
BASE_TAG: 'coq_{matrix[base]}'
190194
COQ_VERSION: '{matrix[coq]}'
191195
VCS_REF: 'V{matrix[coq]}'
196+
COQ_CORE_PINNED: 'true'
192197
COQ_EXTRA_OPAM: 'coq-bignums'
193198
# +- coq-native
194199
COQ_INSTALL_SERAPI: 'true'
@@ -210,6 +215,7 @@ images:
210215
BASE_TAG: 'coq_{matrix[base]}'
211216
COQ_VERSION: '{matrix[coq]}'
212217
VCS_REF: 'V{matrix[coq]}'
218+
COQ_CORE_PINNED: ''
213219
COQ_EXTRA_OPAM: 'coq-bignums'
214220
# +- coq-native
215221
COQ_INSTALL_SERAPI: 'true'
@@ -220,6 +226,14 @@ images:
220226
coq: ['8.16.1']
221227
build:
222228
<<: *build_coq_stable_native
229+
args:
230+
BASE_TAG: 'coq_{matrix[base]}'
231+
COQ_VERSION: '{matrix[coq]}'
232+
VCS_REF: 'V{matrix[coq]}'
233+
COQ_CORE_PINNED: ''
234+
COQ_EXTRA_OPAM: 'coq-native coq-bignums'
235+
COQ_INSTALL_SERAPI: 'true'
236+
# (or any nonempty string) as coq-serapi 8.20.0+_ supports ocaml 4.12.0+
223237
## coqorg/coq:8.15
224238
- matrix:
225239
default: ['4.07.1-flambda']
@@ -234,6 +248,7 @@ images:
234248
BASE_TAG: 'coq_{matrix[base]}'
235249
COQ_VERSION: '{matrix[coq]}'
236250
VCS_REF: 'V{matrix[coq]}'
251+
COQ_CORE_PINNED: ''
237252
COQ_EXTRA_OPAM: 'coq-bignums'
238253
COQ_INSTALL_SERAPI: '{matrix[base][//4.05.0/]}'
239254
# as coq-serapi does not support ocaml 4.05.0
@@ -264,6 +279,7 @@ images:
264279
BASE_TAG: 'coq_{matrix[base]}'
265280
COQ_VERSION: '{matrix[coq]}'
266281
VCS_REF: 'V{matrix[coq]}'
282+
COQ_CORE_PINNED: ''
267283
COQ_EXTRA_OPAM: 'coq-native coq-bignums'
268284
COQ_INSTALL_SERAPI: 'true'
269285
# (or any nonempty string) as coq-serapi supports ocaml 4.07.1
@@ -330,6 +346,7 @@ images:
330346
BASE_TAG: 'coq_{matrix[base]}'
331347
COQ_VERSION: '{matrix[coq]}'
332348
VCS_REF: 'V{matrix[coq]}'
349+
COQ_CORE_PINNED: ''
333350
COQ_EXTRA_OPAM: 'coq-native coq-bignums'
334351
COQ_INSTALL_SERAPI: '{matrix[base][//4.05.0/]}'
335352
# as coq-serapi does not support ocaml 4.05.0
@@ -359,6 +376,7 @@ images:
359376
BASE_TAG: 'coq_{matrix[base]}'
360377
COQ_VERSION: '{matrix[coq]}'
361378
VCS_REF: 'V{matrix[coq]}'
379+
COQ_CORE_PINNED: ''
362380
COQ_EXTRA_OPAM: 'coq-native coq-bignums'
363381
COQ_INSTALL_SERAPI: '{matrix[base][//4.05.0/]}'
364382
# as coq-serapi does not support ocaml 4.05.0
@@ -373,6 +391,7 @@ images:
373391
BASE_TAG: 'coq_{matrix[base]}'
374392
COQ_VERSION: '{matrix[coq]}'
375393
VCS_REF: 'V{matrix[coq]}'
394+
COQ_CORE_PINNED: ''
376395
COQ_EXTRA_OPAM: 'coq-native coq-bignums'
377396
COQ_INSTALL_SERAPI: ''
378397
# as coq-serapi is not compatible with coq 8.7

0 commit comments

Comments
 (0)