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:
parent
1c96e14174
commit
58e3608e25
1 changed files with 3 additions and 3 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue