From 2603855a470355664024a01a75a92850bc4fd2af Mon Sep 17 00:00:00 2001 From: Samuel Dionne-Riel Date: Thu, 14 Nov 2019 17:45:06 -0500 Subject: [PATCH] Auto-detects the need to cross-compile. --- default.nix | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/default.nix b/default.nix index b67e33b..ab0e80d 100644 --- a/default.nix +++ b/default.nix @@ -1,9 +1,14 @@ { - pkgs ? import {} + pkgs' ? import {} }: 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 {};