lix/src/libexpr
Eelco Dolstra 62a6eeb1f3 Make the Nix search path declarative
Nix search path lookups like <nixpkgs> are now desugared to ‘findFile
nixPath <nixpkgs>’, where ‘findFile’ is a new primop. Thus you can
override the search path simply by saying

  let
    nixPath = [ { prefix = "nixpkgs"; path = "/my-nixpkgs"; } ];
  in ... <nixpkgs> ...

In conjunction with ‘scopedImport’ (commit
c273c15cb1), the Nix search path can be
propagated across imports, e.g.

  let

    overrides = {
      nixPath = [ ... ] ++ builtins.nixPath;
      import = fn: scopedImport overrides fn;
      scopedImport = attrs: fn: scopedImport (overrides // attrs) fn;
      builtins = builtins // overrides;
    };

  in scopedImport overrides ./nixos
2014-05-26 17:02:22 +02:00
..
attr-path.cc Support quoted attribute names in -A 2013-11-18 10:21:12 +00:00
attr-path.hh Work on Values instead of Exprs 2013-09-03 13:17:51 +00:00
common-opts.cc Make the Nix search path declarative 2014-05-26 17:02:22 +02:00
common-opts.hh Ensure that -I flags get included in nixPath 2014-05-26 16:52:31 +02:00
eval-inline.hh forceAttrs: Show position info 2014-04-04 19:11:40 +02:00
eval.cc Ensure that -I flags get included in nixPath 2014-05-26 16:52:31 +02:00
eval.hh Make the Nix search path declarative 2014-05-26 17:02:22 +02:00
get-drvs.cc Show position info in string concatenation / addition errors 2014-04-04 22:19:33 +02:00
get-drvs.hh Drop pointless #include 2014-03-29 22:20:33 +01:00
lexer.l Allow "bare" dynamic attrs 2014-01-14 14:00:15 +01:00
local.mk lexer-tab.o and parser-tab.o require each other's headers 2014-02-18 17:31:30 +01:00
names.cc nix-env: Use wildcard match by default 2013-09-03 16:35:49 +02:00
names.hh Use "#pragma once" to prevent repeated header file inclusion 2012-07-18 14:59:03 -04:00
nix.sdf First attempt to update Nix SDF grammar to match the actual bison grammar 2008-06-04 14:36:46 +00:00
nixexpr.cc forceString: Show position info 2014-04-04 21:14:11 +02:00
nixexpr.hh Make the Nix search path declarative 2014-05-26 17:02:22 +02:00
parser.y Make the Nix search path declarative 2014-05-26 17:02:22 +02:00
primops.cc Make the Nix search path declarative 2014-05-26 17:02:22 +02:00
symbol-table.hh Rename "attribute sets" to "sets" 2013-10-24 16:41:04 +02:00
value-to-json.cc Refactor JSON output 2013-11-19 00:33:06 +01:00
value-to-json.hh Refactor JSON output 2013-11-19 00:33:06 +01:00
value-to-xml.cc Fix compilation on FreeBSD 2012-03-05 22:04:40 +01:00
value-to-xml.hh Use "#pragma once" to prevent repeated header file inclusion 2012-07-18 14:59:03 -04:00
value.hh Fix some clang warnings 2014-01-21 18:29:55 +01:00