diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2014-05-26T15·02+0200 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2014-05-26T15·02+0200 |
commit | 62a6eeb1f3da0a5954ad2da54c454eb7fc1c6e5d (patch) | |
tree | cb1fec96ce5ae6ad830a4afe65578210c0e1c778 /tests/lang/eval-okay-search-path.exp | |
parent | 39d72640c2459dc2fa689bfe8b756ee193f7b98a (diff) |
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 c273c15cb13bb86420dda1e5341a4e19517532b5), 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
Diffstat (limited to 'tests/lang/eval-okay-search-path.exp')
-rw-r--r-- | tests/lang/eval-okay-search-path.exp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/lang/eval-okay-search-path.exp b/tests/lang/eval-okay-search-path.exp index d0bc8c5e86b2..ad05904ba1f7 100644 --- a/tests/lang/eval-okay-search-path.exp +++ b/tests/lang/eval-okay-search-path.exp @@ -1 +1 @@ -"abcc" +"abcca" |