mirror of
https://github.com/NixOS/nix
synced 2025-07-09 07:53:55 +02:00
Limit ParsedDerivation
just to the derivation's environment
This moves us towards getting rid of `ParsedDerivation` and just having `DerivationOptions`. Co-Authored-By: HaeNoe <git@haenoe.party>
This commit is contained in:
parent
d285b80033
commit
1e31b60043
8 changed files with 52 additions and 38 deletions
|
@ -544,7 +544,7 @@ static void main_nix_build(int argc, char * * argv)
|
|||
env["NIX_STORE"] = store->storeDir;
|
||||
env["NIX_BUILD_CORES"] = std::to_string(settings.buildCores);
|
||||
|
||||
ParsedDerivation parsedDrv(drv);
|
||||
ParsedDerivation parsedDrv(drv.env);
|
||||
DerivationOptions drvOptions;
|
||||
try {
|
||||
drvOptions = DerivationOptions::fromParsedDerivation(parsedDrv);
|
||||
|
@ -584,7 +584,12 @@ static void main_nix_build(int argc, char * * argv)
|
|||
for (const auto & [inputDrv, inputNode] : drv.inputDrvs.map)
|
||||
accumInputClosure(inputDrv, inputNode);
|
||||
|
||||
if (auto structAttrs = parsedDrv.prepareStructuredAttrs(*store, drvOptions, inputs)) {
|
||||
if (auto structAttrs = parsedDrv.prepareStructuredAttrs(
|
||||
*store,
|
||||
drvOptions,
|
||||
inputs,
|
||||
drv.outputs))
|
||||
{
|
||||
auto json = structAttrs.value();
|
||||
structuredAttrsRC = writeStructuredAttrsShell(json);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue