-
Notifications
You must be signed in to change notification settings - Fork 1
/
dkml-component-staging-opam64.opam.template
318 lines (304 loc) · 12.4 KB
/
dkml-component-staging-opam64.opam.template
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
build: [
# Opam source code
["install" "-d" "dl/opam"]
["tar" "xCfz" "dl/opam" "dl/opam.tar.gz" "--strip-components=1"]
# For macos, build arm64 as well using Dune+DKML cross-compilation
[
"diskuvbox"
"copy-file"
"assets/dune-workspace.darwin_x86_64" { arch = "x86_64" }
"assets/dune-workspace.darwin_arm64" { arch = "arm64" }
"dl/opam/dune-workspace"
] { os = "macos" & (arch = "x86_64" | arch = "arm64") & dkml-base-compiler:installed & conf-dkml-cross-toolchain:installed }
# Create a DKMLDIR. Its structure mimics a git submodule setup.
# <dkmldir>/vendor/drc/
["diskuvbox" "copy-dir" "%{dkml-runtime-common:lib}%/unix" "dkmldir/vendor/drc/unix"]
# <dkmldir>/.dkmlroot
["diskuvbox" "copy-file" "%{dkml-runtime-common:lib}%/template.dkmlroot" "dkmldir/.dkmlroot"]
# <dkmldir>/vendor/component-opam/src/repro/
["diskuvbox" "copy-dir" "src/repro" "dkmldir/vendor/component-opam/src/repro/"]
# <dkmldir>/vendor/dkml-compiler/
["install" "-d" "dkmldir/vendor/dkml-compiler/src"]
["tar" "xCfz" "dkmldir/vendor/dkml-compiler" "dl/dkml-compiler.tar.gz" "--strip-components=1"]
# If brew is installed, try to capture list of bundles for reproducible build auditing in drc's crossplatform-functions.sh.
["sh" "%{dkml-runtime-common:lib}%/macos/brewbundle.sh"] {os-distribution = "homebrew"}
# Run r-c-opam-1-setup
[
"env"
"DKML_REPRODUCIBLE_SYSTEM_BREWFILE=%{_:build}%/Brewfile"
# Debugging. Keep this on ... it tends to be helpful!
"bash" "-x"
"dkmldir/vendor/component-opam/src/repro/r-c-opam-1-setup.sh"
"-d" "dkmldir"
"-t" "_w"
"-v" "dl/opam"
"-p" "%{_:version}%"
# Instead of letting Opam bootstrap its own OCaml compiler, we can just
# tell it to use the OCaml home (ie. compiler in %{prefix}%/bin/ocamlc).
# We don't have a "home" if ocaml-system is installed, but we do for
# the base compilers. This will save time, reduce build errors and
# dkml-base-compiler gives access to a cross compiler.
"-c" { ocaml-base-compiler:installed | dkml-base-compiler:installed | ocaml-variants:installed }
"%{prefix}%" { ocaml-base-compiler:installed | dkml-base-compiler:installed | ocaml-variants:installed }
"-f" { ocaml-system:installed }
"%{ocaml-system:path}%" { ocaml-system:installed }
# Target ABIs
"-awindows_x86_64" { os = "win32" & (!ocaml-option-32bit:installed & arch = "x86_64") }
"-alinux_x86_64" { os = "linux" & arch = "x86_64" }
"-adarwin_arm64" { os = "macos" & arch = "arm64" }
"-adarwin_x86_64" { os = "macos" & arch = "x86_64" }
] { os = "macos" |
(os = "linux" & arch = "x86_64") |
(os = "win32" & (!ocaml-option-32bit:installed & arch = "x86_64") ) }
# Run r-c-opam-2-build-noargs.sh
[
"sh" "-eufc"
"cd _w && share/dkml/repro/110co/vendor/component-opam/src/repro/r-c-opam-2-build-noargs.sh"
] { os = "macos" |
(os = "linux" & arch = "x86_64") |
(os = "win32" & (!ocaml-option-32bit:installed & arch = "x86_64") ) }
# --------------
# Build install library
# --------------
["dune" "subst"] {dev}
[
"dune"
"build"
"-p"
name
"-j"
jobs
"--promote-install-files=false"
"@install"
"@runtest" {with-test}
"@doc" {with-doc}
]
["dune" "install" "-p" name "--create-install-files" name]
]
install: [
[
"diskuvbox"
"copy-file-into"
"_w/bin/opam"
"_w/bin/opam-installer"
"%{_:share}%/staging-files/darwin_x86_64/bin"
] { os = "macos" & arch = "x86_64" }
[
"diskuvbox"
"copy-file-into"
"_w/bin/opam"
"_w/bin/opam-installer"
"%{_:share}%/staging-files/darwin_arm64/bin"
] { os = "macos" & arch = "arm64" }
[
"diskuvbox"
"copy-file-into"
"_w/bin/opam"
"_w/bin/opam-installer"
"%{_:share}%/staging-files/linux_x86_64/bin"
] { (os = "linux" & arch = "x86_64") }
[
"diskuvbox"
"copy-file-into"
"_w/bin/opam.exe"
"_w/bin/opam-installer.exe"
"_w/bin/opam-putenv.exe"
"%{_:share}%/staging-files/windows_x86_64/bin"
] { os = "win32" & (!ocaml-option-32bit:installed & arch = "x86_64") }
[
"diskuvbox"
"copy-file-into"
"_w/src/opam/_build/install/default.darwin_arm64/bin/opam"
"_w/src/opam/_build/install/default.darwin_arm64/bin/opam-installer"
"%{_:share}%/staging-files/darwin_arm64/bin"
] { os = "macos" & arch = "x86_64" & dkml-base-compiler:installed & conf-dkml-cross-toolchain:installed }
[
"diskuvbox"
"copy-file-into"
"_w/src/opam/_build/install/default.darwin_x86_64/bin/opam"
"_w/src/opam/_build/install/default.darwin_x86_64/bin/opam-installer"
"%{_:share}%/staging-files/darwin_x86_64/bin"
] { os = "macos" & arch = "arm64" & dkml-base-compiler:installed & conf-dkml-cross-toolchain:installed }
[
"diskuvbox"
"copy-dir"
"_w/share/man"
"%{_:share}%/staging-files/generic/man"
] { os = "macos" |
(os = "linux" & arch = "x86_64") |
(os = "win32" & (!ocaml-option-32bit:installed & arch = "x86_64") ) }
]
extra-source "dl/dkml-compiler.tar.gz" {
src: "https://github.com/diskuv/dkml-compiler/releases/download/2.1.0-2/src.tar.gz"
checksum: [
"sha256=11cd6c70ff2e5aaa588bfb7658dba12e862885da2db825090aa7b3451b647c1e"
]
}
extra-source "dl/opam.tar.gz" {
# Changes:
# - Dec 28, 2022 (alpha0)
# https://github.com/jonahbeckford/opam/tree/4dbeb519dfe4abc45cbe951fc5ca958a1709bfdb
# src: "https://github.com/jonahbeckford/opam/archive/4dbeb519dfe4abc45cbe951fc5ca958a1709bfdb.tar.gz"
# checksum: ["sha256=3a0405d71f0ccbe2a7c6c1948c59acf6b3482d9c3154c1869ad2b4f3b56430d0"]
# - Sep 18, 2023 (alpha3)
# https://github.com/jonahbeckford/opam/tree/b0cb137edebc5e7d7ac1e650086e3be5800ae743
# src: "https://github.com/jonahbeckford/opam/archive/b0cb137edebc5e7d7ac1e650086e3be5800ae743.tar.gz"
# checksum: ["sha256=64810fd83fb8bdb1e18782d708c47bf878faa200fa7791d7d7c8bba1341a45af"]
# - Nov 22, 2023 (back to alpha0 since alpha3 does not support MSYS2)
# https://github.com/jonahbeckford/opam/tree/4dbeb519dfe4abc45cbe951fc5ca958a1709bfdb
# src: "https://github.com/jonahbeckford/opam/archive/4dbeb519dfe4abc45cbe951fc5ca958a1709bfdb.tar.gz"
# checksum: ["sha256=3a0405d71f0ccbe2a7c6c1948c59acf6b3482d9c3154c1869ad2b4f3b56430d0"]
# - Apr 11, 2024 (beta2)
# src: "https://github.com/ocaml/opam/archive/refs/tags/2.2.0-beta2.tar.gz"
# checksum: ["sha256=8b564746e7f656ec77b965e8ca1a773ed641e81de536a196e9ee8b22ed9cb4f9"]
# - Jun 11, 2024 (beta3)
# src: "https://github.com/ocaml/opam/releases/download/2.2.0-beta3/opam-full-2.2.0-beta3.tar.gz"
# checksum: ["sha256=1a4f80632d73a99f8ba2b128d635037aaed03a4fa5c95b8b6eb00195870ca080"]
# - Jun 24, 2024 (rc1)
# src: "https://github.com/ocaml/opam/releases/download/2.2.0-rc1/opam-full-2.2.0-rc1.tar.gz"
# checksum: ["sha256=692e8d3d55fc0c7cea3a480d960269c821ef35b3b6c617d8ea639c09a2479a32"]
# - Jul 2, 2024
# src: "https://github.com/ocaml/opam/releases/download/2.2.0/opam-full-2.2.0-2.tar.gz"
# checksum: ["sha256=459ed64e6643f05c677563a000e3baa05c76ce528064e9cb9ce6db49fff37c97"]
# - Aug 23, 2024
# src: "https://github.com/ocaml/opam/releases/download/2.2.1/opam-full-2.2.1.tar.gz"
# checksum: ["sha256=07ad3887f61e0bc61a0923faae16fcc141285ece5b248a9e2cd4f902523cc121"]
src: "https://github.com/ocaml/opam/releases/download/2.2.1/opam-full-2.2.1.tar.gz"
checksum: ["sha256=07ad3887f61e0bc61a0923faae16fcc141285ece5b248a9e2cd4f902523cc121"]
}
extra-source "dl/homebrew-bundle.tar.gz" {
src: "https://github.com/Homebrew/homebrew-bundle/archive/437c67db2f160369fec3a3892e3c577b6b3a4d2c.tar.gz"
checksum: [
"sha256=ecb6b03b2d0210369f23e3f8f64cd939a4bba633db08db62a49894653e053df4"
]
}
# -------------------
# BEGIN OPAM ARCHIVES
#
# Since we don't have network access in sandboxes, we can't let `make -C src_ext cache-archives`
# actual download. Use extra-source instead.
#
# This section can be autogenerated within dl/opam using:
# join <(awk '$1~/^URL_[0-9a-z]/{sub(/URL_/,"",$1); print $1,"URL",$NF}' src_ext/Makefile src_ext/Makefile.sources) <(awk '$1~/^MD5_[0-9a-z]/{sub(/MD5_/,"",$1); print $1,"MD5",$NF}' src_ext/Makefile src_ext/Makefile.sources) | awk -v dq='"' '$2=="URL" && $4=="MD5"{name=$3; sub(".*/", "",name); printf "extra-source %sdl/opam/src_ext/archives/%s%s {\n src: %s%s%s\n checksum: [\n %smd5=%s%s\n ]\n}\n", dq,name,dq, dq,$3,dq, dq,$5,dq }'
extra-source "dl/opam/src_ext/archives/4.14.2.tar.gz" {
src: "https://github.com/ocaml/ocaml/archive/refs/tags/4.14.2.tar.gz"
checksum: [
"md5=b28daefda803b5d5910cecf085b1451c"
]
}
extra-source "dl/opam/src_ext/archives/0.43.tar.gz" {
src: "https://github.com/ocaml/flexdll/archive/0.43.tar.gz"
checksum: [
"md5=6ce706f6c65b2c5adf5791fac678f090"
]
}
extra-source "dl/opam/src_ext/archives/v1.6.9.tar.gz" {
src: "https://github.com/ocaml-community/cppo/archive/v1.6.9.tar.gz"
checksum: [
"md5=d23ffe85ac7dc8f0afd1ddf622770d09"
]
}
extra-source "dl/opam/src_ext/archives/extlib-1.7.9.tar.gz" {
src: "https://github.com/ygrek/ocaml-extlib/releases/download/1.7.9/extlib-1.7.9.tar.gz"
checksum: [
"md5=f7ca7f1c82e15a99603b88f730fd7b8a"
]
}
extra-source "dl/opam/src_ext/archives/base64-3.5.1.tbz" {
src: "https://github.com/mirage/ocaml-base64/releases/download/v3.5.1/base64-3.5.1.tbz"
checksum: [
"md5=bfdd16aa8c136412878109df8791fc01"
]
}
extra-source "dl/opam/src_ext/archives/re-1.11.0.tbz" {
src: "https://github.com/ocaml/ocaml-re/releases/download/1.11.0/re-1.11.0.tbz"
checksum: [
"md5=e0199e32947fd33fcc1b8e69de2308a1"
]
}
extra-source "dl/opam/src_ext/archives/cmdliner-1.3.0.tbz" {
src: "https://erratique.ch/software/cmdliner/releases/cmdliner-1.3.0.tbz"
checksum: [
"md5=662936095a1613d7254815238e11793f"
]
}
extra-source "dl/opam/src_ext/archives/ocamlgraph-2.1.0.tbz" {
src: "https://github.com/backtracking/ocamlgraph/releases/download/2.1.0/ocamlgraph-2.1.0.tbz"
checksum: [
"md5=4200d8f223aa7a32b4024e4553821c7c"
]
}
extra-source "dl/opam/src_ext/archives/cudf-v0.10.tar.gz" {
src: "https://gitlab.com/irill/cudf/-/archive/v0.10/cudf-v0.10.tar.gz"
checksum: [
"md5=ed8fea314d0c6dc0d8811ccf860c53dd"
]
}
extra-source "dl/opam/src_ext/archives/dose3-7.0.0.tar.gz" {
src: "https://gitlab.com/irill/dose3/-/archive/7.0.0/dose3-7.0.0.tar.gz"
checksum: [
"md5=bc99cbcea8fca29dca3ebbee54be45e1"
]
}
extra-source "dl/opam/src_ext/archives/1.1+17.tar.gz" {
src: "https://github.com/ocaml-opam/ocaml-mccs/archive/refs/tags/1.1+17.tar.gz"
checksum: [
"md5=844d99bc531e0713238fe4b6b8511ed1"
]
}
extra-source "dl/opam/src_ext/archives/opam-0install-cudf-0.4.3.tbz" {
src: "https://github.com/ocaml-opam/opam-0install-solver/releases/download/v0.4.3/opam-0install-cudf-0.4.3.tbz"
checksum: [
"md5=ae0c197deace373ad87737468a04f76b"
]
}
extra-source "dl/opam/src_ext/archives/2.1.6.tar.gz" {
src: "https://github.com/ocaml/opam-file-format/archive/refs/tags/2.1.6.tar.gz"
checksum: [
"md5=706ce5fc3e77db746a4c8b11d79cefef"
]
}
extra-source "dl/opam/src_ext/archives/v0.3.1.tar.gz" {
src: "https://github.com/c-cube/seq/archive/v0.3.1.tar.gz"
checksum: [
"md5=de05d9dedd492fa4e3c0c87bc2792475"
]
}
extra-source "dl/opam/src_ext/archives/stdlib-shims-0.3.0.tbz" {
src: "https://github.com/ocaml/stdlib-shims/releases/download/0.3.0/stdlib-shims-0.3.0.tbz"
checksum: [
"md5=09db7af8b4a3a96048a61cb6ae2496ef"
]
}
extra-source "dl/opam/src_ext/archives/spdx_licenses-1.2.0.tar.gz" {
src: "https://github.com/kit-ty-kate/spdx_licenses/releases/download/v1.2.0/spdx_licenses-1.2.0.tar.gz"
checksum: [
"md5=b581124aeebd7facb856d8b942cb58a5"
]
}
extra-source "dl/opam/src_ext/archives/uutf-1.0.3.tbz" {
src: "https://erratique.ch/software/uutf/releases/uutf-1.0.3.tbz"
checksum: [
"md5=a308285514259d20b48abc92f00a3708"
]
}
extra-source "dl/opam/src_ext/archives/jsonm-1.0.2.tbz" {
src: "https://erratique.ch/software/jsonm/releases/jsonm-1.0.2.tbz"
checksum: [
"md5=bb21574ddd58543120430ff306b462e6"
]
}
extra-source "dl/opam/src_ext/archives/sha-1.15.4.tbz" {
src: "https://github.com/djs55/ocaml-sha/releases/download/v1.15.4/sha-1.15.4.tbz"
checksum: [
"md5=08bc953d9a26380bc220b05d680791fb"
]
}
extra-source "dl/opam/src_ext/archives/0.1.tar.gz" {
src: "https://github.com/OCamlPro/swhid_core/archive/refs/tags/0.1.tar.gz"
checksum: [
"md5=77d88d4b1d96261c866f140c64d89af8"
]
}
# END OPAM ARCHIVES
# -------------------