1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-13 14:02:42 +01:00

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.
This commit is contained in:
Eelco Dolstra 2017-07-14 17:10:13 +02:00
parent 3908d3929c
commit fdc9da034f
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE
3 changed files with 29 additions and 28 deletions

View file

@ -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());
}