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:
parent
3908d3929c
commit
fdc9da034f
3 changed files with 29 additions and 28 deletions
|
|
@ -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());
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue