@@ -355,17 +355,23 @@ let create_switch ~arch distro t =
355355 | _ ->
356356 create_switch switch (Ocaml_version.Opam.V2. name switch)
357357
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+
358368let all_ocaml_compilers hub_id arch distro =
359369 let distro_tag = D. tag_of_distro distro in
360370 let os_family = Dockerfile_distro. os_family_of_distro distro in
361371 let compilers =
362372 OV.Releases. recent |>
363373 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
369375 in
370376 let d =
371377 let pers = match personality ~arch distro with
@@ -401,10 +407,6 @@ let separate_ocaml_compilers hub_id arch distro =
401407 let os_family = Dockerfile_distro. os_family_of_distro distro in
402408 OV.Releases. recent_with_dev |> List. filter (fun ov -> D. distro_supported_on arch ov distro)
403409 |> 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
408410 let default_switch_name = OV. (with_patch (with_variant ov None ) None |> to_string) in
409411 let variants =
410412 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 =
420422 @@ sandbox
421423 @@ run " opam init -k git -a /home/opam/opam-repository --bare%s"
422424 (if os_family = `Windows then " --disable-sandboxing" else " " )
423- @@ add_remote
425+ @@ add_beta_remote [ov]
426+ @@ add_overlay_remote os_family
424427 @@ variants
425428 @@ run " opam switch %s" default_switch_name
426429 @@ run " opam install -y depext%s"
0 commit comments