1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-25 10:41:16 +02:00

Pass tmpDirInSandbox to the builtin builders

This commit is contained in:
Eelco Dolstra 2025-05-01 17:49:58 +02:00
parent fe0124fe17
commit c7a84b9160
2 changed files with 5 additions and 1 deletions

View file

@ -11,6 +11,7 @@ struct BuiltinBuilderContext
std::map<std::string, Path> outputs; std::map<std::string, Path> outputs;
std::string netrcData; std::string netrcData;
std::string caFileData; std::string caFileData;
Path tmpDirInSandbox;
}; };
using BuiltinBuilder = std::function<void(const BuiltinBuilderContext &)>; using BuiltinBuilder = std::function<void(const BuiltinBuilderContext &)>;

View file

@ -1860,7 +1860,10 @@ void DerivationBuilderImpl::runChild()
/* Make the contents of netrc and the CA certificate bundle /* Make the contents of netrc and the CA certificate bundle
available to builtin:fetchurl (which may run under a available to builtin:fetchurl (which may run under a
different uid and/or in a sandbox). */ different uid and/or in a sandbox). */
BuiltinBuilderContext ctx{.drv = drv}; BuiltinBuilderContext ctx{
.drv = drv,
.tmpDirInSandbox = tmpDirInSandbox,
};
if (drv.isBuiltin() && drv.builder == "builtin:fetchurl") { if (drv.isBuiltin() && drv.builder == "builtin:fetchurl") {
try { try {