aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/libstore/build.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/libstore/build.cc b/src/libstore/build.cc
index 523d737d9..55066205d 100644
--- a/src/libstore/build.cc
+++ b/src/libstore/build.cc
@@ -2933,8 +2933,13 @@ void DerivationGoal::runChild()
if (drv->isBuiltin()) {
try {
logger = makeJSONLogger(*logger);
+
+ BasicDerivation drv2(*drv);
+ for (auto & e : drv2.env)
+ e.second = rewriteStrings(e.second, inputRewrites);
+
if (drv->builder == "builtin:fetchurl")
- builtinFetchurl(*drv, netrcData);
+ builtinFetchurl(drv2, netrcData);
else
throw Error(format("unsupported builtin function '%1%'") % string(drv->builder, 8));
_exit(0);