feat(nix/readTree): allow arguments to depend on tree location

This accepts a function for args, and passes it an attrset containing
the locatedAt parameter.

Change-Id: I3c0f8ca00605e02a787fda88f32b06f5ef9998f2
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1639
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
This commit is contained in:
edef 2020-08-04 08:50:10 +00:00
parent 1c96e14174
commit 58e3608e25

View file

@ -17,9 +17,9 @@ let
readDir readDir
substring; substring;
argsWithPath = parts: args // { argsWithPath = parts:
locatedAt = parts; let meta.locatedAt = parts;
}; in meta // (if isAttrs args then args else args meta);
readDirVisible = path: readDirVisible = path:
let let