From f24cab5396085e138ff82d53888af8a9a7d83055 Mon Sep 17 00:00:00 2001 From: Robert Scott Date: Sun, 12 Dec 2021 16:16:08 +0000 Subject: [PATCH] libjxl: fix/enable for aarch64 --- pkgs/development/libraries/libjxl/default.nix | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/pkgs/development/libraries/libjxl/default.nix b/pkgs/development/libraries/libjxl/default.nix index 828090875e86..ba135466d078 100644 --- a/pkgs/development/libraries/libjxl/default.nix +++ b/pkgs/development/libraries/libjxl/default.nix @@ -39,9 +39,14 @@ stdenv.mkDerivation rec { }) ]; - # hydra's darwin machines run into https://github.com/libjxl/libjxl/issues/408 - # unless we disable highway's tests - postPatch = lib.optional stdenv.isDarwin '' + postPatch = '' + # "robust statistics" have been removed in upstream mainline as they are + # conidered to cause "interoperability problems". sure enough the tests + # fail with precision issues on aarch64. + sed -i '/robust_statistics_test.cc/d' lib/{jxl_tests.cmake,lib.gni} + '' + lib.optionalString stdenv.isDarwin '' + # hydra's darwin machines run into https://github.com/libjxl/libjxl/issues/408 + # unless we disable highway's tests substituteInPlace third_party/highway/CMakeLists.txt \ --replace 'if(BUILD_TESTING)' 'if(false)' ''; @@ -118,6 +123,5 @@ stdenv.mkDerivation rec { license = licenses.bsd3; maintainers = with maintainers; [ nh2 ]; platforms = platforms.all; - broken = stdenv.hostPlatform.isAarch64; # `internal compiler error`, see https://github.com/NixOS/nixpkgs/pull/103160#issuecomment-866388610 }; }