nix edit: Support non-derivation attributes

E.g.

  $ nix edit .#nixosConfigurations.bla

now works.

(cherry picked from commit d2032edb2f)
This commit is contained in:
Eelco Dolstra
2020-03-24 14:06:47 +01:00
parent c1ca4f0acc
commit 231a8aa2c2
6 changed files with 18 additions and 16 deletions
+2 -7
View File
@@ -3,17 +3,12 @@
#include "args.hh"
#include "common-eval-args.hh"
#include "path.hh"
#include "eval.hh"
namespace nix {
extern std::string programPath;
struct Value;
class Bindings;
class EvalState;
struct Pos;
class Store;
/* A command that requires a Nix store. */
struct StoreCommand : virtual Command
{
@@ -48,7 +43,7 @@ struct Installable
Buildable toBuildable();
virtual Value * toValue(EvalState & state)
virtual std::pair<Value *, Pos> toValue(EvalState & state)
{
throw Error("argument '%s' cannot be evaluated", what());
}