about summary refs log tree commit diff
path: root/pkgs/development/tools/misc/elfutils/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/tools/misc/elfutils/default.nix')
-rw-r--r--pkgs/development/tools/misc/elfutils/default.nix16
1 files changed, 11 insertions, 5 deletions
diff --git a/pkgs/development/tools/misc/elfutils/default.nix b/pkgs/development/tools/misc/elfutils/default.nix
index 838dfff80fe34..6de0780d5a61c 100644
--- a/pkgs/development/tools/misc/elfutils/default.nix
+++ b/pkgs/development/tools/misc/elfutils/default.nix
@@ -77,11 +77,17 @@ stdenv.mkDerivation rec {
 
   enableParallelBuilding = true;
 
-  # Backtrace unwinding tests rely on glibc-internal symbol names.
-  # Musl provides slightly different forms and fails.
-  # Let's disable tests there until musl support is fully upstreamed.
-  doCheck = !stdenv.hostPlatform.isMusl;
-  doInstallCheck = !stdenv.hostPlatform.isMusl;
+
+  doCheck =
+    # Backtrace unwinding tests rely on glibc-internal symbol names.
+    # Musl provides slightly different forms and fails.
+    # Let's disable tests there until musl support is fully upstreamed.
+    !stdenv.hostPlatform.isMusl
+    # Test suite tries using `uname` to determine whether certain tests
+    # can be executed, so we need to match build and host platform exactly.
+    && (stdenv.hostPlatform == stdenv.buildPlatform);
+  doInstallCheck = !stdenv.hostPlatform.isMusl
+    && (stdenv.hostPlatform == stdenv.buildPlatform);
 
   passthru.updateScript = gitUpdater {
     url = "https://sourceware.org/git/elfutils.git";