aboutsummaryrefslogtreecommitdiff
path: root/src/nix/develop.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/nix/develop.cc')
-rw-r--r--src/nix/develop.cc13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/nix/develop.cc b/src/nix/develop.cc
index adfb3558d..8abb710c2 100644
--- a/src/nix/develop.cc
+++ b/src/nix/develop.cc
@@ -135,14 +135,17 @@ StorePath getDerivationEnvironment(ref<Store> store, const StorePath & drvPath)
drv.inputSrcs.insert(std::move(getEnvShPath));
Hash h = hashDerivationModulo(*store, drv, true);
auto shellOutPath = store->makeOutputPath("out", h, drvName);
- drv.outputs.insert_or_assign("out", DerivationOutput(shellOutPath.clone(), FileSystemHash {
- FileIngestionMethod::Flat, Hash { }
- }));
+ drv.outputs.insert_or_assign("out", DerivationOutput {
+ .path = shellOutPath,
+ .hash = FileSystemHash {
+ FileIngestionMethod::Flat, Hash { }
+ },
+ });
drv.env["out"] = store->printStorePath(shellOutPath);
auto shellDrvPath2 = writeDerivation(store, drv, drvName);
/* Build the derivation. */
- store->buildPaths({shellDrvPath2});
+ store->buildPaths({{shellDrvPath2}});
assert(store->isValidPath(shellOutPath));
@@ -207,7 +210,7 @@ struct Common : InstallableCommand, MixProfile
{
auto path = installable->getStorePath();
if (path && hasSuffix(path->to_string(), "-env"))
- return path->clone();
+ return *path;
else {
auto drvs = toDerivations(store, {installable});