aboutsummaryrefslogtreecommitdiff
path: root/src/libexpr
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2019-09-26 17:51:51 +0200
committerEelco Dolstra <edolstra@gmail.com>2019-09-26 17:51:51 +0200
commit454e3a541a05a9b422ae5cd0911316f589f02506 (patch)
tree37a564443ef56e071c1b2b45a4f4a432f46f83e3 /src/libexpr
parentc32bba748902a8603036744d4ebccc134f02958c (diff)
Fix sorting of non-flake input attributes
Diffstat (limited to 'src/libexpr')
-rw-r--r--src/libexpr/flake/flake.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/libexpr/flake/flake.cc b/src/libexpr/flake/flake.cc
index f18159c05..2061a34a4 100644
--- a/src/libexpr/flake/flake.cc
+++ b/src/libexpr/flake/flake.cc
@@ -146,7 +146,7 @@ static FlakeRef lookupInRefMap(
return flakeRef;
}
-static SourceInfo fetchFlake(EvalState & state, const FlakeRef & resolvedRef)
+static SourceInfo fetchInput(EvalState & state, const FlakeRef & resolvedRef)
{
assert(resolvedRef.isDirect());
@@ -231,7 +231,7 @@ static Flake getFlake(EvalState & state, const FlakeRef & originalRef,
maybeLookupFlake(state,
lookupInRefMap(refMap, originalRef), allowLookup));
- SourceInfo sourceInfo = fetchFlake(state, flakeRef);
+ SourceInfo sourceInfo = fetchInput(state, flakeRef);
debug("got flake source '%s' with flakeref %s", sourceInfo.storePath, sourceInfo.resolvedRef.to_string());
FlakeRef resolvedRef = sourceInfo.resolvedRef;
@@ -352,7 +352,7 @@ static SourceInfo getNonFlake(EvalState & state, const FlakeRef & originalRef,
maybeLookupFlake(state,
lookupInRefMap(refMap, originalRef), allowLookup));
- auto sourceInfo = fetchFlake(state, flakeRef);
+ auto sourceInfo = fetchInput(state, flakeRef);
debug("got non-flake source '%s' with flakeref %s", sourceInfo.storePath, sourceInfo.resolvedRef.to_string());
FlakeRef resolvedRef = sourceInfo.resolvedRef;
@@ -566,6 +566,8 @@ static void prim_callFlake(EvalState & state, const Pos & pos, Value * * args, V
sourceInfo.storePath, {sourceInfo.storePath});
emitSourceInfoAttrs(state, sourceInfo, v);
+
+ v.attrs->sort();
}
}