about summary refs log tree commit diff
path: root/src/nix-instantiate
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2011-12-01T16·41+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2011-12-01T16·41+0000
commitb12b21825c949ef9b9327c6a0c9e2d5601aaf0b2 (patch)
treead58ff48bd39e25f3ea67c96a00a510b40fb7a77 /src/nix-instantiate
parent23c38a04ccba4469b9aa98167532c236beeee0a0 (diff)
* Allow '<nixexpr>' syntax to be used in nix-instantiate, nix-build
  and nix-env, e.g.,

  $ nix-env -f '<nixpkgs>' -i patchelf

  or

  $ nix-build '<nixos/tests>' -A login.test

Diffstat (limited to 'src/nix-instantiate')
-rw-r--r--src/nix-instantiate/nix-instantiate.cc3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/nix-instantiate/nix-instantiate.cc b/src/nix-instantiate/nix-instantiate.cc
index 98eadbd69580..93aa50943450 100644
--- a/src/nix-instantiate/nix-instantiate.cc
+++ b/src/nix-instantiate/nix-instantiate.cc
@@ -138,8 +138,7 @@ void run(Strings args)
     }
 
     foreach (Strings::iterator, i, files) {
-        Path path = absPath(*i);
-        Expr * e = state.parseExprFromFile(path);
+        Expr * e = state.parseExprFromFile(lookupFileArg(state, *i));
         processExpr(state, attrPaths, parseOnly, strict, autoArgs,
             evalOnly, xmlOutput, xmlOutputSourceLocation, e);
     }