about summary refs log tree commit diff
path: root/pkgs/test/make-binary-wrapper
diff options
context:
space:
mode:
authorArtturin <Artturin@artturin.com>2023-09-15 08:47:42 +0300
committerArtturin <Artturin@artturin.com>2023-09-15 08:48:31 +0300
commit57040cc3eb10116805f6c2ff8f4c951ba11e6c59 (patch)
treec6d29754eaae983e1b17783ca070ea78d70bd069 /pkgs/test/make-binary-wrapper
parentfc21cde24b75e357115daf5c896511a5ac6611fa (diff)
tests.makeBinaryWrapper: fix cross test on aarch64-linux
Diffstat (limited to 'pkgs/test/make-binary-wrapper')
-rw-r--r--pkgs/test/make-binary-wrapper/cross.nix7
1 files changed, 6 insertions, 1 deletions
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