mirror of
https://github.com/NixOS/nix.git
synced 2025-12-03 23:51:00 +01:00
builtin:{unpack-channel,buildenv}: Get output path from the derivation
Similar to 1ee42c5b88, get the "out"
path from the derivation (and complain if it doesn't exist), rather
than getting it from the environment.
This commit is contained in:
parent
c4ebb82da4
commit
a9b69b2fff
7 changed files with 33 additions and 23 deletions
|
|
@ -2130,16 +2130,17 @@ void LocalDerivationGoal::runChild()
|
|||
try {
|
||||
logger = makeJSONLogger(*logger);
|
||||
|
||||
BasicDerivation & drv2(*drv);
|
||||
for (auto & e : drv2.env)
|
||||
e.second = rewriteStrings(e.second, inputRewrites);
|
||||
std::map<std::string, Path> outputs;
|
||||
for (auto & e : drv->outputs)
|
||||
outputs.insert_or_assign(e.first,
|
||||
worker.store.printStorePath(scratchOutputs.at(e.first)));
|
||||
|
||||
if (drv->builder == "builtin:fetchurl")
|
||||
builtinFetchurl(drv2, netrcData);
|
||||
builtinFetchurl(*drv, outputs, netrcData);
|
||||
else if (drv->builder == "builtin:buildenv")
|
||||
builtinBuildenv(drv2);
|
||||
builtinBuildenv(*drv, outputs);
|
||||
else if (drv->builder == "builtin:unpack-channel")
|
||||
builtinUnpackChannel(drv2);
|
||||
builtinUnpackChannel(*drv, outputs);
|
||||
else
|
||||
throw Error("unsupported builtin builder '%1%'", drv->builder.substr(8));
|
||||
_exit(0);
|
||||
|
|
|
|||
|
|
@ -106,7 +106,7 @@ struct LocalDerivationGoal : public DerivationGoal
|
|||
RedirectedOutputs redirectedOutputs;
|
||||
|
||||
/**
|
||||
* The outputs paths used during the build.
|
||||
* The output paths used during the build.
|
||||
*
|
||||
* - Input-addressed derivations or fixed content-addressed outputs are
|
||||
* sometimes built when some of their outputs already exist, and can not
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue