From 18d582f96bb8c4351ca3e698c5d192d531883c02 Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Mon, 16 Oct 2023 14:29:56 +0100 Subject: feat(third_party/nixpkgs): allow setting crossSystem This allows cross-compiling depot targets to other architectures, so `nix-build --argstr crossSystem aarch64-linux -A tvix.nar-bridge` will emit a cross-compiled aarch64-linux binary. There's still some other cross-related issues in crate2nix to sort out for crate2nix builds, but this CL can already land. Co-Authored-By: raitobezarius Change-Id: I467d49d125dd707a4142bfde18eea4a1c3afaf70 Reviewed-on: https://cl.tvl.fyi/c/depot/+/9755 Reviewed-by: raitobezarius Tested-by: BuildkiteCI --- third_party/nixpkgs/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'third_party') diff --git a/third_party/nixpkgs/default.nix b/third_party/nixpkgs/default.nix index 3fc2aaf7a8fd..84bd500cbf7f 100644 --- a/third_party/nixpkgs/default.nix +++ b/third_party/nixpkgs/default.nix @@ -12,6 +12,7 @@ , externalArgs ? { } , depotOverlays ? true , localSystem ? externalArgs.localSystem or builtins.currentSystem +, crossSystem ? externalArgs.crossSystem or localSystem , ... }: @@ -31,7 +32,7 @@ let checkMeta = false; }; - inherit localSystem; + inherit localSystem crossSystem; }; # import the nixos-unstable package set, or optionally use the -- cgit 1.4.1