about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2017-05-24T09·33+0200
committerEelco Dolstra <edolstra@gmail.com>2017-05-24T09·33+0200
commita7e55151a8d45d987ca42ba318c44ed3ccdeecca (patch)
tree16ceef71cdb2068f0f046922784665a77a227a78 /src
parentfbe9fe0e7504d2f00eda3971ecd4997e43e3784d (diff)
Fix #1314
Also, make nix-shell respect --option. (Previously it only passed it
along to nix-instantiate and nix-build.)
Diffstat (limited to 'src')
-rwxr-xr-xsrc/nix-build/nix-build.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/nix-build/nix-build.cc b/src/nix-build/nix-build.cc
index 7167e96f11d3..42d68fdfdd70 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<StringSet>(get(drv.env, "passAsFile", ""));