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";
|
||||
|
||||
/* Run the builder. */
|
||||
printMsg(lvlChatty, format("executing builder `%1%'") %
|
||||
drv.builder);
|
||||
string builder = rewriteHashes(drv.builder, rewrites);
|
||||
printMsg(lvlChatty, format("executing builder `%1%'") % builder);
|
||||
|
||||
/* Create the log file and pipe. */
|
||||
openLogFile();
|
||||
|
|
@ -1122,7 +1122,7 @@ void DerivationGoal::startBuilder()
|
|||
|
||||
/* Fill in the arguments. */
|
||||
Strings args(drv.args);
|
||||
args.push_front(baseNameOf(drv.builder));
|
||||
args.push_front(baseNameOf(builder));
|
||||
const char * * argArr = strings2CharPtrs(args);
|
||||
|
||||
/* Fill in the environment. */
|
||||
|
|
@ -1134,11 +1134,10 @@ void DerivationGoal::startBuilder()
|
|||
const char * * envArr = strings2CharPtrs(envStrs);
|
||||
|
||||
/* Execute the program. This should not return. */
|
||||
execve(drv.builder.c_str(),
|
||||
execve(builder.c_str(),
|
||||
(char * *) argArr, (char * *) envArr);
|
||||
|
||||
throw SysError(format("executing `%1%'")
|
||||
% drv.builder);
|
||||
throw SysError(format("executing `%1%'") % builder);
|
||||
|
||||
} catch (exception & e) {
|
||||
cerr << format("build error: %1%\n") % e.what();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue