nixpkgs/pkgs/by-name/do/doctest/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

35 lines
1000 B
Nix

{ lib, stdenv, fetchFromGitHub, fetchpatch, cmake }:
stdenv.mkDerivation rec {
pname = "doctest";
version = "2.4.11";
src = fetchFromGitHub {
owner = "doctest";
repo = "doctest";
rev = "v${version}";
sha256 = "sha256-hotO6QVpPn8unYTaQHFgi40A3oLUd++I3aTe293e4Aw=";
};
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=";
})
];
nativeBuildInputs = [ cmake ];
doCheck = true;
meta = with lib; {
homepage = "https://github.com/doctest/doctest";
description = "Fastest feature-rich C++11/14/17/20 single-header testing framework";
platforms = platforms.all;
license = licenses.mit;
maintainers = with maintainers; [ davidtwco ];
};
}