aboutsummaryrefslogtreecommitdiff
path: root/src/libexpr/primops
diff options
context:
space:
mode:
authorregnat <rg@regnat.ovh>2021-07-06 08:43:06 +0200
committerregnat <rg@regnat.ovh>2021-07-06 08:43:06 +0200
commite4b082a52b4cd983b50037783a647cf39cd18bdf (patch)
tree6fdfedfc04f0736f5eb710ae1a71a2d440a2b23a /src/libexpr/primops
parenta487a652ed2f662782529d8f2bea4cf90a05e0c9 (diff)
allow fetchMercurial to take a `name` argument
Diffstat (limited to 'src/libexpr/primops')
-rw-r--r--src/libexpr/primops/fetchMercurial.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/libexpr/primops/fetchMercurial.cc b/src/libexpr/primops/fetchMercurial.cc
index 4830ebec3..3f88ccb91 100644
--- a/src/libexpr/primops/fetchMercurial.cc
+++ b/src/libexpr/primops/fetchMercurial.cc
@@ -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));