feat(readTree): Support scoped import arguments
This makes it possible to override Nix builtins within a readTree structure. Why would you want to do that, you might ask? Well ... Change-Id: Icc9cb32e5db4a2eba370cf81769c642d237d4937 Reviewed-on: https://cl.tvl.fyi/c/depot/+/3499 Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org>
This commit is contained in:
parent
aedde913d1
commit
b1f4b530ec
2 changed files with 15 additions and 9 deletions
|
|
@ -77,6 +77,9 @@ the tree as empty nodes (`{}`).
|
|||
* `filter`: (optional) A function to filter the argument set on each
|
||||
import based on the location in the tree. This can be used to, for
|
||||
example, implement a "visibility" system inside of a tree.
|
||||
* `scopedArgs`: (optional) An argument set that is passed to all
|
||||
imported files via `builtins.scopedImport`. This will forcefully
|
||||
override the given values in the import scope, use with care!
|
||||
|
||||
The package headers in this repository follow the form `{ pkgs, ... }:` where
|
||||
`pkgs` is a fixed-point of the entire package tree (see the `default.nix` at the
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue