7 expectedArch ? stdenv.hostPlatform.parsed.cpu.name,
10 runCommand "make-binary-wrapper-test-cross"
16 # For x86_64-linux the machine field is
17 # Advanced Micro Devices X86-64
18 # and uses a dash instead of a underscore unlike x86_64-linux in hostPlatform.parsed.cpu.name
19 expectedArch = lib.replaceStrings [ "_" ] [ "-" ] expectedArch;
25 read -r _ arch < <($READELF --file-header $out | grep Machine:)
26 if [[ ''${arch,,} != *"''${expectedArch,,}"* ]]; then
27 echo "expected $expectedArch, got $arch"