about summary refs log tree commit diff
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2021-09-08T15·28+0300
committertazjin <mail@tazj.in>2021-09-09T11·37+0000
commit8b4e0dbf2e336a3072508989207779e4de93bccd (patch)
tree88a51c3f25f57eaedeac068777bfef747e870ad9
parentb1f4b530ec1548d75c0e318fcdf90d33a373a5ca (diff)
feat(depot): Prevent imports from NIX_PATH within the depot r/2826
Provided without further comment.

Change-Id: I19d14530243c72d49b14526f769b964b06959db8
Reviewed-on: https://cl.tvl.fyi/c/depot/+/3500
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
Reviewed-by: grfn <grfn@gws.fyi>
-rw-r--r--default.nix3
1 files changed, 3 insertions, 0 deletions
diff --git a/default.nix b/default.nix
index bb9bc703bf2c..77fb4ae544b7 100644
--- a/default.nix
+++ b/default.nix
@@ -60,6 +60,9 @@ let
       args = depotArgs;
       path = ./.;
       filter = depotArgsFilter;
+      scopedArgs = {
+        __findFile = _: _: throw "Do not import from NIX_PATH in the depot!";
+      };
     };
 
   # To determine build targets, we walk through the depot tree and