2022-01-03 16:56:52 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, fetchpatch, cmake }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "range-v3";
|
2020-08-20 17:08:02 +00:00
|
|
|
version = "0.11.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ericniebler";
|
|
|
|
repo = "range-v3";
|
|
|
|
rev = version;
|
2020-08-20 17:08:02 +00:00
|
|
|
sha256 = "18230bg4rq9pmm5f8f65j444jpq56rld4fhmpham8q3vr1c1bdjh";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-01-05 17:05:55 +00:00
|
|
|
patches = [
|
|
|
|
./gcc10.patch
|
2022-01-03 16:56:52 +00:00
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/ericniebler/range-v3/commit/66e847d4e14be3a369b7e26a03a172b20e62c003.patch";
|
|
|
|
sha256 = "sha256-JOQptVqNicdMhcDhBrWQRf7MfskBv56cICwvMA8g88Y=";
|
|
|
|
})
|
2021-01-05 17:05:55 +00:00
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
nativeBuildInputs = [ cmake ];
|
|
|
|
|
|
|
|
# Building the tests currently fails on AArch64 due to internal compiler
|
|
|
|
# errors (with GCC 9.2):
|
2022-01-03 16:56:52 +00:00
|
|
|
cmakeFlags = [ "-DRANGES_ENABLE_WERROR=OFF" ]
|
|
|
|
++ lib.optional stdenv.isAarch64 "-DRANGE_V3_TESTS=OFF";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
doCheck = !stdenv.isAarch64;
|
|
|
|
checkTarget = "test";
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Experimental range library for C++11/14/17";
|
|
|
|
homepage = "https://github.com/ericniebler/range-v3";
|
2020-08-20 17:08:02 +00:00
|
|
|
changelog = "https://github.com/ericniebler/range-v3/releases/tag/${version}";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.boost;
|
|
|
|
platforms = platforms.all;
|
2022-01-03 16:56:52 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|