From 8d5bc9ed48f5bba7e3f7c0fa152dd9c0c3b6fdd4 Mon Sep 17 00:00:00 2001 From: eldritch horrors Date: Fri, 16 May 2025 13:16:18 +0200 Subject: [PATCH] libexpr: remove ca derivation eval support Change-Id: I8c06825d0fa7544b8bc9e3bda948e84a5f21ee16 --- lix/libexpr/primops.cc | 31 ++----------------------------- 1 file changed, 2 insertions(+), 29 deletions(-) diff --git a/lix/libexpr/primops.cc b/lix/libexpr/primops.cc index bcca2afd4..92bc699c2 100644 --- a/lix/libexpr/primops.cc +++ b/lix/libexpr/primops.cc @@ -93,18 +93,6 @@ StringMap EvalState::realiseContext(const NixStringContext & context) auto outputs = aio.blockOn(resolveDerivedPath(*ctx.buildStore, drv, &*ctx.store)); for (auto & [outputName, outputPath] : outputs) { outputsToCopyAndAllow.insert(outputPath); - - /* Get all the output paths corresponding to the placeholders we had */ - if (experimentalFeatureSettings.isEnabled(Xp::CaDerivations)) { - res.insert_or_assign( - DownstreamPlaceholder::fromSingleDerivedPathBuilt( - SingleDerivedPath::Built { - .drvPath = drv.drvPath, - .output = outputName, - }).render(), - ctx.buildStore->printStorePath(outputPath) - ); - } } } @@ -810,7 +798,6 @@ drvName, Bindings * attrs, Value & v) NixStringContext context; - bool contentAddressed = false; std::optional outputHash; std::string outputHashAlgo; std::optional ingestionMethod; @@ -864,8 +851,8 @@ drvName, Bindings * attrs, Value & v) } if (i->name == state.ctx.s.contentAddressed && state.forceBool(*i->value, noPos, context_below)) { - contentAddressed = true; - experimentalFeatureSettings.require(Xp::CaDerivations); + state.ctx.errors.make("ca derivations are not supported in Lix") + .debugThrow(); } else if (i->name == state.ctx.s.impure && state.forceBool(*i->value, noPos, context_below)) { @@ -1026,20 +1013,6 @@ drvName, Bindings * attrs, Value & v) drv.outputs.insert_or_assign("out", std::move(dof)); } - else if (contentAddressed) { - auto ht = parseHashTypeOpt(outputHashAlgo).value_or(HashType::SHA256); - auto method = ingestionMethod.value_or(FileIngestionMethod::Recursive); - - for (auto & i : outputs) { - drv.env[i] = hashPlaceholder(i); - drv.outputs.insert_or_assign(i, - DerivationOutput::CAFloating { - .method = method, - .hashType = ht, - }); - } - } - else { /* Compute a hash over the "masked" store derivation, which is the final one except that in the list of outputs, the