@@ -272,26 +272,24 @@ static StorePath getDerivationEnvironment(ref<Store> store, ref<Store> evalStore
272272 drv.name += " -env" ;
273273 drv.env .emplace (" name" , drv.name );
274274 drv.inputSrcs .insert (std::move (getEnvShPath));
275- if (experimentalFeatureSettings.isEnabled (Xp::CaDerivations)) {
276- for (auto & output : drv.outputs ) {
277- output.second = DerivationOutput::Deferred{}, drv.env [output.first ] = hashPlaceholder (output.first );
278- }
279- } else {
280- for (auto & output : drv.outputs ) {
281- output.second = DerivationOutput::Deferred{};
282- drv.env [output.first ] = " " ;
283- }
284- auto hashesModulo = hashDerivationModulo (*evalStore, drv, true );
285-
286- for (auto & output : drv.outputs ) {
287- Hash h = hashesModulo.hashes .at (output.first );
288- auto outPath = store->makeOutputPath (output.first , h, drv.name );
289- output.second = DerivationOutput::InputAddressed{
290- .path = outPath,
291- };
292- drv.env [output.first ] = store->printStorePath (outPath);
293- }
275+ for (auto & [outputName, output] : drv.outputs ) {
276+ std::visit (
277+ overloaded{
278+ [&](const DerivationOutput::InputAddressed &) {
279+ output = DerivationOutput::Deferred{};
280+ drv.env [outputName] = " " ;
281+ },
282+ [&](const DerivationOutput::CAFixed &) {
283+ output = DerivationOutput::Deferred{};
284+ drv.env [outputName] = " " ;
285+ },
286+ [&](const auto &) {
287+ // Do nothing for other types (CAFloating, Deferred, Impure)
288+ },
289+ },
290+ output.raw );
294291 }
292+ drv.fillInOutputPaths (*evalStore);
295293
296294 auto shellDrvPath = writeDerivation (*evalStore, drv);
297295
0 commit comments