mirror of
https://github.com/NixOS/nix.git
synced 2025-11-14 22:42:41 +01: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
|
|
@ -116,7 +116,7 @@ DerivationOptions DerivationOptions::fromParsedDerivation(const ParsedDerivation
|
|||
.passAsFile =
|
||||
[&] {
|
||||
StringSet res;
|
||||
if (auto * passAsFileString = get(parsed.drv.env, "passAsFile")) {
|
||||
if (auto * passAsFileString = get(parsed.env, "passAsFile")) {
|
||||
if (parsed.hasStructuredAttrs()) {
|
||||
if (shouldWarn) {
|
||||
warn(
|
||||
|
|
@ -140,7 +140,7 @@ DerivationOptions DerivationOptions::fromParsedDerivation(const ParsedDerivation
|
|||
ret.insert_or_assign(key, storePathsJson);
|
||||
}
|
||||
} else {
|
||||
auto s = getOr(parsed.drv.env, "exportReferencesGraph", "");
|
||||
auto s = getOr(parsed.env, "exportReferencesGraph", "");
|
||||
Strings ss = tokenizeString<Strings>(s);
|
||||
if (ss.size() % 2 != 0)
|
||||
throw BuildError("odd number of tokens in 'exportReferencesGraph': '%1%'", s);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue