From 94cf0da7b2955d5b54a142b9e920332746a61033 Mon Sep 17 00:00:00 2001 From: Timothy DeHerrera Date: Mon, 19 Dec 2022 13:16:06 -0700 Subject: [PATCH] fix(develop): make `nix develop` drv recreatable --- src/nix/develop.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/nix/develop.cc b/src/nix/develop.cc index 4de109754..6c3a9c6c6 100644 --- a/src/nix/develop.cc +++ b/src/nix/develop.cc @@ -192,10 +192,12 @@ static StorePath getDerivationEnvironment(ref store, ref evalStore drv.env.erase("allowedRequisites"); drv.env.erase("disallowedReferences"); drv.env.erase("disallowedRequisites"); + drv.env.erase("name"); /* Rehash and write the derivation. FIXME: would be nice to use 'buildDerivation', but that's privileged. */ drv.name += "-env"; + drv.env.emplace("name", drv.name); drv.inputSrcs.insert(std::move(getEnvShPath)); if (settings.isExperimentalFeatureEnabled(Xp::CaDerivations)) { for (auto & output : drv.outputs) {