diff options
author | Shea Levy <shea@shealevy.com> | 2018-02-27 21:05:41 -0500 |
---|---|---|
committer | Shea Levy <shea@shealevy.com> | 2018-02-28 15:01:32 -0500 |
commit | b28cb729080e42fc9f8cc7ae29f1c1d8070b5d5a (patch) | |
tree | cc830431351bc6332063ca666057db9c1cae4a85 /nixos/modules/system/boot/stage-1.nix | |
parent | aebb024b2f35d826f99d3e97caeff8522ff6e3c7 (diff) | |
download | nixlib-b28cb729080e42fc9f8cc7ae29f1c1d8070b5d5a.tar nixlib-b28cb729080e42fc9f8cc7ae29f1c1d8070b5d5a.tar.gz nixlib-b28cb729080e42fc9f8cc7ae29f1c1d8070b5d5a.tar.bz2 nixlib-b28cb729080e42fc9f8cc7ae29f1c1d8070b5d5a.tar.lz nixlib-b28cb729080e42fc9f8cc7ae29f1c1d8070b5d5a.tar.xz nixlib-b28cb729080e42fc9f8cc7ae29f1c1d8070b5d5a.tar.zst nixlib-b28cb729080e42fc9f8cc7ae29f1c1d8070b5d5a.zip |
nixos: stage-1: Don't try to test binaries when cross-compiling.
Diffstat (limited to 'nixos/modules/system/boot/stage-1.nix')
-rw-r--r-- | nixos/modules/system/boot/stage-1.nix | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/nixos/modules/system/boot/stage-1.nix b/nixos/modules/system/boot/stage-1.nix index df450be8c401..c23b54ee65f9 100644 --- a/nixos/modules/system/boot/stage-1.nix +++ b/nixos/modules/system/boot/stage-1.nix @@ -37,7 +37,7 @@ let # we just copy what we need from Glibc and use patchelf to make it # work. extraUtils = pkgs.runCommandCC "extra-utils" - { buildInputs = [pkgs.nukeReferences]; + { nativeBuildInputs = [pkgs.buildPackages.nukeReferences]; allowedReferences = [ "out" ]; # prevent accidents like glibc being included in the initrd } '' @@ -132,6 +132,7 @@ let fi done + if [ -z "${toString pkgs.stdenv.isCross}" ]; then # Make sure that the patchelf'ed binaries still work. echo "testing patched programs..." $out/bin/ash -c 'echo hello world' | grep "hello world" @@ -144,6 +145,7 @@ let $out/bin/mdadm --version ${config.boot.initrd.extraUtilsCommandsTest} + fi ''; # */ |