1{ lib, stdenv, fetchFromGitHub, boxfort, meson, libcsptr, pkg-config, gettext
2, cmake, ninja, protobuf, libffi, libgit2, dyncall, nanomsg, nanopbMalloc
3, python3Packages }:
4
5stdenv.mkDerivation rec {
6 pname = "criterion";
7 version = "2.4.1";
8
9 src = fetchFromGitHub {
10 owner = "Snaipe";
11 repo = "Criterion";
12 rev = "v${version}";
13 sha256 = "KT1XvhT9t07/ubsqzrVUp4iKcpVc1Z+saGF4pm2RsgQ=";
14 fetchSubmodules = true;
15 };
16
17 nativeBuildInputs = [ meson ninja cmake pkg-config protobuf ];
18
19 buildInputs = [
20 boxfort.dev
21 dyncall
22 gettext
23 libcsptr
24 nanomsg
25 nanopbMalloc
26 libgit2
27 libffi
28 ];
29
30 nativeCheckInputs = with python3Packages; [ cram ];
31
32 doCheck = true;
33
34 postPatch = ''
35 patchShebangs ci/isdir.py src/protocol/gen-pb.py
36 '';
37
38 outputs = [ "dev" "out" ];
39
40 meta = with lib; {
41 description = "A cross-platform C and C++ unit testing framework for the 21th century";
42 homepage = "https://github.com/Snaipe/Criterion";
43 license = licenses.mit;
44 maintainers = with maintainers; [
45 thesola10
46 Yumasi
47 ];
48 platforms = platforms.unix;
49 };
50}