Merge pull request #153117 from ilya-fedin/fix-range-v3-darwin

range-v3: fix on darwin
This commit is contained in:
Michael Weiss 2022-01-02 13:09:12 +01:00 committed by GitHub
commit 4da7810740
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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";