From 57040cc3eb10116805f6c2ff8f4c951ba11e6c59 Mon Sep 17 00:00:00 2001 From: Artturin Date: Fri, 15 Sep 2023 08:47:42 +0300 Subject: [PATCH] tests.makeBinaryWrapper: fix cross test on aarch64-linux --- pkgs/test/make-binary-wrapper/cross.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pkgs/test/make-binary-wrapper/cross.nix b/pkgs/test/make-binary-wrapper/cross.nix index 36758086b92b2..64912364b863b 100644 --- a/pkgs/test/make-binary-wrapper/cross.nix +++ b/pkgs/test/make-binary-wrapper/cross.nix @@ -2,15 +2,20 @@ , runCommand , makeBinaryWrapper , binutils +, lib , expectedArch ? stdenv.hostPlatform.parsed.cpu.name }: + runCommand "make-binary-wrapper-test-cross" { nativeBuildInputs = [ makeBinaryWrapper binutils ]; - inherit expectedArch; + # For x86_64-linux the machine field is + # Advanced Micro Devices X86-64 + # and uses a dash instead of a underscore unlike x86_64-linux in hostPlatform.parsed.cpu.name + expectedArch = lib.replaceStrings ["_"] ["-"] expectedArch; } '' touch prog chmod +x prog