@@ -355,17 +355,23 @@ let create_switch ~arch distro t =
355
355
| _ ->
356
356
create_switch switch (Ocaml_version.Opam.V2. name switch)
357
357
358
+ let add_beta_remote ovs =
359
+ if List. exists OV.Releases. is_dev ovs then
360
+ run " opam repo add beta git+https://github.com/ocaml/ocaml-beta-repository --set-default"
361
+ else empty
362
+
363
+ let add_overlay_remote os_family =
364
+ if os_family = `Windows then
365
+ run " opam repo add ocurrent-overlay git+https://github.com/ocurrent/opam-repository-mingw#overlay --set-default"
366
+ else empty
367
+
358
368
let all_ocaml_compilers hub_id arch distro =
359
369
let distro_tag = D. tag_of_distro distro in
360
370
let os_family = Dockerfile_distro. os_family_of_distro distro in
361
371
let compilers =
362
372
OV.Releases. recent |>
363
373
List. filter (fun ov -> D. distro_supported_on arch ov distro) |> fun ovs ->
364
- let add_beta_remote =
365
- if List. exists OV.Releases. is_dev ovs then
366
- run " opam repo add beta git+https://github.com/ocaml/ocaml-beta-repository --set-default"
367
- else empty in
368
- add_beta_remote @@@ List. map (create_switch ~arch distro) ovs
374
+ add_beta_remote ovs @@ add_overlay_remote os_family @@@ List. map (create_switch ~arch distro) ovs
369
375
in
370
376
let d =
371
377
let pers = match personality ~arch distro with
@@ -401,10 +407,6 @@ let separate_ocaml_compilers hub_id arch distro =
401
407
let os_family = Dockerfile_distro. os_family_of_distro distro in
402
408
OV.Releases. recent_with_dev |> List. filter (fun ov -> D. distro_supported_on arch ov distro)
403
409
|> List. map (fun ov ->
404
- let add_remote =
405
- if OV.Releases. is_dev ov then
406
- run " opam repo add beta git+https://github.com/ocaml/ocaml-beta-repository --set-default"
407
- else empty in
408
410
let default_switch_name = OV. (with_patch (with_variant ov None ) None |> to_string) in
409
411
let variants =
410
412
empty @@@ List. map (create_switch ~arch distro) (OV.Opam.V2. switches arch ov)
@@ -420,7 +422,8 @@ let separate_ocaml_compilers hub_id arch distro =
420
422
@@ sandbox
421
423
@@ run " opam init -k git -a /home/opam/opam-repository --bare%s"
422
424
(if os_family = `Windows then " --disable-sandboxing" else " " )
423
- @@ add_remote
425
+ @@ add_beta_remote [ov]
426
+ @@ add_overlay_remote os_family
424
427
@@ variants
425
428
@@ run " opam switch %s" default_switch_name
426
429
@@ run " opam install -y depext%s"
0 commit comments