range-v3: fix on darwin

Tests fail due to -Werror. It's not a good idea to have -Werror generally since compilers add new warnings and upstream may not be able to fix them in time.
This commit is contained in:
Ilya Fedin 2022-01-02 02:44:09 +04:00
parent 0fd74961da
commit c66f86e584

View File

@ -1,4 +1,4 @@
{ lib, stdenv, fetchFromGitHub, cmake }:
{ lib, stdenv, fetchFromGitHub, fetchpatch, cmake }:
stdenv.mkDerivation rec {
pname = "range-v3";
@ -13,13 +13,18 @@ stdenv.mkDerivation rec {
patches = [
./gcc10.patch
(fetchpatch {
url = "https://github.com/ericniebler/range-v3/commit/66e847d4e14be3a369b7e26a03a172b20e62c003.patch";
sha256 = "sha256-JOQptVqNicdMhcDhBrWQRf7MfskBv56cICwvMA8g88Y=";
})
];
nativeBuildInputs = [ cmake ];
# Building the tests currently fails on AArch64 due to internal compiler
# errors (with GCC 9.2):
cmakeFlags = lib.optional stdenv.isAarch64 "-DRANGE_V3_TESTS=OFF";
cmakeFlags = [ "-DRANGES_ENABLE_WERROR=OFF" ]
++ lib.optional stdenv.isAarch64 "-DRANGE_V3_TESTS=OFF";
doCheck = !stdenv.isAarch64;
checkTarget = "test";