about summary refs log tree commit diff
path: root/src/nix/command.hh
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2017-07-14T15·10+0200
committerEelco Dolstra <edolstra@gmail.com>2017-07-14T16·29+0200
commitfdc9da034fd7e0cb9c5275209d991ed6ca38f1cc (patch)
tree43b8592e523540b47c9b80e1bb0c83178c408437 /src/nix/command.hh
parent3908d3929ceb07cee5983fa647817f0e7aecbd97 (diff)
Avoid a call to derivationFromPath()
This doesn't work in read-only mode, ensuring that operations like

  nix path-info --store https://cache.nixos.org -S nixpkgs.hello

(asking for the closure size of nixpkgs.hello in cache.nixos.org) work
when nixpkgs.hello doesn't exist in the local store.
Diffstat (limited to 'src/nix/command.hh')
-rw-r--r--src/nix/command.hh5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/nix/command.hh b/src/nix/command.hh
index eb736ce3a3e4..ae7709b5dc83 100644
--- a/src/nix/command.hh
+++ b/src/nix/command.hh
@@ -44,11 +44,14 @@ private:
     std::shared_ptr<Store> _store;
 };
 
+struct Whence { std::string outputName; Path drvPath; };
+typedef std::map<Path, Whence> Buildables;
+
 struct Installable
 {
     virtual std::string what() = 0;
 
-    virtual PathSet toBuildable()
+    virtual Buildables toBuildable()
     {
         throw Error("argument ‘%s’ cannot be built", what());
     }