1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-07 06:01:48 +02:00

Prefix env vars for attrs.* files with NIX_

This commit is contained in:
Maximilian Bosch 2021-06-22 19:45:08 +02:00
parent a92245b110
commit 27ce722638
No known key found for this signature in database
GPG key ID: 091DBF4D1FC46B8E
5 changed files with 7 additions and 7 deletions

View file

@ -1092,10 +1092,10 @@ void LocalDerivationGoal::writeStructuredAttrs()
writeFile(tmpDir + "/.attrs.sh", rewriteStrings(jsonSh, inputRewrites));
chownToBuilder(tmpDir + "/.attrs.sh");
env["ATTRS_SH_FILE"] = tmpDir + "/.attrs.sh";
env["NIX_ATTRS_SH_FILE"] = tmpDir + "/.attrs.sh";
writeFile(tmpDir + "/.attrs.json", rewriteStrings(json.dump(), inputRewrites));
chownToBuilder(tmpDir + "/.attrs.json");
env["ATTRS_JSON_FILE"] = tmpDir + "/.attrs.json";
env["NIX_ATTRS_JSON_FILE"] = tmpDir + "/.attrs.json";
}
}

View file

@ -454,8 +454,8 @@ static void main_nix_build(int argc, char * * argv)
auto attrsSH = (Path) tmpDir + "/.attrs.sh";
writeFile(attrsSH, structuredAttrsRC);
env["ATTRS_SH_FILE"] = attrsSH;
env["ATTRS_JSON_FILE"] = attrsJSON;
env["NIX_ATTRS_SH_FILE"] = attrsSH;
env["NIX_ATTRS_JSON_FILE"] = attrsJSON;
keepTmp = true;
}
}