@@ 7,7 7,7 @@ homepage = "https://bitbucket.org/mimiro
bug_reports = "https://bitbucket.org/mimirops/hll/issues"
dev_repo = "git@bitbucket.org:mimirops/hll.git"
-url_template = "https://bitbucket.org/mimirops/hll/get/{tag}.tar.gz"
+url_template = "http://acsl-pkgs.s3.amazonaws.com/hll-{tag}.tar.gz"
url_pattern = "{tag}"
url_protocol = "http"
@@ 22,7 22,7 @@ module Cmdline = struct
C.Arg.(value & opt (some string) None & info ["tag"] ~docv:"TAG" ~doc)
in
let pins_file =
- let doc = "Path to file containing pins (default hll.pins)" in
+ let doc = "Path to file containing pins" in
C.Arg.(value & opt (some file) None & info ["pins"] ~docv:"FILE" ~doc)
in
let hll_conf =
@@ 174,9 174,27 @@ module Generate = struct
test_deps
pins
+ let map_pins_to_dep_map deps_map pins =
+ ListLabels.fold_left
+ ~f:(fun pins (k, v) ->
+ let k = TomlTypes.Table.Key.to_string k in
+ let xs = TomlLenses.(get v (array |-- strings)) in
+ match (String_map.get k pins, xs) with
+ | (Some _, _)
+ | (_, Some [])
+ | (_, None) ->
+ pins
+ | (None, Some (x::_)) when String_map.mem x pins ->
+ String_map.add k (String_map.find x pins) pins
+ | (None, _) ->
+ pins)
+ ~init:pins
+ (TomlTypes.Table.bindings deps_map)
+
let generate_pkg_content t =
let pins =
t.pins
+ |> map_pins_to_dep_map t.deps_map
|> maybe_add_pds_pin t.pds_version
|> maybe_add_test_pins t.test_deps
in