diff options
author | Mario Rodas <marsam@users.noreply.github.com> | 2021-07-26 04:20:00 +0000 |
---|---|---|
committer | Mario Rodas <marsam@users.noreply.github.com> | 2021-07-26 04:20:00 +0000 |
commit | 5a7e27afe1af320b73034aab50fd1564014c6f98 (patch) | |
tree | 6d38ea7539a9b42098f7dde62901558facc876c7 /pkgs/development/ocaml-modules/opam-repository | |
parent | 7d189ad382a2d924ed04f3a7856a0ae0747a1187 (diff) |
opam: 2.0.8 -> 2.1.0
https://github.com/ocaml/opam/releases/tag/2.1.0
Diffstat (limited to 'pkgs/development/ocaml-modules/opam-repository')
-rw-r--r-- | pkgs/development/ocaml-modules/opam-repository/download-tool.patch | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/pkgs/development/ocaml-modules/opam-repository/download-tool.patch b/pkgs/development/ocaml-modules/opam-repository/download-tool.patch index 5af720adca911..9cc5f43f34f13 100644 --- a/pkgs/development/ocaml-modules/opam-repository/download-tool.patch +++ b/pkgs/development/ocaml-modules/opam-repository/download-tool.patch @@ -2,16 +2,20 @@ diff --git a/src/repository/opamRepositoryConfig.ml b/src/repository/opamReposit index c2954c1d..528fc621 100644 --- a/src/repository/opamRepositoryConfig.ml +++ b/src/repository/opamRepositoryConfig.ml -@@ -27,23 +27,7 @@ type 'a options_fun = +@@ -27,31 +27,7 @@ type 'a options_fun = 'a let default = { - download_tool = lazy ( +- let os = OpamStd.Sys.os () in - try +- let curl = "curl", `Curl in - let tools = -- if OpamStd.Sys.(os () = Darwin) -- then ["wget", `Default; "curl", `Curl] -- else ["curl", `Curl; "wget", `Default] +- match os with +- | Darwin -> ["wget", `Default; curl] +- | FreeBSD -> ["fetch", `Default ; curl] +- | OpenBSD -> ["ftp", `Default; curl] +- | _ -> [curl; "wget", `Default] - in - let cmd, kind = - List.find (fun (c,_) -> OpamSystem.resolve_command c <> None) tools @@ -20,8 +24,12 @@ index c2954c1d..528fc621 100644 - with Not_found -> - OpamConsole.error_and_exit `Configuration_error - "Could not find a suitable download command. Please make sure you \ -- have either \"curl\" or \"wget\" installed, or specify a custom \ -- command through variable OPAMFETCH." +- have %s installed, or specify a custom command through variable \ +- OPAMFETCH." +- (match os with +- | FreeBSD -> "fetch" +- | OpenBSD -> "ftp" +- | _ -> "either \"curl\" or \"wget\"") - ); + download_tool = lazy ([ CIdent SUBSTITUTE_NIXOS_CURL_PATH, None ], `Curl); validation_hook = None; |