mirror of
https://github.com/NixOS/nix
synced 2025-06-25 02:21:16 +02:00
allow fetchMercurial to take a name
argument
This commit is contained in:
parent
a487a652ed
commit
e4b082a52b
3 changed files with 10 additions and 4 deletions
|
@ -62,6 +62,7 @@ static void prim_fetchMercurial(EvalState & state, const Pos & pos, Value * * ar
|
|||
fetchers::Attrs attrs;
|
||||
attrs.insert_or_assign("type", "hg");
|
||||
attrs.insert_or_assign("url", url.find("://") != std::string::npos ? url : "file://" + url);
|
||||
attrs.insert_or_assign("name", name);
|
||||
if (ref) attrs.insert_or_assign("ref", *ref);
|
||||
if (rev) attrs.insert_or_assign("rev", rev->gitRev());
|
||||
auto input = fetchers::Input::fromAttrs(std::move(attrs));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue