aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThéophane Hufschmitt <7226587+thufschmitt@users.noreply.github.com>2022-12-20 07:41:46 +0100
committerGitHub <noreply@github.com>2022-12-20 07:41:46 +0100
commitc3d522dc51b2b25a002ad6cd1cfb876488cf1cf4 (patch)
tree2ecca2ab7572b224a00fc7e72ceca46cbbf9fef5 /src
parentf118e661e040a67e05b36b6dfe4f087a31fe81b2 (diff)
parent94cf0da7b2955d5b54a142b9e920332746a61033 (diff)
Merge pull request #7480 from nrdxp/fix-develop-drv
fix(develop): make `nix develop` drv recreatable
Diffstat (limited to 'src')
-rw-r--r--src/nix/develop.cc2
1 files changed, 2 insertions, 0 deletions
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> store, ref<Store> 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) {