feat(tvix/eval): implement builtins.filterSource
We add a new set of builtins called `import_builtins`, which will contain import-related builtins, such as `builtins.path` and `builtins.filterSource`. Both can import paths into the store, with various knobs to alter the result, e.g. filtering, renaming, expected hashes. We introduce `filtered_ingest` which will drive the filtered ingestion via the Nix function via the generator machinery, and then we register the root node to the path info service inside the store. `builtins.filterSource` is very simple, `builtins.path` is a more complicated model requiring the same logic albeit more sophisticated with name customization, file ingestion method and expected SHA-256. Change-Id: I1083f37808b35f7b37818c8ffb9543d9682b2de2 Reviewed-on: https://cl.tvl.fyi/c/depot/+/10654 Autosubmit: raitobezarius <tvl@lahfa.xyz> Tested-by: BuildkiteCI Reviewed-by: flokli <flokli@flokli.de>
This commit is contained in:
parent
20833656ae
commit
7388078630
9 changed files with 521 additions and 69 deletions
|
@ -20,6 +20,7 @@ thiserror = "1.0.38"
|
|||
serde = "1.0.195"
|
||||
serde_json = "1.0"
|
||||
sha2 = "0.10.8"
|
||||
walkdir = "2.4.0"
|
||||
|
||||
[dependencies.wu-manber]
|
||||
git = "https://github.com/tvlfyi/wu-manber.git"
|
||||
|
@ -28,6 +29,7 @@ git = "https://github.com/tvlfyi/wu-manber.git"
|
|||
criterion = { version = "0.5", features = ["html_reports"] }
|
||||
hex-literal = "0.4.1"
|
||||
lazy_static = "1.4.0"
|
||||
nix = { version = "0.27.1", features = [ "fs" ] }
|
||||
pretty_assertions = "1.4.0"
|
||||
rstest = "0.18.2"
|
||||
tempfile = "3.8.1"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue