From 359d124bbffc718cd4c115ab79de1cf8e08d8ef2 Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Mon, 26 Aug 2024 12:46:01 +0200 Subject: [PATCH] fixup: Re-enable import .drv code --- src/libexpr/primops.cc | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/libexpr/primops.cc b/src/libexpr/primops.cc index 9131e89c3..e32e97a32 100644 --- a/src/libexpr/primops.cc +++ b/src/libexpr/primops.cc @@ -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 { 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 {