1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-29 21:50:58 +01:00

Checkpoint

This commit is contained in:
Eelco Dolstra 2022-02-15 16:38:22 +01:00
parent e827e6288f
commit 3ec83565b1
11 changed files with 116 additions and 39 deletions

View file

@ -209,7 +209,7 @@ static Flake getFlake(
.originalRef = originalRef,
.resolvedRef = resolvedRef,
.lockedRef = lockedRef,
.sourceInfo = std::make_shared<fetchers::Tree>(std::move(sourceInfo))
//.sourceInfo = std::make_shared<fetchers::Tree>(std::move(sourceInfo))
};
if (!pathExists(flakeFile))
@ -326,6 +326,7 @@ LockedFlake lockFlake(
state.store->setOptions();
}
#if 0
try {
// FIXME: symlink attack
@ -669,6 +670,9 @@ LockedFlake lockFlake(
e.addTrace({}, "while updating the lock file of flake '%s'", flake.lockedRef.to_string());
throw;
}
#endif
throw UnimplementedError("lockFlake");
}
void callFlake(EvalState & state,
@ -683,13 +687,17 @@ void callFlake(EvalState & state,
vLocks->mkString(lockedFlake.lockFile.to_string());
#if 0
emitTreeAttrs(
state,
*lockedFlake.flake.sourceInfo,
//*lockedFlake.flake.sourceInfo,
lockedFlake.flake.lockedRef.input,
*vRootSrc,
false,
lockedFlake.flake.forceDirty);
#endif
throw UnimplementedError("callFlake");
vRootSubdir->mkString(lockedFlake.flake.lockedRef.subdir);
@ -756,7 +764,8 @@ Fingerprint LockedFlake::getFingerprint() const
// flake.sourceInfo.storePath for the fingerprint.
return hashString(htSHA256,
fmt("%s;%s;%d;%d;%s",
flake.sourceInfo->storePath.to_string(),
"FIXME",
//flake.sourceInfo->storePath.to_string(),
flake.lockedRef.subdir,
flake.lockedRef.input.getRevCount().value_or(0),
flake.lockedRef.input.getLastModified().value_or(0),