about summary refs log tree commit diff
path: root/third_party/overlays/tvl.nix
diff options
context:
space:
mode:
authorsterni <sternenseemann@systemli.org>2022-11-10T13·18+0100
committerclbot <clbot@tvl.fyi>2022-11-12T21·54+0000
commit350d60ea8ed1071ae74105120ee4811c04a40739 (patch)
tree02093a7a46fb2ed52f6bb901256c554c998154c6 /third_party/overlays/tvl.nix
parentdde62055fe1755474b7e6b421145f2e7aa2f6690 (diff)
fix: use localSystem over builtins.currentSystem where appropriate r/5279
cl/5832 added a global system parameter to depot which allowed specifying
what `system` should be used for nixpkgs and all depot derivations
(assuming a native compilation case) which was implemented in cl/5846.
This allows instantiating derivations for a different system than
whatever builtins.currentSystem happens to be. This is useful for
debugging, allows you to schedule builds on build servers for
other platforms or build for architectures that are a subset of
the one you are running (e.g. i686-linux).

This change eliminates all remaining uses of builtins.currentSystem
which could lead to an inconsistent combination of `system` values
when passing `localSystem`.

Change-Id: I0f824f4f0afa88ef1ddd9a8cecb24bf94bacde7a
Reviewed-on: https://cl.tvl.fyi/c/depot/+/7260
Tested-by: BuildkiteCI
Reviewed-by: tazjin <tazjin@tvl.su>
Autosubmit: sterni <sternenseemann@systemli.org>
Diffstat (limited to 'third_party/overlays/tvl.nix')
-rw-r--r--third_party/overlays/tvl.nix6
1 files changed, 3 insertions, 3 deletions
diff --git a/third_party/overlays/tvl.nix b/third_party/overlays/tvl.nix
index 80f6f04fcf88..d0a0d5581cd5 100644
--- a/third_party/overlays/tvl.nix
+++ b/third_party/overlays/tvl.nix
@@ -1,6 +1,6 @@
 # This overlay is used to make TVL-specific modifications in the
 # nixpkgs tree, where required.
-{ depot, ... }:
+{ depot, localSystem, ... }:
 
 self: super:
 let
@@ -30,8 +30,8 @@ in
   nix = (import "${nixSrc}/release.nix" {
     nix = nixSrc;
     nixpkgs = super.path;
-    systems = [ builtins.currentSystem ];
-  }).build."${builtins.currentSystem}";
+    systems = [ localSystem ];
+  }).build."${localSystem}";
 
   nix_latest = super.nix;