2023-08-04 22:07:22 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, fetchpatch, installShellFiles, cmake }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "doctest";
|
2023-07-15 17:15:38 +00:00
|
|
|
version = "2.4.11";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2022-04-27 09:35:20 +00:00
|
|
|
owner = "doctest";
|
2020-04-24 23:36:52 +00:00
|
|
|
repo = "doctest";
|
2022-04-27 09:35:20 +00:00
|
|
|
rev = "v${version}";
|
2023-07-15 17:15:38 +00:00
|
|
|
sha256 = "sha256-hotO6QVpPn8unYTaQHFgi40A3oLUd++I3aTe293e4Aw=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-08-04 22:07:22 +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=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
nativeBuildInputs = [ cmake ];
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
doCheck = true;
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2022-04-27 09:35:20 +00:00
|
|
|
homepage = "https://github.com/doctest/doctest";
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "The fastest feature-rich C++11/14/17/20 single-header testing framework";
|
2021-02-13 14:23:35 +00:00
|
|
|
platforms = platforms.all;
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ davidtwco ];
|
|
|
|
};
|
|
|
|
}
|