aboutsummaryrefslogtreecommitdiff
path: root/src/nix
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2019-09-18 21:17:27 +0200
committerEelco Dolstra <edolstra@gmail.com>2019-09-18 21:57:57 +0200
commitc67407172d8383394f4962ad177c84bf04529e5e (patch)
tree6dab718a9dbda0e13c2ceab07521449edd02f98c /src/nix
parent092ee246277c76cd80f34088911419058e8b0f2f (diff)
Record original flakerefs in the lock file again
If 'input.<name>.uri' changes, then the entry in the lockfile for input <name> should be considered stale. Also print some messages when lock file entries are added/updated.
Diffstat (limited to 'src/nix')
-rw-r--r--src/nix/flake.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/nix/flake.cc b/src/nix/flake.cc
index 5fd3f5508..599bf12eb 100644
--- a/src/nix/flake.cc
+++ b/src/nix/flake.cc
@@ -38,8 +38,7 @@ public:
Flake getFlake()
{
auto evalState = getEvalState();
- return flake::getFlake(*evalState,
- maybeLookupFlake(*evalState, getFlakeRef(), useRegistries));
+ return flake::getFlake(*evalState, getFlakeRef(), useRegistries);
}
ResolvedFlake resolveFlake()
@@ -500,13 +499,13 @@ struct CmdFlakePin : virtual Args, EvalCommand
FlakeRegistry userRegistry = *readRegistry(userRegistryPath);
auto it = userRegistry.entries.find(FlakeRef(alias));
if (it != userRegistry.entries.end()) {
- it->second = getFlake(*evalState, maybeLookupFlake(*evalState, it->second, true)).sourceInfo.resolvedRef;
+ it->second = getFlake(*evalState, it->second, true).sourceInfo.resolvedRef;
writeRegistry(userRegistry, userRegistryPath);
} else {
std::shared_ptr<FlakeRegistry> globalReg = evalState->getGlobalFlakeRegistry();
it = globalReg->entries.find(FlakeRef(alias));
if (it != globalReg->entries.end()) {
- auto newRef = getFlake(*evalState, maybeLookupFlake(*evalState, it->second, true)).sourceInfo.resolvedRef;
+ auto newRef = getFlake(*evalState, it->second, true).sourceInfo.resolvedRef;
userRegistry.entries.insert_or_assign(alias, newRef);
writeRegistry(userRegistry, userRegistryPath);
} else