about summary refs log tree commit diff
path: root/src/nix-store
diff options
context:
space:
mode:
Diffstat (limited to 'src/nix-store')
-rw-r--r--src/nix-store/main.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/nix-store/main.cc b/src/nix-store/main.cc
index 12b61c76f787..7c86395a640d 100644
--- a/src/nix-store/main.cc
+++ b/src/nix-store/main.cc
@@ -32,10 +32,11 @@ static void opBuild(Strings opFlags, Strings opArgs)
 {
     if (!opFlags.empty()) throw UsageError("unknown flag");
 
+    buildDerivations(PathSet(opArgs.begin(), opArgs.end()));
+
     for (Strings::iterator i = opArgs.begin();
          i != opArgs.end(); i++)
     {
-        buildDerivation(*i);
         Derivation drv = derivationFromPath(*i);
         cout << format("%1%\n") % findOutput(drv, "out");
     }