From 2eab4d5c0839ef44e1d85612b5a433a0c849462c Mon Sep 17 00:00:00 2001 From: sternenseemann Date: Sat, 2 Oct 2021 12:50:30 +0200 Subject: [PATCH] haskellPackages.hashes: fix build on non-x86 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Some hash implementations in hashes are platform-specific (32 vs 64 bit), but only implemented in terms of “is i686 or x86_64?”. This it'll always fail on other platforms (like aarch64). Consequently it makes no sense to build and execute the test suite there, even if some hash implementations are platform independent and could be tested. --- pkgs/development/haskell-modules/configuration-nix.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pkgs/development/haskell-modules/configuration-nix.nix b/pkgs/development/haskell-modules/configuration-nix.nix index 9e30c5114db5..b6cfa01072ed 100644 --- a/pkgs/development/haskell-modules/configuration-nix.nix +++ b/pkgs/development/haskell-modules/configuration-nix.nix @@ -980,4 +980,11 @@ self: super: builtins.intersectAttrs super { # Test suite is just the default example executable which doesn't work if not # executed by Setup.hs, but works if started on a proper TTY isocline = dontCheck super.isocline; + + # Some hash implementations are x86 only, but part of the test suite. + # So executing and building it on non-x86 platforms will always fail. + hashes = overrideCabal super.hashes { + doCheck = with pkgs.stdenv; hostPlatform == buildPlatform + && buildPlatform.isx86; + }; }