2020-04-24 23:36:52 +00:00
|
|
|
{ stdenv, fetchFromGitHub, cmake, gtest }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "gbenchmark";
|
2020-07-18 16:06:22 +00:00
|
|
|
version = "1.5.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "google";
|
|
|
|
repo = "benchmark";
|
|
|
|
rev = "v${version}";
|
2020-07-18 16:06:22 +00:00
|
|
|
sha256 = "16xlk8h4mfszl4rig22fgpj9kw312az22981ph6pmkf35xsvvv66";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake ];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
cp -r ${gtest.src} googletest
|
|
|
|
chmod -R u+w googletest
|
|
|
|
'';
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
doCheck = true;
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "A microbenchmark support library";
|
|
|
|
homepage = "https://github.com/google/benchmark";
|
|
|
|
license = licenses.asl20;
|
|
|
|
platforms = platforms.linux ++ platforms.darwin;
|
|
|
|
maintainers = with maintainers; [ abbradar ];
|
|
|
|
};
|
|
|
|
}
|