From c66f86e584957fd5a5d162e0fc2d93916a1434ff Mon Sep 17 00:00:00 2001 From: Ilya Fedin Date: Sun, 2 Jan 2022 02:44:09 +0400 Subject: [PATCH] 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. --- pkgs/development/libraries/range-v3/default.nix | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/range-v3/default.nix b/pkgs/development/libraries/range-v3/default.nix index 4b5f277fc531..aa9127b7aa12 100644 --- a/pkgs/development/libraries/range-v3/default.nix +++ b/pkgs/development/libraries/range-v3/default.nix @@ -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";