fixup: Re-enable import .drv code

This commit is contained in:
Robert Hensing 2024-08-26 12:46:01 +02:00
parent 68a5cfd30e
commit 359d124bbf

View File

@ -178,10 +178,6 @@ static void import(EvalState & state, const PosIdx pos, Value & vPath, Value * v
auto path = realisePath(state, pos, vPath, std::nullopt);
auto path2 = path.path.abs();
// FIXME: corruption?
// TODO(tomberek): re-enable this code?
#if 0
// FIXME
auto isValidDerivationInStore = [&]() -> std::optional<StorePath> {
if (!state.store->isStorePath(path2))
return std::nullopt;
@ -219,11 +215,7 @@ static void import(EvalState & state, const PosIdx pos, Value & vPath, Value * v
state.forceFunction(**state.vImportedDrvToDerivation, pos, "while evaluating imported-drv-to-derivation.nix.gen.hh");
v.mkApp(*state.vImportedDrvToDerivation, w);
state.forceAttrs(v, pos, "while calling imported-drv-to-derivation.nix.gen.hh");
}
else
#endif
{
} else {
if (!vScope)
state.evalFile(path, v);
else {