Merge pull request #181821 from Thesola10/criterion

This commit is contained in:
Sandro 2022-08-21 01:46:01 +02:00 committed by GitHub
commit 40dc341c98
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 20 additions and 13 deletions

View File

@ -1,14 +1,14 @@
{ lib, stdenv, fetchFromGitHub, meson, ninja, python3Packages }:
stdenv.mkDerivation rec {
version = "unstable-2019-10-09";
pname = "boxfort";
version = "0.1.4";
src = fetchFromGitHub {
owner = "Snaipe";
repo = "BoxFort";
rev = "356f047db08b7344ea7980576b705e65b9fc8772";
sha256 = "1p0llz7n0p5gzpvqszmra9p88vnr0j88sp5ixhgbfz89bswg62ss";
rev = "v${version}";
sha256 = "jmtWTOkOlqVZ7tFya3IrQjr714Y8TzAVY5Cq+RzDuRs=";
};
nativeBuildInputs = [ meson ninja ];
@ -29,7 +29,5 @@ stdenv.mkDerivation rec {
license = licenses.mit;
maintainers = with maintainers; [ thesola10 Yumasi ];
platforms = platforms.unix;
# Upstream currently broken for macOS https://cirrus-ci.com/build/5624937369042944
broken = stdenv.targetPlatform.isDarwin;
};
}

View File

@ -1,19 +1,20 @@
{ lib, stdenv, fetchFromGitHub, boxfort, cmake, libcsptr, pkg-config, gettext
, dyncall , nanomsg, python3Packages }:
{ lib, stdenv, fetchFromGitHub, boxfort, meson, libcsptr, pkg-config, gettext
, cmake, ninja, protobuf, libffi, libgit2, dyncall, nanomsg, nanopbMalloc
, python3Packages }:
stdenv.mkDerivation rec {
version = "2.3.3";
pname = "criterion";
version = "2.4.1";
src = fetchFromGitHub {
owner = "Snaipe";
repo = "Criterion";
rev = "v${version}";
sha256 = "0y1ay8is54k3y82vagdy0jsa3nfkczpvnqfcjm5n9iarayaxaq8p";
sha256 = "KT1XvhT9t07/ubsqzrVUp4iKcpVc1Z+saGF4pm2RsgQ=";
fetchSubmodules = true;
};
nativeBuildInputs = [ cmake pkg-config ];
nativeBuildInputs = [ meson ninja cmake pkg-config protobuf ];
buildInputs = [
boxfort.dev
@ -21,13 +22,19 @@ stdenv.mkDerivation rec {
gettext
libcsptr
nanomsg
nanopbMalloc
libgit2
libffi
];
checkInputs = with python3Packages; [ cram ];
cmakeFlags = [ "-DCTESTS=ON" ];
doCheck = true;
checkTarget = "criterion_tests test";
checkTarget = "test";
postPatch = ''
patchShebangs ci/isdir.py src/protocol/gen-pb.py
'';
outputs = [ "dev" "out" ];

View File

@ -6,6 +6,7 @@
, python3
, stdenv
, buildPackages
, mallocBuild ? false
}:
stdenv.mkDerivation rec {
@ -27,7 +28,7 @@ stdenv.mkDerivation rec {
"-DBUILD_SHARED_LIBS=ON" # generate $out/lib/libprotobuf-nanopb.so{.0,}
"-DBUILD_STATIC_LIBS=ON" # generate $out/lib/libprotobuf-nanopb.a
"-Dnanopb_PROTOC_PATH=${buildPackages.protobuf}/bin/protoc"
];
] ++ lib.optional mallocBuild "-DCMAKE_C_FLAGS=-DPB_ENABLE_MALLOC 1";
postInstall = ''
mkdir -p $out/share/nanopb/generator/proto

View File

@ -20838,6 +20838,7 @@ with pkgs;
flatbuffers = callPackage ../development/libraries/flatbuffers { };
nanopb = callPackage ../development/libraries/nanopb { };
nanopbMalloc = callPackage ../development/libraries/nanopb { mallocBuild = true; };
gnupth = callPackage ../development/libraries/pth { };
pth = if stdenv.hostPlatform.isMusl then npth else gnupth;