Merge: matrix-synapse: 1.122.0 -> 1.123.0 (#378018)
[NixPkgs.git] / pkgs / development / ocaml-modules / opam-repository / download-tool.patch
blob9cc5f43f34f13f5f9ed3a6350f6adc9e083a93ba
1 diff --git a/src/repository/opamRepositoryConfig.ml b/src/repository/opamRepositoryConfig.ml
2 index c2954c1d..528fc621 100644
3 --- a/src/repository/opamRepositoryConfig.ml
4 +++ b/src/repository/opamRepositoryConfig.ml
5 @@ -27,31 +27,7 @@ type 'a options_fun =
6 'a
8 let default = {
9 - download_tool = lazy (
10 - let os = OpamStd.Sys.os () in
11 - try
12 - let curl = "curl", `Curl in
13 - let tools =
14 - match os with
15 - | Darwin -> ["wget", `Default; curl]
16 - | FreeBSD -> ["fetch", `Default ; curl]
17 - | OpenBSD -> ["ftp", `Default; curl]
18 - | _ -> [curl; "wget", `Default]
19 - in
20 - let cmd, kind =
21 - List.find (fun (c,_) -> OpamSystem.resolve_command c <> None) tools
22 - in
23 - [ CIdent cmd, None ], kind
24 - with Not_found ->
25 - OpamConsole.error_and_exit `Configuration_error
26 - "Could not find a suitable download command. Please make sure you \
27 - have %s installed, or specify a custom command through variable \
28 - OPAMFETCH."
29 - (match os with
30 - | FreeBSD -> "fetch"
31 - | OpenBSD -> "ftp"
32 - | _ -> "either \"curl\" or \"wget\"")
33 - );
34 + download_tool = lazy ([ CIdent SUBSTITUTE_NIXOS_CURL_PATH, None ], `Curl);
35 validation_hook = None;
36 retries = 3;
37 force_checksums = None;