diff options
author | Maximilian Bosch <maximilian@mbosch.me> | 2021-06-24 15:06:07 +0200 |
---|---|---|
committer | Maximilian Bosch <maximilian@mbosch.me> | 2021-06-24 15:25:21 +0200 |
commit | 644415d3912633773d2c8f219572fbfa452f4b56 (patch) | |
tree | e2a3fe59fdefd876cec6f8ff0fbb393dca2d04be /src/libstore/parsed-derivations.cc | |
parent | 6f206549ba02c6f9bdbf9707bba9193a1d82e822 (diff) |
Perform input rewrites only in LocalDerivationGoal
Diffstat (limited to 'src/libstore/parsed-derivations.cc')
-rw-r--r-- | src/libstore/parsed-derivations.cc | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/src/libstore/parsed-derivations.cc b/src/libstore/parsed-derivations.cc index f021e4de3..ee6bbb045 100644 --- a/src/libstore/parsed-derivations.cc +++ b/src/libstore/parsed-derivations.cc @@ -124,7 +124,7 @@ bool ParsedDerivation::substitutesAllowed() const } static std::regex shVarName("[A-Za-z_][A-Za-z0-9_]*"); -std::optional<nlohmann::json> ParsedDerivation::prepareStructuredAttrs(std::optional<StringMap> inputRewrites, Store & store, const StorePathSet & inputPaths) +std::optional<nlohmann::json> ParsedDerivation::prepareStructuredAttrs(Store & store, const StorePathSet & inputPaths) { auto structuredAttrs = getStructuredAttrs(); if (!structuredAttrs) return std::nullopt; @@ -134,14 +134,7 @@ std::optional<nlohmann::json> ParsedDerivation::prepareStructuredAttrs(std::opti /* Add an "outputs" object containing the output paths. */ nlohmann::json outputs; for (auto & i : drv.outputs) { - if (inputRewrites) { - /* The placeholder must have a rewrite, so we use it to cover both the - cases where we know or don't know the output path ahead of time. */ - outputs[i.first] = rewriteStrings(hashPlaceholder(i.first), inputRewrites.value()); - } else { - /* This case is only relevant for the nix-shell */ - outputs[i.first] = hashPlaceholder(i.first); - } + outputs[i.first] = hashPlaceholder(i.first); } json["outputs"] = outputs; |