From b0547ccfa5e74cf21e813cd18f64ef62f1bf3734 Mon Sep 17 00:00:00 2001 From: Griffin Smith Date: Sun, 9 Oct 2022 22:04:37 -0400 Subject: 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 Reviewed-by: tazjin Autosubmit: grfn Tested-by: BuildkiteCI --- nix/readTree/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'nix/readTree') diff --git a/nix/readTree/default.nix b/nix/readTree/default.nix index ba3363d8d6..e243e85517 100644 --- a/nix/readTree/default.nix +++ b/nix/readTree/default.nix @@ -80,7 +80,7 @@ let importFile = args: scopedArgs: path: parts: filter: let importedFile = - if scopedArgs != { } + if scopedArgs != { } && builtins ? scopedImport # For tvix then builtins.scopedImport scopedArgs path else import path; pathType = builtins.typeOf importedFile; -- cgit 1.4.1