maintainers/build: enable cross builds

This commit is contained in:
Robert Schütz 2021-05-08 12:22:30 +02:00 committed by Jonathan Ringer
parent 1887bf47dd
commit 876e7e2883

View file

@ -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 <yourname>
# to build for aarch64-linux using boot.binfmt.emulatedSystems:
# nix-build build.nix --argstr maintainer <yourname> --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