about summary refs log tree commit diff
path: root/src/nix/command.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/nix/command.hh')
-rw-r--r--src/nix/command.hh19
1 files changed, 14 insertions, 5 deletions
diff --git a/src/nix/command.hh b/src/nix/command.hh
index 479e6fd3742f..b052c42b1de7 100644
--- a/src/nix/command.hh
+++ b/src/nix/command.hh
@@ -44,18 +44,25 @@ private:
     std::shared_ptr<Store> _store;
 };
 
-struct Whence { std::string outputName; Path drvPath; };
-typedef std::map<Path, Whence> Buildables;
+struct Buildable
+{
+    Path drvPath; // may be empty
+    std::map<std::string, Path> outputs;
+};
+
+typedef std::vector<Buildable> Buildables;
 
 struct Installable
 {
     virtual std::string what() = 0;
 
-    virtual Buildables toBuildable(bool singular = false)
+    virtual Buildables toBuildables()
     {
         throw Error("argument '%s' cannot be built", what());
     }
 
+    Buildable toBuildable();
+
     virtual Value * toValue(EvalState & state)
     {
         throw Error("argument '%s' cannot be evaluated", what());
@@ -97,9 +104,11 @@ struct InstallablesCommand : virtual Args, SourceExprCommand
         expectArgs("installables", &_installables);
     }
 
-    enum ToStorePathsMode { Build, NoBuild, DryRun };
+    enum RealiseMode { Build, NoBuild, DryRun };
+
+    Buildables toBuildables(ref<Store> store, RealiseMode mode);
 
-    PathSet toStorePaths(ref<Store> store, ToStorePathsMode mode);
+    PathSet toStorePaths(ref<Store> store, RealiseMode mode);
 
     void prepare() override;