feat(nix/readTree): Handle a builtins w/o scopedImport
We (might) not want to implement scopedImport in tvix given it's considered a bit of a misfeature; this makes readTree work with a `builtins` set that doesn't have it (and if we decide we do want tvix to have scopedImport, we can revert this pretty easily). Change-Id: Ia3bbc847514672063a607d977ce167d489fa1131 Reviewed-on: https://cl.tvl.fyi/c/depot/+/6915 Reviewed-by: sterni <sternenseemann@systemli.org> Reviewed-by: tazjin <tazjin@tvl.su> Autosubmit: grfn <grfn@gws.fyi> Tested-by: BuildkiteCI
This commit is contained in:
parent
2ca153141d
commit
b0547ccfa5
1 changed files with 1 additions and 1 deletions
|
@ -80,7 +80,7 @@ let
|
||||||
importFile = args: scopedArgs: path: parts: filter:
|
importFile = args: scopedArgs: path: parts: filter:
|
||||||
let
|
let
|
||||||
importedFile =
|
importedFile =
|
||||||
if scopedArgs != { }
|
if scopedArgs != { } && builtins ? scopedImport # For tvix
|
||||||
then builtins.scopedImport scopedArgs path
|
then builtins.scopedImport scopedArgs path
|
||||||
else import path;
|
else import path;
|
||||||
pathType = builtins.typeOf importedFile;
|
pathType = builtins.typeOf importedFile;
|
||||||
|
|
Loading…
Reference in a new issue