Auto-detects the need to cross-compile.

This commit is contained in:
Samuel Dionne-Riel 2019-11-14 17:45:06 -05:00
parent d611cf7fef
commit 2603855a47
1 changed files with 7 additions and 2 deletions

View File

@ -1,9 +1,14 @@
{
pkgs ? import <nixpkgs> {}
pkgs' ? import <nixpkgs> {}
}:
let
inherit (pkgs.pkgsCross.aarch64-multiplatform) callPackage;
pkgs = if builtins.currentSystem == "aarch64-linux"
then pkgs'
else pkgs'.pkgsCross.aarch64-multiplatform
;
inherit (pkgs) callPackage;
in
{
u-boot = callPackage ./u-boot.nix {};