about summary refs log tree commit diff
path: root/default.nix
diff options
context:
space:
mode:
authorsterni <sternenseemann@systemli.org>2022-11-10T13·44+0100
committerclbot <clbot@tvl.fyi>2022-11-12T21·54+0000
commit28dacca91daab22fe27b9a849b7a21e07712579a (patch)
tree2cff1116a2895e5a161fe3f7ed10e12d1139fd82 /default.nix
parent350d60ea8ed1071ae74105120ee4811c04a40739 (diff)
feat: make builtins.currentSystem illegal in depot r/5280
Since cl/7260 has eliminated all uses of builtins.currentSystem
in the main evaluation path of depot, we can ensure that we use
localSystem consistently in the future by making it impossible
to access the value of builtins.currentSystem in readTree nodes.

Change-Id: I6ded54021c42fcf31a80268149179f95f22bad88
Reviewed-on: https://cl.tvl.fyi/c/depot/+/7261
Reviewed-by: tazjin <tazjin@tvl.su>
Autosubmit: sterni <sternenseemann@systemli.org>
Tested-by: BuildkiteCI
Diffstat (limited to 'default.nix')
-rw-r--r--default.nix3
1 files changed, 3 insertions, 0 deletions
diff --git a/default.nix b/default.nix
index f43e11bea3..640f6fda95 100644
--- a/default.nix
+++ b/default.nix
@@ -62,6 +62,9 @@ let
     filter = parts: args: corpFilter parts (usersFilter parts args);
     scopedArgs = {
       __findFile = _: _: throw "Do not import from NIX_PATH in the depot!";
+      builtins = builtins // {
+        currentSystem = throw "Use localSystem from the readTree args instead of builtins.currentSystem!";
+      };
     };
   };