From 9dd5dc57a77b1b592708a6d27fef081be0b06fa8 Mon Sep 17 00:00:00 2001 From: volth Date: Fri, 12 Oct 2018 00:45:59 +0000 Subject: [PATCH 1/2] bootStage1: fix cross build --- nixos/modules/system/boot/stage-1.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nixos/modules/system/boot/stage-1.nix b/nixos/modules/system/boot/stage-1.nix index f58b68cb335..8688b5ad9bf 100644 --- a/nixos/modules/system/boot/stage-1.nix +++ b/nixos/modules/system/boot/stage-1.nix @@ -251,7 +251,8 @@ let postInstall = '' echo checking syntax # check both with bash - ${pkgs.bash}/bin/sh -n $target + ${pkgs.buildPackages.bash}/bin/sh -n $target + '' + optionalString (pkgs.stdenv.hostPlatform == pkgs.stdenv.buildPlatform) '' # and with ash shell, just in case ${extraUtils}/bin/ash -n $target ''; From b3dff39105beb0190d9a576afba95cd2a6903540 Mon Sep 17 00:00:00 2001 From: volth Date: Fri, 12 Oct 2018 09:24:00 +0000 Subject: [PATCH 2/2] bootStage1: fix cross build (@matthewbauer's solution) --- nixos/modules/system/boot/stage-1.nix | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/nixos/modules/system/boot/stage-1.nix b/nixos/modules/system/boot/stage-1.nix index 8688b5ad9bf..f4cf9753c0a 100644 --- a/nixos/modules/system/boot/stage-1.nix +++ b/nixos/modules/system/boot/stage-1.nix @@ -252,9 +252,8 @@ let echo checking syntax # check both with bash ${pkgs.buildPackages.bash}/bin/sh -n $target - '' + optionalString (pkgs.stdenv.hostPlatform == pkgs.stdenv.buildPlatform) '' # and with ash shell, just in case - ${extraUtils}/bin/ash -n $target + ${pkgs.buildPackages.busybox}/bin/ash -n $target ''; inherit udevRules extraUtils modulesClosure;