mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-22 22:16:16 +02:00
Export missing rev/shortRev attributes
This commit is contained in:
parent
0d1c2e5bae
commit
77e1f9010c
1 changed files with 9 additions and 0 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue