diff options
author | Théophane Hufschmitt <7226587+thufschmitt@users.noreply.github.com> | 2022-12-20 07:41:46 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-20 07:41:46 +0100 |
commit | c3d522dc51b2b25a002ad6cd1cfb876488cf1cf4 (patch) | |
tree | 2ecca2ab7572b224a00fc7e72ceca46cbbf9fef5 /src | |
parent | f118e661e040a67e05b36b6dfe4f087a31fe81b2 (diff) | |
parent | 94cf0da7b2955d5b54a142b9e920332746a61033 (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.cc | 2 |
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) { |