From 76e368a3b4b8d66b66c4a2a72016a2cc8a013a5c Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 14 Sep 2021 08:19:41 +0200 Subject: [PATCH] Fix macOS build --- src/libfetchers/git.cc | 2 +- src/libstore/build/local-derivation-goal.cc | 2 +- src/libutil/util.cc | 2 +- src/nix/repl.cc | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/libfetchers/git.cc b/src/libfetchers/git.cc index 9e895904e..5af38dde9 100644 --- a/src/libfetchers/git.cc +++ b/src/libfetchers/git.cc @@ -413,7 +413,7 @@ struct GitInputScheme : InputScheme AutoDelete delTmpDir(tmpDir, true); PathFilter filter = defaultPathFilter; - auto result = runProgram({ + auto result = runProgram(RunOptions { .program = "git", .args = { "-C", repoDir, "cat-file", "commit", input.getRev()->gitRev() }, .mergeStderrToStdout = true diff --git a/src/libstore/build/local-derivation-goal.cc b/src/libstore/build/local-derivation-goal.cc index 446c19ae0..518edae9c 100644 --- a/src/libstore/build/local-derivation-goal.cc +++ b/src/libstore/build/local-derivation-goal.cc @@ -66,7 +66,7 @@ void handleDiffHook( auto diffHook = settings.diffHook; if (diffHook != "" && settings.runDiffHook) { try { - auto diffRes = runProgram({ + auto diffRes = runProgram(RunOptions { .program = diffHook, .searchPath = true, .args = {tryA, tryB, drvPath, tmpDir}, diff --git a/src/libutil/util.cc b/src/libutil/util.cc index d2660a5d3..6c7f93d50 100644 --- a/src/libutil/util.cc +++ b/src/libutil/util.cc @@ -1037,7 +1037,7 @@ std::vector stringsToCharPtrs(const Strings & ss) string runProgram(Path program, bool searchPath, const Strings & args, const std::optional & input) { - auto res = runProgram({.program = program, .searchPath = searchPath, .args = args, .input = input}); + auto res = runProgram(RunOptions {.program = program, .searchPath = searchPath, .args = args, .input = input}); if (!statusOk(res.first)) throw ExecError(res.first, fmt("program '%1%' %2%", program, statusToString(res.first))); diff --git a/src/nix/repl.cc b/src/nix/repl.cc index abb10f674..b85ed9288 100644 --- a/src/nix/repl.cc +++ b/src/nix/repl.cc @@ -111,7 +111,7 @@ string runNix(Path program, const Strings & args, auto subprocessEnv = getEnv(); subprocessEnv["NIX_CONFIG"] = globalConfig.toKeyValue(); - auto res = runProgram({ + auto res = runProgram(RunOptions { .program = settings.nixBinDir+ "/" + program, .args = args, .environment = subprocessEnv,