mirror of
https://github.com/NixOS/nix.git
synced 2025-11-18 08:19:35 +01:00
Merge remote-tracking branch 'upstream/master' into no-stringly-typed-derivation-output
This commit is contained in:
commit
517f5980e2
138 changed files with 2604 additions and 1743 deletions
|
|
@ -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});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue