aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/libexpr/primops/flake.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/libexpr/primops/flake.cc b/src/libexpr/primops/flake.cc
index b451afba4..dc8df7f6f 100644
--- a/src/libexpr/primops/flake.cc
+++ b/src/libexpr/primops/flake.cc
@@ -441,6 +441,8 @@ void callFlake(EvalState & state, const ResolvedFlake & resFlake, Value & v)
state.store->isValidPath(nonFlake.storePath);
mkString(*state.allocAttr(*vNonFlake, state.sOutPath), nonFlake.storePath, {nonFlake.storePath});
+
+ // FIXME: add rev, shortRev, revCount, ...
}
mkString(*state.allocAttr(v, state.sDescription), resFlake.flake.description);
@@ -449,6 +451,13 @@ void callFlake(EvalState & state, const ResolvedFlake & resFlake, Value & v)
state.store->isValidPath(path);
mkString(*state.allocAttr(v, state.sOutPath), path, {path});
+ if (resFlake.flake.resolvedRef.rev) {
+ mkString(*state.allocAttr(v, state.symbols.create("rev")),
+ resFlake.flake.resolvedRef.rev->gitRev());
+ mkString(*state.allocAttr(v, state.symbols.create("shortRev")),
+ resFlake.flake.resolvedRef.rev->gitShortRev());
+ }
+
if (resFlake.flake.revCount)
mkInt(*state.allocAttr(v, state.symbols.create("revCount")), *resFlake.flake.revCount);