mirror of
https://github.com/NixOS/nix.git
synced 2025-11-26 04:00:59 +01:00
* Doh! In addition to the environment variables and command-line
arguments we also have to rewrite the path to the builder.
This commit is contained in:
parent
94e3e4c69d
commit
367fe8f564
1 changed files with 5 additions and 6 deletions
|
|
@ -1095,8 +1095,8 @@ void DerivationGoal::startBuilder()
|
||||||
env["NIX_OUTPUT_CHECKED"] = "1";
|
env["NIX_OUTPUT_CHECKED"] = "1";
|
||||||
|
|
||||||
/* Run the builder. */
|
/* Run the builder. */
|
||||||
printMsg(lvlChatty, format("executing builder `%1%'") %
|
string builder = rewriteHashes(drv.builder, rewrites);
|
||||||
drv.builder);
|
printMsg(lvlChatty, format("executing builder `%1%'") % builder);
|
||||||
|
|
||||||
/* Create the log file and pipe. */
|
/* Create the log file and pipe. */
|
||||||
openLogFile();
|
openLogFile();
|
||||||
|
|
@ -1122,7 +1122,7 @@ void DerivationGoal::startBuilder()
|
||||||
|
|
||||||
/* Fill in the arguments. */
|
/* Fill in the arguments. */
|
||||||
Strings args(drv.args);
|
Strings args(drv.args);
|
||||||
args.push_front(baseNameOf(drv.builder));
|
args.push_front(baseNameOf(builder));
|
||||||
const char * * argArr = strings2CharPtrs(args);
|
const char * * argArr = strings2CharPtrs(args);
|
||||||
|
|
||||||
/* Fill in the environment. */
|
/* Fill in the environment. */
|
||||||
|
|
@ -1134,11 +1134,10 @@ void DerivationGoal::startBuilder()
|
||||||
const char * * envArr = strings2CharPtrs(envStrs);
|
const char * * envArr = strings2CharPtrs(envStrs);
|
||||||
|
|
||||||
/* Execute the program. This should not return. */
|
/* Execute the program. This should not return. */
|
||||||
execve(drv.builder.c_str(),
|
execve(builder.c_str(),
|
||||||
(char * *) argArr, (char * *) envArr);
|
(char * *) argArr, (char * *) envArr);
|
||||||
|
|
||||||
throw SysError(format("executing `%1%'")
|
throw SysError(format("executing `%1%'") % builder);
|
||||||
% drv.builder);
|
|
||||||
|
|
||||||
} catch (exception & e) {
|
} catch (exception & e) {
|
||||||
cerr << format("build error: %1%\n") % e.what();
|
cerr << format("build error: %1%\n") % e.what();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue