about summary refs log tree commit diff
path: root/src/libexpr/eval.hh
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2016-08-23T15·11+0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2016-08-23T15·11+0200
commitd74236d1f2c3bca4fcc8cb1574fb962e813f69d3 (patch)
tree0ec4d387e04e9a79835efebd85753aeb5a00d251 /src/libexpr/eval.hh
parent22d6e31fc6a9de2ee424984e629ccd2e394ba512 (diff)
nix build: Use Nix search path
That is, unless --file is specified, the Nix search path is
synthesized into an attribute set. Thus you can say

  $ nix build nixpkgs.hello

assuming $NIX_PATH contains an entry of the form "nixpkgs=...". This
is more verbose than

  $ nix build hello

but is less ambiguous.
Diffstat (limited to 'src/libexpr/eval.hh')
-rw-r--r--src/libexpr/eval.hh6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/libexpr/eval.hh b/src/libexpr/eval.hh
index 80e369f2d6..47e4d99bf6 100644
--- a/src/libexpr/eval.hh
+++ b/src/libexpr/eval.hh
@@ -43,7 +43,7 @@ struct Env
 };
 
 
-void mkString(Value & v, const string & s, const PathSet & context = PathSet());
+Value & mkString(Value & v, const string & s, const PathSet & context = PathSet());
 
 void copyContext(const Value & v, PathSet & context);
 
@@ -108,6 +108,8 @@ public:
 
     void addToSearchPath(const string & s);
 
+    SearchPath getSearchPath() { return searchPath; }
+
     Path checkSourcePath(const Path & path);
 
     /* Parse a Nix expression from the specified file. */
@@ -204,7 +206,7 @@ private:
 
 public:
 
-    void getBuiltin(const string & name, Value & v);
+    Value & getBuiltin(const string & name);
 
 private: