From 876e7e2883db6184104c29cfa70873310ffcac18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Sat, 8 May 2021 12:22:30 +0200 Subject: [PATCH] maintainers/build: enable cross builds --- maintainers/scripts/build.nix | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/maintainers/scripts/build.nix b/maintainers/scripts/build.nix index bc4355d0aa8e..ca401700b4a6 100644 --- a/maintainers/scripts/build.nix +++ b/maintainers/scripts/build.nix @@ -1,10 +1,18 @@ -{ maintainer }: +{ maintainer +, localSystem ? { system = args.system or builtins.currentSystem; } +, system ? localSystem.system +, crossSystem ? localSystem +, ... +}@args: # based on update.nix # nix-build build.nix --argstr maintainer +# to build for aarch64-linux using boot.binfmt.emulatedSystems: +# nix-build build.nix --argstr maintainer --argstr system aarch64-linux + let - pkgs = import ./../../default.nix {}; + pkgs = import ./../../default.nix (removeAttrs args [ "maintainer" ]); maintainer_ = pkgs.lib.maintainers.${maintainer}; packagesWith = cond: return: set: (pkgs.lib.flatten