From a7e55151a8d45d987ca42ba318c44ed3ccdeecca Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 24 May 2017 11:33:42 +0200 Subject: [PATCH] Fix #1314 Also, make nix-shell respect --option. (Previously it only passed it along to nix-instantiate and nix-build.) --- src/nix-build/nix-build.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/nix-build/nix-build.cc b/src/nix-build/nix-build.cc index 7167e96f1..42d68fdfd 100755 --- a/src/nix-build/nix-build.cc +++ b/src/nix-build/nix-build.cc @@ -196,6 +196,7 @@ int main(int argc, char ** argv) buildArgs.push_back(arg); buildArgs.push_back(args[n + 1]); buildArgs.push_back(args[n + 2]); + settings.set(args[n + 1], args[n + 2]); n += 2; } @@ -407,7 +408,7 @@ int main(int argc, char ** argv) env["NIX_BUILD_TOP"] = env["TMPDIR"] = env["TEMPDIR"] = env["TMP"] = env["TEMP"] = tmp; env["NIX_STORE"] = store->storeDir; - env["NIX_BUILD_CORES"] = settings.buildCores; + env["NIX_BUILD_CORES"] = std::to_string(settings.buildCores); auto passAsFile = tokenizeString(get(drv.env, "passAsFile", ""));