1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-18 08:19:35 +01:00

Remove StorePath::clone() and related functions

This commit is contained in:
Eelco Dolstra 2020-06-16 22:20:18 +02:00
parent df4da4f5da
commit 29542865ce
34 changed files with 201 additions and 304 deletions

View file

@ -135,12 +135,12 @@ 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(), "", ""));
drv.outputs.insert_or_assign("out", DerivationOutput { shellOutPath, "", "" });
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));
@ -205,7 +205,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});