Merge pull request #150449 from risicle/ris-libjxl-aarch64

libjxl: fix/enable for aarch64
This commit is contained in:
Robert Scott 2022-01-08 21:32:26 +00:00 committed by GitHub
commit 1fd1c8860f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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)'
'';
@ -120,6 +125,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
};
}