about summary refs log tree commit diff
path: root/src/nix/command.hh
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2017-09-10T13·58+0200
committerEelco Dolstra <edolstra@gmail.com>2017-09-10T20·40+0200
commitad228d84e56aeb1b5f77ae3bd3f8272f00782a8c (patch)
tree00e47bf7501c2c95e3790ac4a28e2abb27051c74 /src/nix/command.hh
parent3ed8290e5331011609de462bda67857837998583 (diff)
nix build: Only download the requested derivation outputs
Also some refactoring.
Diffstat (limited to 'src/nix/command.hh')
-rw-r--r--src/nix/command.hh21
1 files changed, 15 insertions, 6 deletions
diff --git a/src/nix/command.hh b/src/nix/command.hh
index b052c42b1de7..182b01ef92e3 100644
--- a/src/nix/command.hh
+++ b/src/nix/command.hh
@@ -93,6 +93,8 @@ private:
     Value * vSourceExpr = 0;
 };
 
+enum RealiseMode { Build, NoBuild, DryRun };
+
 /* A command that operates on a list of "installables", which can be
    store paths, attribute paths, Nix expressions, etc. */
 struct InstallablesCommand : virtual Args, SourceExprCommand
@@ -104,12 +106,6 @@ struct InstallablesCommand : virtual Args, SourceExprCommand
         expectArgs("installables", &_installables);
     }
 
-    enum RealiseMode { Build, NoBuild, DryRun };
-
-    Buildables toBuildables(ref<Store> store, RealiseMode mode);
-
-    PathSet toStorePaths(ref<Store> store, RealiseMode mode);
-
     void prepare() override;
 
     virtual bool useDefaultInstallables() { return true; }
@@ -198,4 +194,17 @@ struct RegisterCommand
     }
 };
 
+std::shared_ptr<Installable> parseInstallable(
+    SourceExprCommand & cmd, ref<Store> store, const std::string & installable,
+    bool useDefaultInstallables);
+
+Buildables toBuildables(ref<Store> store, RealiseMode mode,
+    std::vector<std::shared_ptr<Installable>> installables);
+
+PathSet toStorePaths(ref<Store> store, RealiseMode mode,
+    std::vector<std::shared_ptr<Installable>> installables);
+
+Path toStorePath(ref<Store> store, RealiseMode mode,
+    std::shared_ptr<Installable> installable);
+
 }