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-06T14·03+0200
committerEelco Dolstra <edolstra@gmail.com>2017-09-06T14·03+0200
commitdf4342bc175a153986ebcf5bce2a758d5353adeb (patch)
treed491cac5bd1c4d45c689fd1a19c98958c32e9674 /src/nix/command.hh
parent1277aab219c83beae856024eea6e868677f7523b (diff)
nix build: Create result symlinks
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;