nixpkgs/pkgs/development/libraries/gbenchmark/default.nix
2021-08-12 04:19:59 +00:00

30 lines
700 B
Nix

{ lib, stdenv, fetchFromGitHub, cmake, gtest }:
stdenv.mkDerivation rec {
pname = "gbenchmark";
version = "1.5.6";
src = fetchFromGitHub {
owner = "google";
repo = "benchmark";
rev = "v${version}";
sha256 = "sha256-DFm5cQh1b2BX6qCDaQZ1/XBNDeIYXKWbIETYu1EjDww=";
};
nativeBuildInputs = [ cmake ];
postPatch = ''
cp -r ${gtest.src} googletest
chmod -R u+w googletest
'';
doCheck = true;
meta = with lib; {
description = "A microbenchmark support library";
homepage = "https://github.com/google/benchmark";
license = licenses.asl20;
platforms = platforms.linux ++ platforms.darwin;
maintainers = with maintainers; [ abbradar ];
};
}