mirror of
https://github.com/NixOS/nix.git
synced 2025-11-14 22:42:41 +01:00
DerivationBuilderImpl::writeStructuredAttrs remove a rewrite
As much as I prefer rewriting the parsed rather than unparsed JSON for elegance, this gets in the way of the separation of concerns that I am trying to do. As a practical matter, any rewriting that this did will also be done by the second round of rewriting that remains below, so removing this code should have no effect.
This commit is contained in:
parent
2767ae35d9
commit
92b10cf3f5
1 changed files with 0 additions and 8 deletions
|
|
@ -1106,14 +1106,6 @@ void DerivationBuilderImpl::writeStructuredAttrs()
|
|||
{
|
||||
if (drv.structuredAttrs) {
|
||||
auto json = drv.structuredAttrs->prepareStructuredAttrs(store, drvOptions, inputPaths, drv.outputs);
|
||||
nlohmann::json rewritten;
|
||||
for (auto & [i, v] : json["outputs"].get<nlohmann::json::object_t>()) {
|
||||
/* 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. */
|
||||
rewritten[i] = rewriteStrings((std::string) v, inputRewrites);
|
||||
}
|
||||
|
||||
json["outputs"] = rewritten;
|
||||
|
||||
auto jsonSh = StructuredAttrs::writeShell(json);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue