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