2023-06-03 21:52:34 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, fetchpatch, installShellFiles, cmake }:
|
2019-11-18 23:01:12 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "doctest";
|
2023-05-24 05:48:34 +00:00
|
|
|
version = "2.4.11";
|
2019-11-18 23:01:12 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2022-05-04 05:21:13 +00:00
|
|
|
owner = "doctest";
|
2019-11-18 23:01:12 +00:00
|
|
|
repo = "doctest";
|
2022-05-04 05:21:13 +00:00
|
|
|
rev = "v${version}";
|
2023-05-24 05:48:34 +00:00
|
|
|
sha256 = "sha256-hotO6QVpPn8unYTaQHFgi40A3oLUd++I3aTe293e4Aw=";
|
2019-11-18 23:01:12 +00:00
|
|
|
};
|
|
|
|
|
2023-06-03 21:52:34 +00:00
|
|
|
patches = [
|
|
|
|
# Suppress unsafe buffer usage warnings with clang 16, which are treated as errors due to `-Werror`.
|
|
|
|
# https://github.com//doctest/doctest/pull/768
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/doctest/doctest/commit/9336c9bd86e3fc2e0c36456cad8be3b4e8829a22.patch";
|
|
|
|
hash = "sha256-ZFCVk5qvgfixRm7ZFr7hyNCSEvrT6nB01G/CBshq53o=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2019-11-18 23:01:12 +00:00
|
|
|
nativeBuildInputs = [ cmake ];
|
|
|
|
|
2023-05-24 05:48:34 +00:00
|
|
|
doCheck = true;
|
|
|
|
|
2021-01-21 17:00:13 +00:00
|
|
|
meta = with lib; {
|
2022-05-04 05:21:13 +00:00
|
|
|
homepage = "https://github.com/doctest/doctest";
|
2019-11-18 23:01:12 +00:00
|
|
|
description = "The fastest feature-rich C++11/14/17/20 single-header testing framework";
|
2021-02-06 20:32:51 +00:00
|
|
|
platforms = platforms.all;
|
2019-11-18 23:01:12 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ davidtwco ];
|
|
|
|
};
|
|
|
|
}
|