From 969ae819f943ff4300d7eb9d9831fb5998b59ddc Mon Sep 17 00:00:00 2001 From: Andrew Childs Date: Sat, 2 May 2020 16:00:09 +0900 Subject: [PATCH] libjpeg_turbo: fix race in tests Fixes: 12/151 Test #46: jpegtran-shared-icc ...............................***Failed 0.03 sec Premature end of JPEG file JPEG datastream contains no image 63/151 Test #47: jpegtran-shared-icc-cmp ...........................***Failed 0.12 sec Could not obtain MD5 sum: No such file or directory The following tests FAILED: 46 - jpegtran-shared-icc (Failed) 47 - jpegtran-shared-icc-cmp (Failed) Example build: https://hydra.nixos.org/build/117594627 --- pkgs/development/libraries/libjpeg-turbo/default.nix | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/pkgs/development/libraries/libjpeg-turbo/default.nix b/pkgs/development/libraries/libjpeg-turbo/default.nix index c7290e147c38..72d8b9677499 100644 --- a/pkgs/development/libraries/libjpeg-turbo/default.nix +++ b/pkgs/development/libraries/libjpeg-turbo/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, cmake, nasm, enableStatic ? false }: +{ stdenv, fetchurl, fetchpatch, cmake, nasm, enableStatic ? false }: stdenv.mkDerivation rec { @@ -11,6 +11,14 @@ stdenv.mkDerivation rec { }; patches = + [ + # Fixes race in tests that causes "jpegtran-shared-icc" to fail + # https://github.com/libjpeg-turbo/libjpeg-turbo/pull/425 + (fetchpatch { + url = "https://github.com/libjpeg-turbo/libjpeg-turbo/commit/a2291b252de1413a13db61b21863ae7aea0946f3.patch"; + sha256 = "0nc5vcch5h52gpi07h08zf8br58q8x81q2hv871hrn0dinb53vym"; + }) + ] ++ stdenv.lib.optional (stdenv.hostPlatform.libc or null == "msvcrt") ./mingw-boolean.patch;