{ lib, libjpeg_turbo, stdenv, }: libjpeg_turbo.overrideAttrs (old: { # This overlay also reaches pkgsi686Linux. Its 12-bit floating-point code # uses x87, while x86-64-v3 uses FMA. Keep the tests enabled for both. cmakeFlags = (old.cmakeFlags or [ ]) ++ lib.optional ( stdenv.hostPlatform.isx86_64 && (stdenv.hostPlatform.gcc.arch or null) == "x86-64-v3" ) "-DFLOATTEST12=fp-contract" ++ lib.optional stdenv.hostPlatform.isi686 "-DFLOATTEST12=387"; })