From b1e1a50c0091bad2200271bfce8939a25b5648fd Mon Sep 17 00:00:00 2001 From: Zhaofeng Li Date: Sun, 30 May 2021 21:59:29 -0700 Subject: [PATCH] libjpeg-turbo: Fix tests on RISC-V This fixes the tests on RISC-V caused by floating point behavior differences (see linked upstream issue). --- pkgs/development/libraries/libjpeg-turbo/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/development/libraries/libjpeg-turbo/default.nix b/pkgs/development/libraries/libjpeg-turbo/default.nix index f2d4e00d1aad..1ac842e5593c 100644 --- a/pkgs/development/libraries/libjpeg-turbo/default.nix +++ b/pkgs/development/libraries/libjpeg-turbo/default.nix @@ -40,6 +40,10 @@ stdenv.mkDerivation rec { "-DENABLE_SHARED=${if enableShared then "1" else "0"}" ] ++ lib.optionals enableJava [ "-DWITH_JAVA=1" + ] ++ lib.optionals stdenv.hostPlatform.isRiscV [ + # https://github.com/libjpeg-turbo/libjpeg-turbo/issues/428 + # https://github.com/libjpeg-turbo/libjpeg-turbo/commit/88bf1d16786c74f76f2e4f6ec2873d092f577c75 + "-DFLOATTEST=fp-contract" ]; doInstallCheck = true;